nhop_get_nhop_internal() looks up nhops based on priv hash.
only return nhops with different metrics if the input nexthop's
metric is zero.
Depends on: D56323
Differential D57007
routing: Allow nhop reuse in nhgrp with different metric Authored by pouria on May 14 2026, 9:45 PM. Tags None Referenced Files
Details nhop_get_nhop_internal() looks up nhops based on priv hash. Depends on: D56323 Add two nexthops with different metric and delete one of them. # route -n6 add 3fff:a::/64 -gateway fe80::5a9c:fcff:fe10:2%vtnet1 -metric 2 add net 3fff:a::/64: gateway fe80::5a9c:fcff:fe10:2%vtnet1 fib 0 # route -n6 add 3fff:a::/64 -gateway fe80::5a9c:fcff:fe10:2%vtnet1 add net 3fff:a::/64: gateway fe80::5a9c:fcff:fe10:2%vtnet1 fib 0 # route -on6 get 3fff:a::/64 route to: 3fff:a:: destination: 3fff:a:: mask: ffff:ffff:ffff:ffff:: fib: 0 flags: <UP,GATEWAY,DONE,STATIC> nhops: 2 via gw fe80::5a9c:fcff:fe10:2%vtnet1 iface vtnet1 metric 2 weight 1 mtu 1500 table inet6.0 via gw fe80::5a9c:fcff:fe10:2%vtnet1 iface vtnet1 metric 1 weight 1 mtu 1500 # route -n6 del 3fff:a::/64 -gateway fe80::5a9c:fcff:fe10:2%vtnet1 -metric 2 del net 3fff:a::/64: gateway fe80::5a9c:fcff:fe10:2%vtnet1 fib 0 # route -on6 get 3fff:a::/64 route to: 3fff:a:: destination: 3fff:a:: mask: ffff:ffff:ffff:ffff:: fib: 0 flags: <UP,GATEWAY,DONE,STATIC> nhops: 0 via gw fe80::5a9c:fcff:fe10:2%vtnet1 iface vtnet1 metric 1 weight 0 mtu 1500 table inet6.0
Diff Detail
Event Timeline
Comment Actions Document metric != 0 condition by replacing it with macro name.
Comment Actions Address @markj comment.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||