summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_lookup.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-07-08 08:25:09 -0700
committerDave Barach <openvpp@barachs.net>2021-07-08 21:43:34 +0000
commita4d0956082f12ac8269fd415134af7f605c1f3c9 (patch)
treefb0296ce060e3d6ba77323ab716c738f6efb8287 /src/vnet/session/session_lookup.c
parent8e3f109a0664404c36bdcb6b5a20d836c1d7d887 (diff)
session: allow listen in any fib if default namespace
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If0712f01bdd6f2fc892bcbe4e2cee28affd02520
Diffstat (limited to 'src/vnet/session/session_lookup.c')
-rw-r--r--src/vnet/session/session_lookup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index 3b330982954..6e060cb119d 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -214,6 +214,14 @@ session_lookup_get_index_for_fib (u32 fib_proto, u32 fib_index)
return fib_index_to_table_index[fib_proto][fib_index];
}
+u32
+session_lookup_get_or_alloc_index_for_fib (u32 fib_proto, u32 fib_index)
+{
+ session_table_t *st;
+ st = session_table_get_or_alloc (fib_proto, fib_index);
+ return session_table_index (st);
+}
+
/**
* Add transport connection to a session table
*