session: avoid ct connects loop 52/32552/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 3 Jun 2021 04:32:39 +0000 (21:32 -0700)
committerDave Barach <openvpp@barachs.net>
Thu, 3 Jun 2021 14:25:17 +0000 (14:25 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I99af136ecab9be1f9e00de6d197b8f1c74ab4b20

src/vnet/session/application_local.c

index 6a02f23..2152738 100644 (file)
@@ -535,7 +535,8 @@ global_scope:
   table_index = session_lookup_get_index_for_fib (fib_proto, sep->fib_index);
   ll = session_lookup_listener_wildcard (table_index, sep);
 
-  if (ll)
+  /* Avoid connecting app to own listener */
+  if (ll && ll->app_index != app->app_index)
     return ct_connect (app_wrk, ll, sep_ext);
 
   /* Failed to connect but no error */