diff options
author | Sarita Patra <saritap@vmware.com> | 2022-11-11 08:21:35 +0100 |
---|---|---|
committer | Sarita Patra <saritap@vmware.com> | 2022-11-14 09:17:48 +0100 |
commit | 31b66ed67d8bbc979baed5985e5d8f4bf6592495 (patch) | |
tree | 192030136cdd3e01fa4613bce4bafc4a67e57b50 /pimd/pim_rpf.c | |
parent | pimd, pim6d: Update upstream rpf disable/enable pim on interface (diff) | |
download | frr-31b66ed67d8bbc979baed5985e5d8f4bf6592495.tar.xz frr-31b66ed67d8bbc979baed5985e5d8f4bf6592495.zip |
pimd, pim6d: Don't allow pim disabled interface as nexthop
While doing nexthop lookup, only allow the nexthop
interafce which is PIM enabled.
Issue: #10782
Issue: #11931
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_rpf.c')
-rw-r--r-- | pimd/pim_rpf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c index f5834029a..d237a7312 100644 --- a/pimd/pim_rpf.c +++ b/pimd/pim_rpf.c @@ -61,6 +61,7 @@ bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop, ifindex_t first_ifindex = 0; int found = 0; int i = 0; + struct pim_interface *pim_ifp; #if PIM_IPV == 4 /* @@ -118,15 +119,16 @@ bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop, continue; } - if (!ifp->info) { + pim_ifp = ifp->info; + if (!pim_ifp || !pim_ifp->pim_enable) { if (PIM_DEBUG_ZEBRA) zlog_debug( - "%s: multicast not enabled on input interface %s (ifindex=%d, RPF for source %pPAs)", + "%s: pim not enabled on input interface %s (ifindex=%d, RPF for source %pPAs)", __func__, ifp->name, first_ifindex, &addr); i++; - } else if (neighbor_needed - && !pim_if_connected_to_source(ifp, addr)) { + } else if (neighbor_needed && + !pim_if_connected_to_source(ifp, addr)) { nbr = pim_neighbor_find(ifp, nexthop_tab[i].nexthop_addr); if (PIM_DEBUG_PIM_TRACE_DETAIL) |