ho->peer_index = ll->session_index;
ho->c_proto = TRANSPORT_PROTO_NONE;
ho->c_flags |= TRANSPORT_CONNECTION_F_NO_LOOKUP;
- clib_memcpy (&ho->c_rmt_ip, &sep->ip, sizeof (&sep->ip));
+ clib_memcpy (&ho->c_rmt_ip, &sep->ip, sizeof (sep->ip));
ho->flags |= CT_CONN_F_CLIENT;
ho->c_s_index = ~0;
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 */