diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 24c01b7f51..2d12ad4c8e 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -3027,11 +3027,12 @@ int netlink_nexthop_read(struct zebra_ns *zns) * this kernel must support them. */ supports_nh = true; - if (IS_ZEBRA_DEBUG_KERNEL || IS_ZEBRA_DEBUG_NHG) zlog_debug("Nexthop objects %ssupported on this kernel", supports_nh ? "" : "not "); + zebra_router_set_supports_nhgs(supports_nh); + return ret; } diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h index dd788216c7..dafe925c26 100644 --- a/zebra/zebra_router.h +++ b/zebra/zebra_router.h @@ -209,6 +209,8 @@ struct zebra_router { */ bool asic_offloaded; bool notify_on_ack; + + bool supports_nhgs; }; #define GRACEFUL_RESTART_TIME 60 @@ -256,6 +258,11 @@ extern enum multicast_mode multicast_mode_ipv4_get(void); extern bool zebra_router_notify_on_ack(void); +static inline void zebra_router_set_supports_nhgs(bool support) +{ + zrouter.supports_nhgs = support; +} + /* zebra_northbound.c */ extern const struct frr_yang_module_info frr_zebra_info; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 073f1aa379..31064e55aa 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3991,6 +3991,9 @@ DEFUN (show_zebra, else vty_out(vty, "Asic offload is not being used\n"); + vty_out(vty, "Kernel %ssupport Nexthop Groups\n", + zrouter.supports_nhgs ? "does " : "does not "); + vty_out(vty, " Route Route Neighbor LSP LSP\n"); vty_out(vty,