Vishal M wrote:
[ ... ]
My question was basically related to "Simultaneous
close" case wherein both sides initiate a TCP close
almost at the same time, resulting in FINs crossing
each other.
Yes. But it's not apparent that the way you can handle FIN is much different
in this case versus that of only one side closing, they are considering that
case for the sake of completeness in the RFC and Stevens.
In FIN_WAIT1 state, on receiving FIN from the peer, we
transition into CLOSING state and send out an ACK.
My question was related to this ACK pkt.
The RFC and Richard Stevens Vol-2 (pg 808) suggests
just sending an ACK whereas FreeBSD code (in
tcp_fsm.h) and also Stevens Vol-2 (pg 809) suggests
sending FIN+ACK. I am not clear on this...which is the
correct behavior?
Both are.
So long as you've received all of the sent data up through the FIN from the
other side, and so long as you drain any unsent traffic on your side, it
doesn't matter whether you send a FIN+ACK with the last data traffic or whether
you ACK without a FIN, and then send a bare FIN seperately.
--
-Chuck
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"