summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-11-07 12:33:12 -0800
committerFlorin Coras <florin.coras@gmail.com>2019-11-10 00:22:09 +0000
commitfd4c3fe364becc02527ed5f9088d904c7bc34a6f (patch)
tree4e19718ea5950d05e39e7c84181ee180ccc3f7b9 /src/vnet/tcp/tcp.c
parent20b962d3e494513ab28854936cc8bbc32891686b (diff)
tcp: avoid retransmits post reset
Type: fix Change-Id: Ib6a8f5ca597389700e5746f089a5cec7eee65ab5 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index d8ba65871d9..317ed3aa876 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -360,6 +360,7 @@ tcp_connection_reset (tcp_connection_t * tc)
* cleanly close the connection */
tcp_timer_set (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.closewait_time);
session_transport_reset_notify (&tc->connection);
+ tcp_cong_recovery_off (tc);
tcp_connection_set_state (tc, TCP_STATE_CLOSED);
session_transport_closed_notify (&tc->connection);
break;
@@ -370,6 +371,7 @@ tcp_connection_reset (tcp_connection_t * tc)
case TCP_STATE_LAST_ACK:
tcp_connection_timers_reset (tc);
tcp_timer_set (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.closewait_time);
+ tcp_cong_recovery_off (tc);
/* Make sure we mark the session as closed. In some states we may
* be still trying to send data */
tcp_connection_set_state (tc, TCP_STATE_CLOSED);
@@ -489,6 +491,7 @@ tcp_session_reset (u32 conn_index, u32 thread_index)
session_transport_closed_notify (&tc->connection);
tcp_send_reset (tc);
tcp_connection_timers_reset (tc);
+ tcp_cong_recovery_off (tc);
tcp_connection_set_state (tc, TCP_STATE_CLOSED);
tcp_timer_update (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.cleanup_time);
}