diff options
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index b98e64adfe..32ba1d926e 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -50,6 +50,8 @@ #include "pim_igmp_join.h" #include "pim_vxlan.h" +#include "pim6_mld.h" + #if PIM_IPV == 4 static void pim_if_igmp_join_del_all(struct interface *ifp); static int igmp_join_sock(const char *ifname, ifindex_t ifindex, @@ -650,6 +652,7 @@ void pim_if_addr_add(struct connected *ifc) vxlan_term = pim_vxlan_is_term_dev_cfg(pim_ifp->pim, ifp); pim_if_add_vif(ifp, false, vxlan_term); } + gm_ifp_update(ifp); pim_ifchannel_scan_forward_start(ifp); } @@ -762,6 +765,8 @@ void pim_if_addr_del(struct connected *ifc, int force_prim_as_any) "%s: removed link-local %pI6, lowest now %pI6, highest %pI6", ifc->ifp->name, &ifc->address->u.prefix6, &pim_ifp->ll_lowest, &pim_ifp->ll_highest); + + gm_ifp_update(ifp); } #endif @@ -821,6 +826,7 @@ void pim_if_addr_add_all(struct interface *ifp) vxlan_term = pim_vxlan_is_term_dev_cfg(pim_ifp->pim, ifp); pim_if_add_vif(ifp, false, vxlan_term); } + gm_ifp_update(ifp); pim_ifchannel_scan_forward_start(ifp); pim_rp_setup(pim_ifp->pim); @@ -999,12 +1005,15 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) } ifaddr = pim_ifp->primary_address; +#if PIM_IPV != 6 + /* IPv6 API is always by interface index */ if (!ispimreg && !is_vxlan_term && pim_addr_is_any(ifaddr)) { zlog_warn( "%s: could not get address for interface %s ifindex=%d", __func__, ifp->name, ifp->ifindex); return -4; } +#endif pim_ifp->mroute_vif_index = pim_iface_next_vif_index(ifp); @@ -1029,9 +1038,10 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term) pim_ifp->pim->iface_vif_index[pim_ifp->mroute_vif_index] = 1; + gm_ifp_update(ifp); + /* if the device qualifies as pim_vxlan iif/oif update vxlan entries */ pim_vxlan_add_vif(ifp); - return 0; } @@ -1049,6 +1059,8 @@ int pim_if_del_vif(struct interface *ifp) /* if the device was a pim_vxlan iif/oif update vxlan mroute entries */ pim_vxlan_del_vif(ifp); + gm_ifp_teardown(ifp); + pim_mroute_del_vif(ifp); /* @@ -1057,7 +1069,6 @@ int pim_if_del_vif(struct interface *ifp) pim_ifp->pim->iface_vif_index[pim_ifp->mroute_vif_index] = 0; pim_ifp->mroute_vif_index = -1; - return 0; } |
