Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP Close Ignore data in RST segments. error #936

Open
hakehuang opened this issue Apr 6, 2022 · 8 comments
Open

TCP Close Ignore data in RST segments. error #936

hakehuang opened this issue Apr 6, 2022 · 8 comments

Comments

@hakehuang
Copy link
Contributor

Describe the bug
Ignore data in RST segments. test is Fail on Zephyr3.0.0 on qemu_x86

References

RFC 1122: section 4.2.2.12 {RST can contain data}

Results

FAIL: tcp.v4 got echo response, which is not an expected result.

Environment (please complete the following information):

  • OS: (e.g. Linux )
  • Toolchain (e.g Zephyr SDK)
  • Commit SHA or Version used: Zephyr3.0.0
@hakehuang hakehuang added area: Tests bug Something isn't working labels Apr 6, 2022
@hakehuang
Copy link
Contributor Author

Also fails on qemu_x86 for Zephyr3.0.0

@hakehuang hakehuang removed the bug Something isn't working label Apr 7, 2022
@rlubos
Copy link
Collaborator

rlubos commented Jul 29, 2022

@hakehuang Can you provide a Wireshark pcap for this one, I'd like to see what's going on. Also, it's not clear to me what is the expected pass scenario for this test? Currently we just drop the RST packet and abort the connection. The linked RFC is also not clear about the RST segment containing data:

         4.2.2.12  RST Segment: RFC-793 Section 3.4

            A TCP SHOULD allow a received RST segment to include data.

            DISCUSSION
                 It has been suggested that a RST segment could contain
                 ASCII text that encoded and explained the cause of the
                 RST.  No standard has yet been established for such
                 data.

@hakehuang
Copy link
Contributor Author

Uploading tcp_close_ignore_data_in_rst.zip…
@rlubos please check the attached pcap

@rlubos
Copy link
Collaborator

rlubos commented Aug 1, 2022

Uploading tcp_close_ignore_data_in_rst.zip… @rlubos please check the attached pcap

It seems that the file did not upload properly?

@hakehuang
Copy link
Contributor Author

tcp_close_ignore_data_in_rst.zip
reupload, @rlubos

@rlubos
Copy link
Collaborator

rlubos commented Aug 2, 2022

Hmm, so the logs from Wireshark doesn't seem to follow the issue description:

FAIL: tcp.v4 got echo response, which is not an expected result.

There is not reply from DUT in the logs. It's still not clear to me what is the cultprit of the failure here. One idea is that perhaps Zephyr should reply with ICMP Destination Unreachable in this case, but I'm not sure if that's the core problem here.

@hakehuang
Copy link
Contributor Author

looks like after server sends the close package, the DUT does not reply close status.

@ssharks
Copy link

ssharks commented Feb 7, 2023

I thinks this test tries to validate the following section from the metioned RFC:

      fourth other text or control

        Any other control or text-bearing segment (not containing SYN)
        must have an ACK and thus would be discarded by the ACK
        processing.  An incoming RST segment could not be valid, since
        it could not have been sent in response to anything sent by this
        incarnation of the connection.  So you are unlikely to get here,
        but if you do, drop the segment, and return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants