From: Florin Coras Date: Sun, 11 Oct 2020 18:20:56 +0000 (-0700) Subject: tcp: fix connection reuse with no listener X-Git-Tag: v21.06-rc0~377 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=355791c13f7cbd943b4864b097cf3c9598d2db20;p=vpp.git tcp: fix connection reuse with no listener Type: fix Signed-off-by: Florin Coras Change-Id: I674872f68406ac778779a68d3ad991f41765d4e2 --- diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index a86161c6d34..948383b4789 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -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 */