- ip_copy (&lcl_pref.fp_addr, &tc->lcl_ip, is_ip4);
- lcl_pref.fp_len = is_ip4 ? 32 : 128;
- lcl_pref.fp_proto = fib_proto;
- memset (&rmt_pref.fp_addr, 0, sizeof (rmt_pref.fp_addr));
- rmt_pref.fp_len = 0;
- rmt_pref.fp_proto = fib_proto;
-
- args.table_args.lcl = lcl_pref;
- args.table_args.rmt = rmt_pref;
- args.table_args.lcl_port = 0;
- args.table_args.rmt_port = 0;
- args.table_args.action_index = app->index;
- args.table_args.is_add = is_start;
- args.table_args.transport_proto = transport_proto;
- args.appns_index = app->ns_index;
- args.scope = SESSION_RULE_SCOPE_GLOBAL;
- return vnet_session_rule_add_del (&args);
+ u32 sti;
+ sep.is_ip4 = is_ip4;
+ sep.fib_index = app_namespace_get_fib_index (app_ns, fib_proto);
+ sep.transport_proto = transport_proto;
+ sep.port = 0;
+ sti = session_lookup_get_index_for_fib (fib_proto, sep.fib_index);
+ if (is_start)
+ session_lookup_add_session_endpoint (sti, &sep, s->session_index);
+ else
+ session_lookup_del_session_endpoint (sti, &sep);