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
Unknown Object (File)
Tue, Mar 24, 7:17 PM
Unknown Object (File)
Sun, Mar 22, 4:38 AM
Unknown Object (File)
Sat, Mar 14, 9:31 PM
Unknown Object (File)
Fri, Mar 13, 6:34 PM
Unknown Object (File)
Wed, Mar 11, 8:51 PM
Unknown Object (File)
Wed, Mar 11, 9:44 AM
Unknown Object (File)
Mon, Mar 9, 9:04 AM
Unknown Object (File)
Sat, Mar 7, 2:56 AM
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