summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-09 23:09:26 +0000
committerDave Barach <openvpp@barachs.net>2020-02-10 20:13:02 +0000
commit43818c1e02b33b5baf0d3e06caf9dec61301e921 (patch)
treef18c46f52b6d6ab7108b5b83261e7761bacaffc4 /src/vnet/tcp/tcp.c
parent4c9599574929f624a218b963d268d97799289945 (diff)
tcp: add option to avoid endpoint cleanup
Type: feature If set, avoid trying to cleanup the local endpoint table. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iaa382ae74523d608217d2d17544bf1e7d82b2728
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 3fa242e6e5f..0c2523c5bff 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -242,8 +242,9 @@ tcp_connection_cleanup (tcp_connection_t * tc)
TCP_EVT (TCP_EVT_DELETE, tc);
/* Cleanup local endpoint if this was an active connect */
- transport_endpoint_cleanup (TRANSPORT_PROTO_TCP, &tc->c_lcl_ip,
- tc->c_lcl_port);
+ if (!(tc->cfg_flags & TCP_CFG_F_NO_ENDPOINT))
+ transport_endpoint_cleanup (TRANSPORT_PROTO_TCP, &tc->c_lcl_ip,
+ tc->c_lcl_port);
/* Check if connection is not yet fully established */
if (tc->state == TCP_STATE_SYN_SENT)