zebra: install dst-src routes without NHG

The Linux kernel doesn't support dst-src routes with NHGs as nexthop,
for some (rather dubious) caching reasons.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2025-01-27 17:57:15 +01:00
parent ee67699bd7
commit 1d341d461e

View file

@ -2588,10 +2588,10 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
}
}
if ((!fpm && kernel_nexthops_supported()
&& (!proto_nexthops_only()
|| is_proto_nhg(dplane_ctx_get_nhe_id(ctx), 0)))
|| (fpm && force_nhg)) {
if ((!fpm && kernel_nexthops_supported() &&
(!proto_nexthops_only() || is_proto_nhg(dplane_ctx_get_nhe_id(ctx), 0)) &&
(!src_p || !src_p->prefixlen)) ||
(fpm && force_nhg)) {
/* Kernel supports nexthop objects */
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("%s: %pFX nhg_id is %u", __func__, p,