summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index b32882e858..d696b19859 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -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,