I think the following patch should fix this problem. Can anyone who
has seen this please try the patch and report back to me.
(BTW, the same bug is present in the 2.1.36 kernel. I'll drop
the fix in there as well once I get back a positive report.)
Thanks.
diff -r -u vanilla/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- vanilla/linux/net/ipv4/tcp.c Wed Apr 9 20:31:10 1997
+++ linux/net/ipv4/tcp.c Mon May 5 21:57:17 1997
@@ -1838,7 +1844,10 @@
case TCP_CLOSE:
case TCP_LISTEN:
break;
- case TCP_LAST_ACK: /* Could have shutdown() then close()!*/
+ case TCP_LAST_ACK: /* Could have shutdown() then close().
+ Be careful not to send double fin. */
+ ns=TCP_LAST_ACK;
+ break;
case TCP_CLOSE_WAIT: /* They have FIN'd us. We send our FIN and
wait only for the ACK */
ns=TCP_LAST_ACK;
-- Eric Schenk www: http://www.dna.lth.se/~erics Dept. of Comp. Sci., Lund University email: Eric.Schenk@dna.lth.se Box 118, S-221 00 LUND, Sweden fax: +46-46 13 10 21 ph: +46-46 222 96 38