session: target app.fib_index in unbind_uri
Type: fix
@@ -143,6 +143,7 @@ int
vnet_unbind_uri (vnet_unlisten_args_t * a)
{
session_endpoint_cfg_t sep = SESSION_ENDPOINT_CFG_NULL;
+ application_t *app;
session_t *listener;
u32 table_index;
int rv;
@@ -150,9 +151,11 @@ vnet_unbind_uri (vnet_unlisten_args_t * a)
if ((rv = parse_uri (a->uri, &sep)))
return rv;
- /* NOTE: only default fib tables supported for uri apis */
- table_index = session_lookup_get_index_for_fib (fib_ip_proto (!sep.is_ip4),
- 0);
+ app = application_get (a->app_index);
+ if (!app)
+ return VNET_API_ERROR_INVALID_VALUE;
+
+ table_index = application_session_table (app, fib_ip_proto (!sep.is_ip4));
listener = session_lookup_listener (table_index,
(session_endpoint_t *) & sep);
if (!listener)
