tcp: fix connection reuse with no listener

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I674872f68406ac778779a68d3ad991f41765d4e2
This commit is contained in:
Florin Coras
2020-10-11 11:20:56 -07:00
committed by Dave Barach
parent d3252adce2
commit 355791c13f

View File

@ -2575,6 +2575,12 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
lc = tcp_lookup_listener (b, tc->c_fib_index, is_ip4);
/* clean up the old session */
tcp_connection_del (tc);
/* listener was cleaned up */
if (!lc)
{
error = TCP_ERROR_NO_LISTENER;
goto done;
}
}
/* Make sure connection wasn't just created */