session: cleanup cless listeners from session lookup
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I46b8194ff00c6a0a4a2bc19df9991f037856cede
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 1b9f9de..a07082b 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1524,7 +1524,14 @@
return SESSION_E_NONE;
if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
- session_lookup_del_connection (tc);
+ {
+ if (transport_connection_is_cless (tc))
+ {
+ clib_memset (&tc->rmt_ip, 0, sizeof (tc->rmt_ip));
+ tc->rmt_port = 0;
+ }
+ session_lookup_del_connection (tc);
+ }
transport_stop_listen (tp, s->connection_index);
return 0;