]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Update advertise-svi-ip MACIPs w/ new MAC
authorTrey Aspelund <taspelund@nvidia.com>
Sat, 28 May 2022 07:10:51 +0000 (03:10 -0400)
committerTrey Aspelund <taspelund@nvidia.com>
Sat, 28 May 2022 07:30:05 +0000 (03:30 -0400)
When the kernel was sending an RTM_NEWLINK updating the MAC of a known
SVI, Type-2 routes created by advertise-svi-ip were not getting updated
with the new address.
This adds removal of any old Type-2 routes (with old MAC) and creation
of new Type-2 routes (with new MAC) into RTM_NEWLINK processing.

Fixes: #11174
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
zebra/zebra_vxlan.c

index 58a1713c5691d26047e86778e7b4fd6dc51a85da..927df14fbe0becd411aa8ed52fb19eb1c98f9461 100644 (file)
@@ -4676,6 +4676,12 @@ int zebra_vxlan_svi_up(struct interface *ifp, struct interface *link_if)
 
                /* Link the SVI from the access VLAN */
                zebra_evpn_acc_bd_svi_set(ifp->info, link_if->info, true);
+
+               /* Update MACIP routes created by advertise-svi-ip */
+               if (advertise_svi_macip_enabled(zevpn)) {
+                       zebra_evpn_del_macip_for_intf(ifp, zevpn);
+                       zebra_evpn_add_macip_for_intf(ifp, zevpn);
+               }
        }
 
        return 0;