diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-03-19 08:57:04 -0700 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-04-20 08:33:19 -0700 |
| commit | d7fe235c1b3858eec2ef04b5a1b338af4f9dfd00 (patch) | |
| tree | 38b3174df15fd25e8a2f1e26897de0f1113da0e8 /zebra/zebra_l2.c | |
| parent | 3d434f5c3f511c55cd16b7e120521353673013bd (diff) | |
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>
Diffstat (limited to 'zebra/zebra_l2.c')
| -rw-r--r-- | zebra/zebra_l2.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/zebra/zebra_l2.c b/zebra/zebra_l2.c index f4b2fe4794..ca37dd748e 100644 --- a/zebra/zebra_l2.c +++ b/zebra/zebra_l2.c @@ -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); } /* |
