From db87ab3d861a2da9720317762b6990b2295e7afd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 22 Feb 2024 16:20:37 -0500 Subject: [PATCH] zebra: Ensure we cannot send invalid range to kernel The linux kernel adds 1 upon receipt of a weight, if you send a 255 it gets unhappy. Let's Limit range to 254 as that kernel does not like sending of 255. Signed-off-by: Donald Sharp --- zebra/zebra_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index 8d6b2f3476..4022c1a26f 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -343,7 +343,7 @@ void zebra_router_init(bool asic_offload, bool notify_on_ack, #endif zrouter.asic_notification_nexthop_control = false; - zrouter.nexthop_weight_scale_value = 255; + zrouter.nexthop_weight_scale_value = 254; #ifdef HAVE_SCRIPTING zebra_script_init();