diff options
author | Florin Coras <fcoras@cisco.com> | 2018-12-21 13:54:09 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2018-12-22 10:34:45 -0800 |
commit | 54ddf435338ce035c1a92199acd5a3b217db177b (patch) | |
tree | c7b54567d3c86e906e24b80c1c1b634c17e9140e /src/vnet/tcp/tcp_output.c | |
parent | 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 (diff) |
tcp: improve waitclose in closing states
Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r-- | src/vnet/tcp/tcp_output.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index fc4bceb58cb..5f48d410126 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -392,9 +392,13 @@ tcp_make_options (tcp_connection_t * tc, tcp_options_t * opts, switch (state) { case TCP_STATE_ESTABLISHED: + case TCP_STATE_CLOSE_WAIT: case TCP_STATE_FIN_WAIT_1: + case TCP_STATE_LAST_ACK: + case TCP_STATE_CLOSING: + case TCP_STATE_FIN_WAIT_2: + case TCP_STATE_TIME_WAIT: case TCP_STATE_CLOSED: - case TCP_STATE_CLOSE_WAIT: return tcp_make_established_options (tc, opts); case TCP_STATE_SYN_RCVD: return tcp_make_synack_options (tc, opts); @@ -1124,6 +1128,8 @@ tcp_make_state_flags (tcp_connection_t * tc, tcp_state_t next_state) { case TCP_STATE_ESTABLISHED: case TCP_STATE_CLOSE_WAIT: + case TCP_STATE_TIME_WAIT: + case TCP_STATE_FIN_WAIT_2: return TCP_FLAG_ACK; case TCP_STATE_SYN_RCVD: return TCP_FLAG_SYN | TCP_FLAG_ACK; @@ -1131,6 +1137,7 @@ tcp_make_state_flags (tcp_connection_t * tc, tcp_state_t next_state) return TCP_FLAG_SYN; case TCP_STATE_LAST_ACK: case TCP_STATE_FIN_WAIT_1: + case TCP_STATE_CLOSING: if (tc->snd_nxt + 1 < tc->snd_una_max) return TCP_FLAG_ACK; else |