summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/tcp/tcp_input.c6
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 */