Commit 4e1ef489f2 for frr
commit 4e1ef489f2419261438854764fd74f78c8af627b
Author: Jafar Al-Gharaibeh <jafar@atcorp.com>
Date: Sat Nov 7 00:46:26 2026 -0600
pimd: return the URIB nexthop when it has the longer prefix
In longer-prefix mode, zclient_lookup_nexthop_once() detected that the
unicast table had the longer match but copied the MRIB result. Copy the
unicast nexthops instead, matching pim_pnc_get_rib().
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index d56d7d017e..998871b555 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -459,9 +459,9 @@ static int zclient_lookup_nexthop_once(struct zclient_next_hop_args *args)
} else if (mode == MCAST_MIX_PFXLEN &&
multicast_args.next_hops[0].prefix_len < unicast_args.next_hops[0].prefix_len) {
if (PIM_DEBUG_PIM_NHT_DETAIL)
- zlog_debug("%s: addr=%pPAs(%s), URIB has lengthest prefix length", __func__,
+ zlog_debug("%s: addr=%pPAs(%s), URIB has longest prefix length", __func__,
&args->address, args->pim->vrf->name);
- *args = multicast_args;
+ *args = unicast_args;
return urib_num;
}