aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-01 08:32:04 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-02 07:08:17 +0000
commit5f5d50ee9b342964caeeee10612cd002497fb40c (patch)
treea7f030d6978dc69f4a0169fd7e8616f041425745
parentca09d0730974effd53b436871f3e69c8bb8b1114 (diff)
tcp: fix close wait timeout with no fin
Change-Id: Icba9b0dc6dcb4b72288f966728201812d8d12144 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/tcp/tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 30e5899577a..1c8ce34a728 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1192,6 +1192,10 @@ tcp_timer_waitclose_handler (u32 conn_index)
clib_warning ("FIN was sent and still in CLOSE WAIT. Weird!");
}
+ /* Make sure we don't try to send unsent data */
+ tcp_connection_timers_reset (tc);
+ tcp_cong_recovery_off (tc);
+ tc->snd_una_max = tc->snd_nxt = tc->snd_una;
tcp_send_fin (tc);
tc->state = TCP_STATE_LAST_ACK;