diff options
Diffstat (limited to 'vnet/vnet/vxlan')
-rw-r--r-- | vnet/vnet/vxlan/encap.c | 3 | ||||
-rw-r--r-- | vnet/vnet/vxlan/vxlan.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vnet/vnet/vxlan/encap.c b/vnet/vnet/vxlan/encap.c index 4b475f83886..dfa3bf7707c 100644 --- a/vnet/vnet/vxlan/encap.c +++ b/vnet/vnet/vxlan/encap.c @@ -232,6 +232,8 @@ vxlan_encap (vlib_main_t * vm, /* Reset to look up tunnel partner in the configured FIB */ vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index; vnet_buffer(b1)->sw_if_index[VLIB_TX] = t1->encap_fib_index; + vnet_buffer(b0)->sw_if_index[VLIB_RX] = sw_if_index0; + vnet_buffer(b1)->sw_if_index[VLIB_RX] = sw_if_index1; pkts_encapsulated += 2; len0 = vlib_buffer_length_in_chain (vm, b0); @@ -374,6 +376,7 @@ vxlan_encap (vlib_main_t * vm, /* Reset to look up tunnel partner in the configured FIB */ vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index; + vnet_buffer(b0)->sw_if_index[VLIB_RX] = sw_if_index0; pkts_encapsulated ++; len0 = vlib_buffer_length_in_chain (vm, b0); diff --git a/vnet/vnet/vxlan/vxlan.c b/vnet/vnet/vxlan/vxlan.c index 316f8cb1907..28ed173c020 100644 --- a/vnet/vnet/vxlan/vxlan.c +++ b/vnet/vnet/vxlan/vxlan.c @@ -142,6 +142,7 @@ int vnet_vxlan_add_del_tunnel vxlan_main_t * vxm = &vxlan_main; vxlan_tunnel_t *t = 0; vnet_main_t * vnm = vxm->vnet_main; + ip4_main_t * im4 = &ip4_main; vnet_hw_interface_t * hi; uword * p; u32 hw_if_index = ~0; @@ -231,6 +232,8 @@ int vnet_vxlan_add_del_tunnel } vnet_sw_interface_set_flags (vnm, sw_if_index, VNET_SW_INTERFACE_FLAG_ADMIN_UP); + vec_validate (im4->fib_index_by_sw_if_index, sw_if_index); + im4->fib_index_by_sw_if_index[sw_if_index] = t->encap_fib_index; } else { |