Page MenuHomeFreeBSD

route(8): print nexthop weight in monitor
Needs ReviewPublic

Authored by pouria on Wed, Feb 25, 11:15 AM.
Tags
None
Referenced Files
F146604639: D55506.id.diff
Wed, Mar 4, 1:01 AM
Unknown Object (File)
Sun, Mar 1, 2:56 PM
Unknown Object (File)
Sun, Mar 1, 6:23 AM
Unknown Object (File)
Sun, Mar 1, 3:27 AM
Unknown Object (File)
Sat, Feb 28, 4:21 AM
Unknown Object (File)
Fri, Feb 27, 6:16 PM
Unknown Object (File)
Thu, Feb 26, 5:30 PM
Unknown Object (File)
Thu, Feb 26, 4:27 PM
Subscribers

Details

Reviewers
None
Group Reviewers
network
Summary

Not showing the weight of nexthops in route monitor
is pointless.

I was testing the -weight option in routing subsystem and found out
there is no utility that shows the nexthops of specific route.
After reading the route(8) source code, I found out that route monitor
shows every nexthop of a specific route that is changing.
However, couldn't find their nexthop weight.

This change is also useful for reusing the print_nlmsg_route_nhop for future
implementations.

Test Plan

simply run route monitor and then
add a route with two different gateways.
Result:

# route -n6 monitor
14:33:02.019 PID 1686 add/repl route 3fff::1/128 gw ::1 iface lo0 mtu 16384 weight 1 table inet6.0
						 gw 2001:db8::1 iface vtnet0 mtu 1500 weight 2

Routes with a single nexthop shows weight 0, which is expected for now.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70989
Build 67872: arc lint + arc unit