Skip to content

fix(tcp): reset FIN-WAIT data after receive shutdown - #5

Merged
fslongjin merged 2 commits into
dragonos/v0.12.0from
tcp-reset-fin-wait-data-after-receive-shutdown
May 16, 2026
Merged

fix(tcp): reset FIN-WAIT data after receive shutdown#5
fslongjin merged 2 commits into
dragonos/v0.12.0from
tcp-reset-fin-wait-data-after-receive-shutdown

Conversation

@fslongjin

Copy link
Copy Markdown
Member

Add an explicit receive-shutdown state to TCP sockets so users of the stack can model Linux/BSD close(2) orphan semantics.

When the local receive half has been shut down and the socket is in FIN-WAIT-1 or FIN-WAIT-2, any peer payload that advances the receive sequence space now closes the socket and emits an active RST instead of being queued or answered with zero-window ACKs.

Also add a focused regression test for FIN-WAIT receive-shutdown data.

Add an explicit receive-shutdown state to TCP sockets so users of the
stack can model Linux/BSD close(2) orphan semantics.

When the local receive half has been shut down and the socket is in
FIN-WAIT-1 or FIN-WAIT-2, any peer payload that advances the receive
sequence space now closes the socket and emits an active RST instead of
being queued or answered with zero-window ACKs.

Also add a focused regression test for FIN-WAIT receive-shutdown data.

Signed-off-by: longjin <longjin@DragonOS.org>
@fslongjin

Copy link
Copy Markdown
Member Author

@codex review

Signed-off-by: longjin <longjin@DragonOS.org>
@fslongjin
fslongjin merged commit c65e776 into dragonos/v0.12.0 May 16, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant