]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: install dst-src routes without NHG
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 27 Jan 2025 16:57:15 +0000 (17:57 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 28 Jan 2025 10:10:31 +0000 (11:10 +0100)
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>
zebra/rt_netlink.c

index b32882e8583422405753a3d77e507d9e38cde17e..d696b198598be41033611bddec3f4e7ad13c2cf9 100644 (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,