diff options
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 72ccf3ab1e..249b24c0d7 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -108,7 +108,8 @@ static int pim_sec_addr_comp(const void *p1, const void *p2) return 0; } -struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim) +struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim, + bool ispimreg) { struct pim_interface *pim_ifp; @@ -175,7 +176,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim) pim_sock_reset(ifp); - pim_if_add_vif(ifp); + pim_if_add_vif(ifp, ispimreg); return pim_ifp; } @@ -626,7 +627,7 @@ void pim_if_addr_add(struct connected *ifc) address assigned, then try to create a vif_index. */ if (pim_ifp->mroute_vif_index < 0) { - pim_if_add_vif(ifp); + pim_if_add_vif(ifp, false); } pim_ifchannel_scan_forward_start(ifp); } @@ -759,7 +760,7 @@ void pim_if_addr_add_all(struct interface *ifp) * address assigned, then try to create a vif_index. */ if (pim_ifp->mroute_vif_index < 0) { - pim_if_add_vif(ifp); + pim_if_add_vif(ifp, false); } pim_ifchannel_scan_forward_start(ifp); @@ -924,7 +925,7 @@ static int pim_iface_next_vif_index(struct interface *ifp) see also pim_if_find_vifindex_by_ifindex() */ -int pim_if_add_vif(struct interface *ifp) +int pim_if_add_vif(struct interface *ifp, bool ispimreg) { struct pim_interface *pim_ifp = ifp->info; struct in_addr ifaddr; @@ -946,8 +947,7 @@ int pim_if_add_vif(struct interface *ifp) } ifaddr = pim_ifp->primary_address; - if (ifp->ifindex != PIM_OIF_PIM_REGISTER_VIF - && PIM_INADDR_IS_ANY(ifaddr)) { + if (!ispimreg && PIM_INADDR_IS_ANY(ifaddr)) { zlog_warn( "%s: could not get address for interface %s ifindex=%d", __PRETTY_FUNCTION__, ifp->name, ifp->ifindex); @@ -1468,7 +1468,7 @@ void pim_if_create_pimreg(struct pim_instance *pim) pim->regiface = if_create(pimreg_name, pim->vrf_id); pim->regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF; - pim_if_new(pim->regiface, 0, 0); + pim_if_new(pim->regiface, false, false, true); } } |
