]> git.meshlink.io Git - meshlink/commitdiff
Fix cornercases closing channels.
authorGuus Sliepen <guus@meshlink.io>
Wed, 30 Sep 2020 20:16:22 +0000 (22:16 +0200)
committerGuus Sliepen <guus@meshlink.io>
Wed, 30 Sep 2020 20:16:22 +0000 (22:16 +0200)
Closing a channel while there was data in the receive buffer would cause a
RST to be sent instead of a FIN. We now always send a FIN, and let data
in the receive buffer be handled for a later data handling (which would
then send a RST if necessary).

The RST could be dropped if the ACK seqno was not in the correct range.
We now always accept RSTs for established connections.

Finally, when receiving more data after closing the channel, we would just
accept the data but discard it, instead of sending a RST back. Now we do
send a RST back.


No differences found