X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.c;h=f703d634b5418d2678c821217cc7a7acd2c170a3;hb=4af830cd7b4a11bb84840183f7eebd6fb43497a6;hp=04613cd6943401e57ad665b2e1712427ec927310;hpb=01fdbcca130a6575712de99e26f46e21da432d40;p=vpp.git diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index 04613cd6943..f703d634b54 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -296,6 +296,7 @@ tcp_connection_reset (tcp_connection_t * tc) case TCP_STATE_CLOSED: return; } + tc->state = TCP_STATE_CLOSED; } /** @@ -349,6 +350,9 @@ tcp_connection_close (tcp_connection_t * tc) case TCP_STATE_FIN_WAIT_1: tcp_timer_update (tc, TCP_TIMER_WAITCLOSE, TCP_2MSL_TIME); break; + case TCP_STATE_CLOSED: + tcp_connection_timers_reset (tc); + break; default: TCP_DBG ("state: %u", tc->state); } @@ -553,6 +557,7 @@ tcp_init_snd_vars (tcp_connection_t * tc) tc->snd_una = tc->iss; tc->snd_nxt = tc->iss + 1; tc->snd_una_max = tc->snd_nxt; + tc->srtt = 0; } void @@ -1052,7 +1057,8 @@ tcp_snd_space_inline (tcp_connection_t * tc) { int snd_space, snt_limited; - if (PREDICT_FALSE (tcp_in_fastrecovery (tc))) + if (PREDICT_FALSE (tcp_in_fastrecovery (tc) + || tc->state == TCP_STATE_CLOSED)) return 0; snd_space = tcp_available_output_snd_space (tc);