summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2020-06-12 12:21:28 -0300
committerRafael Zalamena <rzalamena@opensourcerouting.org>2020-07-10 13:13:55 -0300
commit013fef4c91375708794517b8872cb3016c5c52b0 (patch)
tree6b2801ddb6172e091fcaf8a19446c54f06d36437
parent373edbbc9975f2ebeae7d019eb386f48b53d2696 (diff)
zebra,fpm: fix force disable next hop groups
`force_nhg` is only settable when calling from `fpm`, so if the kernel was using next hop groups it would override our knob. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
-rw-r--r--zebra/rt_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 9883e73876..40a7eeba8e 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1713,7 +1713,7 @@ ssize_t netlink_route_multipath_msg_encode(int cmd,
nl_attr_nest_end(&req->n, nest);
}
- if (kernel_nexthops_supported() || force_nhg) {
+ if ((!fpm && kernel_nexthops_supported()) || (fpm && force_nhg)) {
/* Kernel supports nexthop objects */
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("%s: %pFX nhg_id is %u", __func__, p,