Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Feb 2021 21:26:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 250360] [tcp] connections should be closed if a same packet without FIN is received after FIN received
Message-ID:  <bug-250360-7501-BGz0EMkEOD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250360-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250360-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250360

Michael Tuexen <tuexen@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Closed
         Resolution|---                         |Works As Intended

--- Comment #1 from Michael Tuexen <tuexen@freebsd.org> ---
According to RFC 793, page 75, the segment text is ignored in the CLOSE-WAIT
state.
No state change should happen, the missing FIN bit is ignored.

The following packetdrill script shows the behaviour, which is in tune with=
 RFC
793:

 0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) =3D 3
+0.000 fcntl(3, F_GETFL) =3D 0x2 (flags O_RDWR)
+0.000 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) =3D 0
+0.000 connect(3, ..., ...) =3D -1 EINPROGRESS (Operation now in progress)
+0.000 > S    0:0(0)               win 65535 <mss 1460,nop,wscale 6,sackOK,=
TS
val 100 ecr 0>
+0.050 < S.   0:0(0)       ack   1 win 65535 <mss 1460,sackOK,eol,eol>
+0.000 >  .   1:1(0)       ack   1 win 65535
+0.050 < F.   1:513(512)   ack   1 win 65535
+0.000 >  .   1:1(0)       ack 514 win 65188
+0.000 recv(3, ..., 256, 0) =3D 256
+0.050 <  .   1:1025(1024) ack   1 win 65535
+0.000 >  .   1:1(0)       ack 514 win 65444 <nop,nop,sack 1:514>
+0.000 recv(3, ..., 1024, 0) =3D 256
+0.000 send(3, ..., 512, 0) =3D 512
+0.000 > P.   1:513(512)   ack 514 win 65535
+0.000 <  . 514:514(0)     ack 513 win 65535
+0.000 close(3) =3D 0
+0.000 > F. 513:513(0)     ack 514 win 65535
+0.000 <  . 514:514(0)     ack 514 win 65535

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250360-7501-BGz0EMkEOD>