diff options
author | Jeff Shaw <jeffrey.b.shaw@intel.com> | 2016-10-04 22:53:38 -0400 |
---|---|---|
committer | Jeff Shaw <jeffrey.b.shaw@intel.com> | 2016-10-05 15:08:35 -0400 |
commit | fbaa56c33664c57083e6e96c7086e8afd95077b9 (patch) | |
tree | 8a8a7d05d5baa7daf69a41c84c1b5160f0ca9110 /netlink/test | |
parent | dfae7756baf895957a43944f63bfe0c850b16467 (diff) |
[netlink] support new vpp fib
Change-Id: Iceaceee96dddeb9e09aa1cfc178ec7fbc00f72c3
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Diffstat (limited to 'netlink/test')
-rw-r--r-- | netlink/test/test.c | 9 |
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); |