]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Ensure we cannot send invalid range to kernel
authorDonald Sharp <sharpd@nvidia.com>
Thu, 22 Feb 2024 21:20:37 +0000 (16:20 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 21 Aug 2024 14:15:55 +0000 (10:15 -0400)
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 <sharpd@nvidia.com>
zebra/zebra_router.c

index 8d6b2f347651a80b1bf3da1a2a24b1421abce083..4022c1a26fc61747cc8fcebc3610874b9d9dc230 100644 (file)
@@ -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();