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

Listening TCP socket may accept RST destined for other socket #851

Open
george-hopkins opened this issue Oct 15, 2023 · 0 comments
Open

Comments

@george-hopkins
Copy link

To start with, I'm not sure this is indeed a bug:
Given two TCP sockets in listening state, each receives a SYN. Afterwards, the remote client sends a RST to each socket. After processing the first RST, one socket falls back to LISTEN. The second RST might be accepted by that socket as well, even if it is actually destined to the second socket. The second socket will be stuck in SynReceived and will be trying to send SYN+ACKs.

I was able to fix this behaviour by ignoring such packets in smoltcp::socket::tcp::Socket::accepts but this might not be the most elegant way.

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

No branches or pull requests

1 participant