mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-08 19:06:09 +00:00
zebra: process mcast-grp rxed in the vxlan-device
BUP mcast IP address is maintained per-vxlan-device. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
3d434f5c3f
commit
d7fe235c1b
@ -481,6 +481,11 @@ static int netlink_extract_vxlan_info(struct rtattr *link_data,
|
||||
vxl_info->vtep_ip = vtep_ip_in_msg;
|
||||
}
|
||||
|
||||
if (attr[IFLA_VXLAN_GROUP]) {
|
||||
vxl_info->mcast_grp =
|
||||
*(struct in_addr *)RTA_DATA(attr[IFLA_VXLAN_GROUP]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1371,6 +1371,9 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
|
||||
if (vxlan_info->access_vlan)
|
||||
vty_out(vty, " Access VLAN Id %u",
|
||||
vxlan_info->access_vlan);
|
||||
if (vxlan_info->mcast_grp.s_addr != INADDR_ANY)
|
||||
vty_out(vty, " Mcast %s",
|
||||
inet_ntoa(vxlan_info->mcast_grp));
|
||||
vty_out(vty, "\n");
|
||||
}
|
||||
|
||||
|
||||
@ -172,6 +172,7 @@ void zebra_l2_vxlanif_add_update(struct interface *ifp,
|
||||
{
|
||||
struct zebra_if *zif;
|
||||
struct in_addr old_vtep_ip;
|
||||
uint16_t chgflags = 0;
|
||||
|
||||
zif = ifp->info;
|
||||
assert(zif);
|
||||
@ -183,11 +184,20 @@ void zebra_l2_vxlanif_add_update(struct interface *ifp,
|
||||
}
|
||||
|
||||
old_vtep_ip = zif->l2info.vxl.vtep_ip;
|
||||
if (IPV4_ADDR_SAME(&old_vtep_ip, &vxlan_info->vtep_ip))
|
||||
return;
|
||||
|
||||
zif->l2info.vxl.vtep_ip = vxlan_info->vtep_ip;
|
||||
zebra_vxlan_if_update(ifp, ZEBRA_VXLIF_LOCAL_IP_CHANGE);
|
||||
if (!IPV4_ADDR_SAME(&old_vtep_ip, &vxlan_info->vtep_ip)) {
|
||||
chgflags |= ZEBRA_VXLIF_LOCAL_IP_CHANGE;
|
||||
zif->l2info.vxl.vtep_ip = vxlan_info->vtep_ip;
|
||||
}
|
||||
|
||||
if (!IPV4_ADDR_SAME(&zif->l2info.vxl.mcast_grp,
|
||||
&vxlan_info->mcast_grp)) {
|
||||
chgflags |= ZEBRA_VXLIF_MCAST_GRP_CHANGE;
|
||||
zif->l2info.vxl.mcast_grp = vxlan_info->mcast_grp;
|
||||
}
|
||||
|
||||
if (chgflags)
|
||||
zebra_vxlan_if_update(ifp, chgflags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user