HomeFreeBSD

rtnetlink: Fix weight overflow in RTA_MULTIPATH

Description

rtnetlink: Fix weight overflow in RTA_MULTIPATH

If the weight value is larger than 8 bits, set it to the maximum.
Also, only send RTA_WEIGHT if its value is not the default.
This reduces message size and matches the behavior of
non-multipath routes.

Reviewed by: emaste, markj
Differential Revision: https://reviews.freebsd.org/D57266

Details

Provenance
pouriaAuthored on May 27 2026, 9:58 AM
Reviewer
emaste
Differential Revision
D57266: rtnetlink: Fix weight overflow in RTA_MULTIPATH
Parents
rG774543072db4: LinuxKPI: migrate key data access to functions
Branches
Unknown
Tags
Unknown