mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-25 04:26:06 +00:00
Merge pull request #3800 from chiragshah6/evpn_dev
zebra: advertise evpn route upon l3vni svi mac chg
This commit is contained in:
commit
08252eceee
@ -68,6 +68,7 @@
|
|||||||
#include "zebra/kernel_netlink.h"
|
#include "zebra/kernel_netlink.h"
|
||||||
#include "zebra/if_netlink.h"
|
#include "zebra/if_netlink.h"
|
||||||
#include "zebra/zebra_errors.h"
|
#include "zebra/zebra_errors.h"
|
||||||
|
#include "zebra/zebra_vxlan.h"
|
||||||
|
|
||||||
extern struct zebra_privs_t zserv_privs;
|
extern struct zebra_privs_t zserv_privs;
|
||||||
|
|
||||||
@ -1111,6 +1112,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
||||||
ifindex_t bond_ifindex = IFINDEX_INTERNAL;
|
ifindex_t bond_ifindex = IFINDEX_INTERNAL;
|
||||||
ifindex_t link_ifindex = IFINDEX_INTERNAL;
|
ifindex_t link_ifindex = IFINDEX_INTERNAL;
|
||||||
|
uint8_t old_hw_addr[INTERFACE_HWADDR_MAX];
|
||||||
|
|
||||||
|
|
||||||
zns = zebra_ns_lookup(ns_id);
|
zns = zebra_ns_lookup(ns_id);
|
||||||
@ -1312,6 +1314,8 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
was_bond_slave = IS_ZEBRA_IF_BOND_SLAVE(ifp);
|
was_bond_slave = IS_ZEBRA_IF_BOND_SLAVE(ifp);
|
||||||
zebra_if_set_ziftype(ifp, zif_type, zif_slave_type);
|
zebra_if_set_ziftype(ifp, zif_type, zif_slave_type);
|
||||||
|
|
||||||
|
memcpy(old_hw_addr, ifp->hw_addr, INTERFACE_HWADDR_MAX);
|
||||||
|
|
||||||
netlink_interface_update_hw_addr(tb, ifp);
|
netlink_interface_update_hw_addr(tb, ifp);
|
||||||
|
|
||||||
if (if_is_no_ptm_operative(ifp)) {
|
if (if_is_no_ptm_operative(ifp)) {
|
||||||
@ -1330,6 +1334,22 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
"Intf %s(%u) PTM up, notifying clients",
|
"Intf %s(%u) PTM up, notifying clients",
|
||||||
name, ifp->ifindex);
|
name, ifp->ifindex);
|
||||||
zebra_interface_up_update(ifp);
|
zebra_interface_up_update(ifp);
|
||||||
|
|
||||||
|
/* Update EVPN VNI when SVI MAC change
|
||||||
|
*/
|
||||||
|
if (IS_ZEBRA_IF_VLAN(ifp) &&
|
||||||
|
memcmp(old_hw_addr, ifp->hw_addr,
|
||||||
|
INTERFACE_HWADDR_MAX)) {
|
||||||
|
struct interface *link_if;
|
||||||
|
|
||||||
|
link_if =
|
||||||
|
if_lookup_by_index_per_ns(
|
||||||
|
zebra_ns_lookup(NS_DEFAULT),
|
||||||
|
link_ifindex);
|
||||||
|
if (link_if)
|
||||||
|
zebra_vxlan_svi_up(ifp,
|
||||||
|
link_if);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ifp->flags = ifi->ifi_flags & 0x0000fffff;
|
ifp->flags = ifi->ifi_flags & 0x0000fffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user