Bug 250360

Summary: [tcp] connections should be closed if a same packet without FIN is received after FIN received
Product: Base System Reporter: Yong-Hao Zou <yonghaoz1994>
Component: kernAssignee: Michael Tuexen <tuexen>
Status: New ---    
Severity: Affects Some People CC: net, tuexen
Priority: ---    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Yong-Hao Zou 2020-10-15 08:15:45 UTC
The connection should be closed with the following packetdrill script

``
// Establish a connection.
0   socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0

+0  bind(3, ..., ...) = 0
+0  listen(3, 1) = 0

+0  < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
+0 ~ +1  > S. 0:0(0) ack 1 <...>

+.1 < . 1:1(0) ack 1 win 32792
+0  accept(3, ..., ...) = 4
+0 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0

+0 < . 1:3962(3961) ack 1 win 28535
+0 < F. 3962:6683(2721) ack 1 win 45489

+0.1 read(4, ..., 177) =  177
+0.1 write(4, ..., 177) =  177
+0.1 write(4, ..., 113) =  113
+0 < . 3962:7468(3506) ack 1 win 29046
+0.1 write(4, ..., 113) =  -1 // current we got 113

```