aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/l2/l2_fib.h9
-rw-r--r--src/vnet/l2/l2_input.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index 21dcc4513e0..ee6f0dc56a4 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -383,10 +383,17 @@ static_always_inline u8 *
l2fib_swif_seq_num (u32 sw_if_index)
{
l2fib_main_t *mp = &l2fib_main;
- vec_validate (mp->swif_seq_num, sw_if_index);
return vec_elt_at_index (mp->swif_seq_num, sw_if_index);
}
+static_always_inline u8 *
+l2fib_valid_swif_seq_num (u32 sw_if_index)
+{
+ l2fib_main_t *mp = &l2fib_main;
+ vec_validate (mp->swif_seq_num, sw_if_index);
+ return l2fib_swif_seq_num (sw_if_index);
+}
+
BVT (clib_bihash) * get_mac_table (void);
#endif
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 9a3148c533a..aa15621320e 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -618,7 +618,7 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
config->xconnect = 0;
config->bridge = 1;
config->bd_index = bd_index;
- *l2fib_swif_seq_num (sw_if_index) += 1;
+ *l2fib_valid_swif_seq_num (sw_if_index) += 1;
/*
* Enable forwarding, flooding, learning and ARP termination by default