-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1449 from microsoft/bugfix-inetstack-close-corout…
…ines Bug Fix: Retransmit FIN on close
- Loading branch information
Showing
7 changed files
with
468 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
network_simulator/input/tcp/close/close-remote-retransmission.pkt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Tests for remote close. | ||
|
||
// Establish a connection. | ||
+.0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 500 | ||
+.2 connect(500, ..., ...) = 0 | ||
|
||
// Send SYN segment. | ||
+.0 TCP > S seq 0(0) win 65535 <mss 1450, wscale 0> | ||
// Receive SYN-ACK segment. | ||
+.1 TCP < S. seq 0(0) ack 1 win 65535 <mss 1450, wscale 0> | ||
// Send ACK on SYN-ACK segment. | ||
+.0 TCP > . seq 1(0) ack 1 win 65535 <nop> | ||
|
||
// Succeed to establish connection. | ||
+.0 wait(500, ...) = 0 | ||
|
||
// Receive FIN segment. | ||
+.1 TCP < F. seq 1(0) ack 1 win 65535 <nop> | ||
// Send ACK on FIN segment. | ||
+.0 TCP > . seq 1(0) ack 2 win 65534 <nop> | ||
|
||
// Close connection. | ||
+.2 close(500) = 0 | ||
|
||
// Send FIN segment. | ||
+.0 TCP > F. seq 1(0) ack 2 win 65534 <nop> | ||
|
||
// Re-send FIN segment. | ||
+1 TCP > F. seq 1(0) ack 2 win 65534 <nop> | ||
|
||
// Re-send FIN segment. | ||
+3 TCP > F. seq 1(0) ack 2 win 65534 <nop> | ||
|
||
// Receive ACK on FIN segment. | ||
+.1 TCP < . seq 2(0) ack 2 win 65535 <nop> | ||
|
||
// Succeed to close connection immediately. | ||
+.0 wait(500, ...) = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.