summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-20 09:42:36 -0800
committerDave Barach <openvpp@barachs.net>2017-03-04 01:23:56 +0000
commit358425b86cb231efd2330e5aeb077cad38c2efad (patch)
treee8b60b6a4259b73a1b576cdff7815efbda9a8143 /src/vnet/interface_api.c
parente04c29942af6a130591059679531c9ffa3d7237a (diff)
DHCPv6 - Be consistent with the use of MFIB index as the RX FIB index for DHCPv6. For the same table ID, the unicast-FIB index is not necessarily the same value as the multicast-FIB index, since features (like LISP, SR) can create unicast-tables, and thus affect only the index of the unicast FIBs
Change-Id: Ibfa334d7eda822f742c241b7ce69a6271b4753a9 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index f94928b6dad..bfd2af31a58 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -29,6 +29,7 @@
#include <vnet/l2/l2_vtr.h>
#include <vnet/vnet_msg_enum.h>
#include <vnet/fib/fib_api.h>
+#include <vnet/mfib/mfib_table.h>
#define vl_typedefs /* define message structures */
#include <vnet/vnet_all_api_h.h>
@@ -340,9 +341,9 @@ vl_api_sw_interface_set_table_t_handler (vl_api_sw_interface_set_table_t * mp)
fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6,
table_id);
-
vec_validate (ip6_main.fib_index_by_sw_if_index, sw_if_index);
ip6_main.fib_index_by_sw_if_index[sw_if_index] = fib_index;
+
fib_index = mfib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6,
table_id);
vec_validate (ip6_main.mfib_index_by_sw_if_index, sw_if_index);
@@ -362,7 +363,6 @@ vl_api_sw_interface_set_table_t_handler (vl_api_sw_interface_set_table_t * mp)
fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP4,
table_id);
-
vec_validate (ip4_main.fib_index_by_sw_if_index, sw_if_index);
ip4_main.fib_index_by_sw_if_index[sw_if_index] = fib_index;