Page MenuHomeFreeBSD

rtnetlink: Fix weight overflow in RTA_MULTIPATH
ClosedPublic

Authored by pouria on Wed, May 27, 10:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 17, 1:38 PM
Unknown Object (File)
Tue, Jun 16, 10:24 PM
Unknown Object (File)
Tue, Jun 16, 1:05 PM
Unknown Object (File)
Mon, Jun 15, 7:47 PM
Unknown Object (File)
Mon, Jun 8, 4:29 PM
Unknown Object (File)
Mon, Jun 8, 9:07 AM
Unknown Object (File)
Fri, Jun 5, 12:26 AM
Unknown Object (File)
Thu, Jun 4, 7:39 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netlink/route/rt.c
220

Use MAX()?

sys/netlink/route/rt.c
246

Doesn't this break backwards compatibility? Or is this code new enough that it doesn't matter?

pouria added inline comments.
sys/netlink/route/rt.c
246

This one is new.
I've added it in 84bb3648d2151 for backward compatibility with dump_rc_nhop. :D

This revision is now accepted and ready to land.Wed, May 27, 9:21 PM