aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-05-09 18:54:52 -0700
committerDave Barach <openvpp@barachs.net>2017-05-10 14:02:51 +0000
commitdb84e579ef77476e3c73780e20243ee1799530f3 (patch)
treef475a8d9466729c3cb8902e9b4ad96b201e91567 /src/vnet/tcp/tcp.c
parent1015a1ef1355b1160dcf2a3c0cbe0cfe340be653 (diff)
Improve TCP option handling, VPP-757
Change-Id: Ica634536387d1196366ec96c52770287fcab0768 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 224ee0dd160..a65ab7ffac4 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 */