From db84e579ef77476e3c73780e20243ee1799530f3 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 9 May 2017 18:54:52 -0700 Subject: Improve TCP option handling, VPP-757 Change-Id: Ica634536387d1196366ec96c52770287fcab0768 Signed-off-by: Florin Coras --- src/vnet/tcp/tcp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/vnet/tcp/tcp.c') diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 224ee0dd..a65ab7ff 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -154,6 +154,10 @@ tcp_connection_reset (tcp_connection_t * tc) return; tc->state = TCP_STATE_CLOSED; + + /* Make sure all timers are cleared */ + tcp_connection_timers_reset (tc); + stream_session_reset_notify (&tc->connection); } @@ -585,7 +589,7 @@ tcp_round_snd_space (tcp_connection_t * tc, u32 snd_space) { if (tc->snd_wnd < tc->snd_mss) { - return tc->snd_wnd < snd_space ? tc->snd_wnd : 0; + return tc->snd_wnd <= snd_space ? tc->snd_wnd : 0; } /* If we can't write at least a segment, don't try at all */ -- cgit 1.2.3-korg