|
Bugzilla – Full Text Bug Listing |
| Summary: | Unnecessary SND.NXT advance, missing ACK for Out of Order segments | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | John Abraham <john.abraham.in> |
| Component: | tcp | Assignee: | Brian Swenson <bswenson3> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bswenson3, ns-bugs, tomh |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Testcase that works with 3.14.1
Proposed change to address issue |
||
|
Description
John Abraham
2011-09-05 23:17:31 UTC
Created attachment 1429 [details]
Testcase that works with 3.14.1
Updated test case to work with version 3.14.1 of NS3 (changed header files)
With the testcase the ACK sent by n0 in response to the FIN sent from n2 is lost. n2 continues to send out FINs. //FIN Sent 58 [node 2] TcpSocketBase:Close(0x11db2d0) 58 [node 2] TcpSocketBase:DoClose(0x11db2d0) 58 [node 2] TcpSocketBase:SendEmptyPacket(0x11db2d0, 1) 58 [node 2] Schedule retransmission timeout at time 58 to expire at time 58.2 58 [node 2] ESTABLISHED -> FIN_WAIT_1 58 [node 2] TcpSocketBase:Close(0x11d9c20) 58 [node 2] TcpSocketBase:DoClose(0x11d9c20) 58 [node 2] TcpSocketBase:CloseAndNotify(0x11d9c20) 58 [node 2] LISTEN -> CLOSED //ACK dropped 58.0057 [node 0] Socket 0x11da2e0 forward up 192.168.1.2:8080 to 192.168.0.1:49153 58.0057 [node 0] TcpSocketBase:ProcessEstablished(0x11da2e0, 8080 > 49153 [ FIN ACK ] Seq=1 Ack=653361 Win=65535) 58.0057 [node 0] TcpSocketBase:PeerClose(0x11da2e0, 8080 > 49153 [ FIN ACK ] Seq=1 Ack=653361 Win=65535) 58.0057 [node 0] Accepted FIN at seq 1 58.0057 [node 0] ESTABLISHED -> CLOSE_WAIT 58.0057 [node 0] TCP 0x11da2e0 calling NotifyNormalClose 58.0057 [node 0] TcpSocketBase:SendEmptyPacket(0x11da2e0, 16) RxDrop at 58.007 //FIN sent again 58.2 [node 2] TcpSocketBase:SendEmptyPacket(0x11db2d0, 17) 58.2 [node 2] Schedule retransmission timeout at time 58.2 to expire at time 58.4 //FIN sent again 58.4 [node 2] TcpSocketBase:SendEmptyPacket(0x11db2d0, 17) 58.4 [node 2] Schedule retransmission timeout at time 58.4 to expire at time 58.6 //FIN sent again 58.6 [node 2] TcpSocketBase:SendEmptyPacket(0x11db2d0, 17) 58.6 [node 2] Schedule retransmission timeout at time 58.6 to expire at time 58.8 //And so on.. However n0 is still sending data to n2. And it contains the correct ACK = 2. 58.193 [node 2] Socket 0x11db2d0 forward up 192.168.0.1:49153 to 192.168.1.2:8080 58.193 [node 2] TcpSocketBase:ProcessWait(0x11db2d0, 49153 > 8080 [ ACK ] Seq=655505 Ack=2 Win=65535) 58.193 [node 2] TcpSocketBase:ReceivedData(0x11db2d0, 49153 > 8080 [ ACK ] Seq=655505 Ack=2 Win=65535) However, n2 doesn't not correctly recognize the FIN packet as being ACK'd because it is expecting an empty packet with ACK=2. Also n0 is receiving the duplicate FINs from n2, however it doesn't send an empty ACK because it is now in state CLOSE_WAIT and not ESTABLISHED Created attachment 1430 [details]
Proposed change to address issue
Log with Patch: //FIN sent 58 [node 2] TcpSocketBase:Close(0x14ff2d0) 58 [node 2] TcpSocketBase:DoClose(0x14ff2d0) 58 [node 2] TcpSocketBase:SendEmptyPacket(0x14ff2d0, 1) 58 [node 2] Schedule retransmission timeout at time 58 to expire at time 58.2 58 [node 2] ESTABLISHED -> FIN_WAIT_1 58 [node 2] TcpSocketBase:Close(0x14fdc20) 58 [node 2] TcpSocketBase:DoClose(0x14fdc20) 58 [node 2] TcpSocketBase:CloseAndNotify(0x14fdc20) 58 [node 2] LISTEN -> CLOSED //ACK dropped 58.0057 [node 0] Socket 0x14fe2e0 forward up 192.168.1.2:8080 to 192.168.0.1:49153 58.0057 [node 0] TcpSocketBase:ProcessEstablished(0x14fe2e0, 8080 > 49153 [ FIN ACK ] Seq=1 Ack=653361 Win=65535) 58.0057 [node 0] TcpSocketBase:PeerClose(0x14fe2e0, 8080 > 49153 [ FIN ACK ] Seq=1 Ack=653361 Win=65535) 58.0057 [node 0] Accepted FIN at seq 1 58.0057 [node 0] ESTABLISHED -> CLOSE_WAIT 58.0057 [node 0] TCP 0x14fe2e0 calling NotifyNormalClose 58.0057 [node 0] TcpSocketBase:SendEmptyPacket(0x14fe2e0, 16) RxDrop at 58.007 //Received data with ACK = 2 58.193 [node 2] Socket 0x14ff2d0 forward up 192.168.0.1:49153 to 192.168.1.2:8080 58.193 [node 2] TcpSocketBase:ProcessWait(0x14ff2d0, 49153 > 8080 [ ACK ] Seq=655505 Ack=2 Win=65535) 58.193 [node 2] TcpSocketBase:ReceivedAck(0x14ff2d0, 49153 > 8080 [ ACK ] Seq=655505 Ack=2 Win=65535) 58.193 [node 2] New ack of 2 ... //Doesn't resend FIN 58.193 [node 2] 0x14ff2d0 Cancelled ReTxTimeout event which was set to expire at 58.2 ... //Goes into FIN_WAIT_2 58.193 [node 2] FIN_WAIT_1 -> FIN_WAIT_2 9020:200c9dd61e1a |