Multiple FINs required to close connection

John Kodis (kodis@jagunet.com)
Sat, 1 May 1999 13:22:25 -0400


The TCP/IP code in the late 2.1 and 2.2 kernels frequently end the
connection to my ISP's IMAP server by sending a sequence of FINs at 2,
4, 8, 16, and 32 seconds apart, after which my ISP sends a RST to
close the connection.

This doesn't seem to hurt anything, and I'm not sure it's a bug. I'm
reporting it because:

- the extra FINs prevent fetchmail's interface monitoring code from
recognizing that the interface is idle;
- this behavior is different than that of the 2.0 kernel stack;
- the extra FINs and the apparent dependence on a timeout response
just don't look right.

A tcpdump of a typical fetchmail run follows. Additional details
gladly supplied on request.

-- John Kodis.

12:00:39.768188 206.156.208.48.1253 > 206.156.208.7.domain: 322+ A? pophost.jagunet.com. (37)
12:00:40.017770 206.156.208.7.domain > 206.156.208.48.1253: 322* 2/3/3 CNAME shado.jaguNET.com., A 206.156.208.2 (194)
12:00:40.018963 206.156.208.48.1232 > 206.156.208.2.imap: S 3631091877:3631091877(0) win 32120 <mss 1460,sackOK,timestamp 22788942 0,nop,wscale 0> (DF)
12:00:40.167699 206.156.208.2.imap > 206.156.208.48.1232: S 4021543937:4021543937(0) ack 3631091878 win 4096 <mss 1024>
12:00:40.167814 206.156.208.48.1232 > 206.156.208.2.imap: . ack 1 win 32120 (DF)
12:00:40.467647 206.156.208.2.imap > 206.156.208.48.1232: P 1:56(55) ack 1 win 4096
12:00:40.467758 206.156.208.48.1232 > 206.156.208.2.imap: . ack 56 win 32065 (DF)
12:00:40.468184 206.156.208.48.1232 > 206.156.208.2.imap: P 1:19(18) ack 56 win 32120 (DF)
12:00:40.677620 206.156.208.2.imap > 206.156.208.48.1232: P 56:209(153) ack 19 win 4096
12:00:40.678733 206.156.208.48.1232 > 206.156.208.2.imap: P 19:51(32) ack 209 win 32120 (DF)
12:00:40.957632 206.156.208.2.imap > 206.156.208.48.1232: . ack 51 win 4096
12:00:41.327506 206.156.208.2.imap > 206.156.208.48.1232: P 209:235(26) ack 51 win 4096
12:00:41.327827 206.156.208.48.1232 > 206.156.208.2.imap: P 51:71(20) ack 235 win 32120 (DF)
12:00:41.657470 206.156.208.2.imap > 206.156.208.48.1232: P 235:589(354) ack 71 win 4096
12:00:41.658461 206.156.208.48.1232 > 206.156.208.2.imap: P 71:85(14) ack 589 win 32120 (DF)
12:00:41.837484 206.156.208.2.imap > 206.156.208.48.1232: P 589:681(92) ack 85 win 4096
12:00:41.837830 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 681 win 32120 (DF)
12:00:41.847439 206.156.208.2.imap > 206.156.208.48.1232: F 681:681(0) ack 85 win 4096
12:00:41.847532 206.156.208.48.1232 > 206.156.208.2.imap: . ack 682 win 32119 (DF)
12:00:41.977415 206.156.208.2.imap > 206.156.208.48.1232: F 681:681(0) ack 86 win 4096
12:00:41.977517 206.156.208.48.1232 > 206.156.208.2.imap: . ack 682 win 32119 (DF)
12:00:42.827289 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:00:44.806951 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:00:48.766272 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:00:56.684888 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:01:12.522155 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:01:44.196706 206.156.208.48.1232 > 206.156.208.2.imap: F 85:85(0) ack 682 win 32119 (DF)
12:01:44.326653 206.156.208.2.imap > 206.156.208.48.1232: R 4021544619:4021544619(0) win 4096

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/