summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2024-11-18 13:17:32 +0100
committerRafael Zalamena <rzalamena@opensourcerouting.org>2024-11-18 13:17:32 +0100
commit3066f48eb825721e2d253877ef7868b21ba8e620 (patch)
tree555c29cc094b1c42f19919daf4f6de3612321eee /pimd
parentMerge pull request #17451 from opensourcerouting/fix/bgp_optimizations (diff)
downloadfrr-3066f48eb825721e2d253877ef7868b21ba8e620.tar.xz
frr-3066f48eb825721e2d253877ef7868b21ba8e620.zip
pim6d: fix coverity scan warning
Fix Coverity Scan CID 1601875: use the return value to tell user about the availability of a next hop to the learned RP (needs debug enabled). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_rp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c
index 53d2a2d62..e6de991a1 100644
--- a/pimd/pim_rp.c
+++ b/pimd/pim_rp.c
@@ -1541,8 +1541,12 @@ void pim_embedded_rp_new(struct pim_instance *pim, const pim_addr *group, const
&rp_info->rp.rpf_addr, &rp_info->group);
pim_find_or_track_nexthop(pim, rp_info->rp.rpf_addr, NULL, rp_info, NULL);
- pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, rp_info->rp.rpf_addr,
- &rp_info->group, 1);
+ if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, rp_info->rp.rpf_addr,
+ &rp_info->group, 1)) {
+ if (PIM_DEBUG_PIM_NHT_RP)
+ zlog_debug("%s: Embedded RP %pPA learned but no next hop", __func__,
+ &rp_info->rp.rpf_addr);
+ }
}
void pim_embedded_rp_delete(struct pim_instance *pim, const pim_addr *group)