Skip to content

Commit

Permalink
zebra: Clean remote FDB entries upon VNI removal
Browse files Browse the repository at this point in the history
When the VLAN-VNI mapping is configured via a map and not using
individual VXLAN interfaces, upon removal of a VNI ensure that the
remote FDB entries are uninstalled correctly.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>

Ticket: #2613048
Reviewed By:
Testing Done:
1. Manual verification - logs in the ticket
2. Precommit (user job FRRouting#171) and evpn-min (user job FRRouting#170)
  • Loading branch information
vivek-cumulus committed Apr 26, 2021
1 parent 6821f1d commit 7b349d1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions zebra/zebra_vxlan_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ static int zebra_vxlan_if_del_vni(struct interface *ifp, struct zebra_vxlan_vni
zebra_evpn_send_del_to_client(zevpn);

/* Free up all neighbors and MAC, if any. */
zebra_evpn_neigh_del_all(zevpn, 0, 0, DEL_ALL_NEIGH);
zebra_evpn_mac_del_all(zevpn, 0, 0, DEL_ALL_MAC);
zebra_evpn_neigh_del_all(zevpn, 1, 0, DEL_ALL_NEIGH);
zebra_evpn_mac_del_all(zevpn, 1, 0, DEL_ALL_MAC);

/* Free up all remote VTEPs, if any. */
zebra_evpn_vtep_del_all(zevpn, 0);
zebra_evpn_vtep_del_all(zevpn, 1);

/* Delete the hash entry. */
if (zebra_evpn_vxlan_del(zevpn)) {
Expand Down Expand Up @@ -732,8 +732,14 @@ int zebra_vxlan_if_vni_table_add_update(struct interface *ifp, struct hash *vni_

/* release kernel deleted vnis */
if (old_vni_table) {
if (hashcount(old_vni_table))
if (hashcount(old_vni_table)) {
/* UGLY HACK: Put back the old table so that delete of
* MACs goes through and then flip back.
*/
vni_info->vni_table = old_vni_table;
hash_iterate(old_vni_table, zebra_vxlan_if_vni_clean, zif);
vni_info->vni_table = vni_table;
}
zebra_vxlan_vni_table_destroy(old_vni_table);
}

Expand Down

0 comments on commit 7b349d1

Please sign in to comment.