diff options
Diffstat (limited to 'vnet/vnet/gre/interface.c')
-rw-r--r-- | vnet/vnet/gre/interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vnet/vnet/gre/interface.c b/vnet/vnet/gre/interface.c index 7adc5268446..d624587d8e9 100644 --- a/vnet/vnet/gre/interface.c +++ b/vnet/vnet/gre/interface.c @@ -331,6 +331,7 @@ vnet_gre_tunnel_add (vnet_gre_add_del_tunnel_args_t *a, t->hw_if_index = hw_if_index; t->outer_fib_index = outer_fib_index; t->sw_if_index = sw_if_index; + t->l2_adj_index = ADJ_INDEX_INVALID; vec_validate_init_empty (gm->tunnel_index_by_sw_if_index, sw_if_index, ~0); gm->tunnel_index_by_sw_if_index[sw_if_index] = t - gm->tunnels; @@ -416,6 +417,9 @@ vnet_gre_tunnel_delete (vnet_gre_add_del_tunnel_args_t *a, if (GRE_TUNNEL_TYPE_TEB == t->type) adj_unlock(t->l2_adj_index); + if (t->l2_adj_index != ADJ_INDEX_INVALID) + adj_unlock(t->l2_adj_index); + fib_entry_child_remove(t->fib_entry_index, t->sibling_index); fib_table_entry_delete_index(t->fib_entry_index, |