aboutsummaryrefslogtreecommitdiffstats
path: root/netlink/test
diff options
context:
space:
mode:
Diffstat (limited to 'netlink/test')
-rw-r--r--netlink/test/test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/netlink/test/test.c b/netlink/test/test.c
index 5a62558..96f49f8 100644
--- a/netlink/test/test.c
+++ b/netlink/test/test.c
@@ -121,8 +121,17 @@ mapper_ns_add_command_fn (vlib_main_t * vm,
if (!strcmp(nsname, "default"))
nsname[0] = 0;
+#ifdef find_ip4_fib_by_table_index_or_id
u32 fib4 = find_ip4_fib_by_table_index_or_id(&ip4_main, table_id, 0) - ip4_main.fibs;
+#else
+ u32 fib4 = fib_table_id_find_fib_index (FIB_PROTOCOL_IP4, table_id);
+#endif
+
+#ifdef find_ip6_fib_by_table_index_or_id
u32 fib6 = find_ip6_fib_by_table_index_or_id(&ip6_main, table_id, 0) - ip6_main.fibs;
+#else
+ u32 fib6 = fib_table_id_find_fib_index (FIB_PROTOCOL_IP6, table_id);
+#endif
if (mapper_add_ns(nsname, fib4, fib6, &mapper_indexes[index]))
return clib_error_return(0, "Could not add ns %s", nsname);