diff options
author | Florin Coras <fcoras@cisco.com> | 2020-10-11 11:20:56 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-10-12 15:02:41 +0000 |
commit | 355791c13f7cbd943b4864b097cf3c9598d2db20 (patch) | |
tree | c699f1b253df299381c7d3a5d17793eebd0334d9 /src | |
parent | d3252adce29e45611cbe2a43b2d37758a864a429 (diff) |
tcp: fix connection reuse with no listener
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I674872f68406ac778779a68d3ad991f41765d4e2
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/tcp/tcp_input.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |