aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-11-26 22:13:57 -0500
committerJohn Lo <loj@cisco.com>2018-11-30 06:32:27 +0000
commit4744ddbfe0012861895dbd33487569e46b81554b (patch)
tree0852cbd90c8404411bbf0845e693e1ebdcf2fc5a /src
parent558822539816efa9bc6357c5d314513268d8c257 (diff)
session: use endpt fib index if app in default ns
Change-Id: Icf1408c50a6438c81e16033e83b2a76ce6eb0166 Signed-off-by: John Lo <loj@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/application_interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index f0722d6af19..ace9ed2f868 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -163,7 +163,12 @@ session_endpoint_update_for_app (session_endpoint_cfg_t * sep,
* that "supports" app's namespace. This will fix our local connection
* endpoint.
*/
- fib_index = sep->is_ip4 ? app_ns->ip4_fib_index : app_ns->ip6_fib_index;
+
+ /* If in default namespace and user requested a fib index use it */
+ if (ns_index == 0 && sep->fib_index != ENDPOINT_INVALID_INDEX)
+ fib_index = sep->fib_index;
+ else
+ fib_index = sep->is_ip4 ? app_ns->ip4_fib_index : app_ns->ip6_fib_index;
sep->peer.fib_index = fib_index;
sep->fib_index = fib_index;