Page MenuHomeFreeBSD

route(8): Add metric argument
AcceptedPublic

Authored by pouria on Thu, Apr 9, 10:58 PM.
Tags
None
Referenced Files
F152506250: D56335.id175230.diff
Wed, Apr 15, 9:42 AM
Unknown Object (File)
Tue, Apr 14, 1:50 PM
Unknown Object (File)
Tue, Apr 14, 2:31 AM
Unknown Object (File)
Mon, Apr 13, 9:01 PM
Unknown Object (File)
Mon, Apr 13, 9:00 PM
Unknown Object (File)
Mon, Apr 13, 12:49 PM
Unknown Object (File)
Mon, Apr 13, 10:08 AM
Unknown Object (File)
Fri, Apr 10, 10:13 AM
Subscribers

Details

Reviewers
melifaro
markj
glebius
Group Reviewers
network
Summary

Add support for metric in route command.

Test Plan
[root@ftsr1] [~] # route -n6 add -net 3fff::/64 -gateway ::2 -weight 3 -metric 3
add net 3fff::/64: gateway ::2 fib 0
[root@ftsr1] [~] # netstat -On6W
Nexthop groups data

Internet6:
GrpIdx  NhIdx     Weight   Slots                                 Gateway     Netif  Refcnt
11        ------- ------- ------- --------------------------------------- ---------       2
9       2      25                                     ::3       lo0
10       3      39                                     ::2       lo0
[root@ftsr1] [~] # route -n6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
gateway: ::3
fib: 0
interface: lo0
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe  sendpipe  ssthresh  rtt,msec    mtu       metric    weight    expire
0         0         0         0     16384         3         2         0
[root@ftsr1] [~] # route -on6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
fib: 0
flags: <UP,GATEWAY,DONE,STATIC>
nhops: 2
via gw ::3 iface lo0 metric 3 weight 2 mtu 16384 table inet6.0
via gw ::2 iface lo0 metric 3 weight 3 mtu 16384
[root@ftsr1] [~] # route -n6 add -net 3fff::/64 -gateway ::1 -weight 3 -metric 1
add net 3fff::/64: gateway ::1 fib 0
[root@ftsr1] [~] # route -n6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
gateway: ::3
fib: 0
interface: lo0
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe  sendpipe  ssthresh  rtt,msec    mtu       metric    weight    expire
0         0         0         0     16384         3         2         0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72108
Build 68991: arc lint + arc unit