L2 BVI/FIB: Update L2 FIB table when BVI's MAC changes
[vpp.git] / src / vnet / gre / interface.c
index 013dde6..cd7f952 100644 (file)
@@ -24,6 +24,7 @@
 #include <vnet/adj/adj_midchain.h>
 #include <vnet/adj/adj_nbr.h>
 #include <vnet/mpls/mpls.h>
+#include <vnet/l2/l2_input.h>
 
 static const char *gre_tunnel_type_names[] = GRE_TUNNEL_TYPE_NAMES;
 
@@ -135,7 +136,7 @@ gre_tunnel_stack (adj_index_t ai)
   adj = adj_get (ai);
   sw_if_index = adj->rewrite_header.sw_if_index;
 
-  if ((vec_len (gm->tunnel_index_by_sw_if_index) < sw_if_index) ||
+  if ((vec_len (gm->tunnel_index_by_sw_if_index) <= sw_if_index) ||
       (~0 == gm->tunnel_index_by_sw_if_index[sw_if_index]))
     return;
 
@@ -350,6 +351,7 @@ vnet_gre_tunnel_add (vnet_gre_add_del_tunnel_args_t * a,
 
   /* Standard default gre MTU. */
   vnet_sw_interface_set_mtu (vnm, sw_if_index, 9000);
+
   /*
    * source the FIB entry for the tunnel's destination
    * and become a child thereof. The tunnel will then get poked