Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route: expose nexthop id attribute #386

Closed
wants to merge 1 commit into from

Commits on May 17, 2024

  1. route: expose nexthop id attribute

    Routes may reference a nexthop (group) via the new nexthop API by its
    ID, so add accessors for setting and getting it.
    
    Referencing a nexthop is mutually exclusive to specifiying nexthops in
    the route, so make sure we do not do that when creating netlink
    messages (which may exist both, since netlink messages from the kernel
    contain both unless 'nexthop_compat_mode' is disabled).
    
    $ ip -6 r
    2001:db8:3::/64 nhid 20 metric 1024 pref medium
    	nexthop via 2001:db8:1::2 dev v0 weight 1
    	nexthop via 2001:db8:2::2 dev v1 weight 1
    
    Before:
    
    $ nl-route-list
    inet6 2001:db8:3::/64 table main type unicast via 2001:db8:1::2 dev v0 via 2001:db8:2::2 dev v1
    
    After:
    
    $ nl-route-list
    inet6 2001:db8:3::/64 table main type unicast nhid 20 via 2001:db8:1::2 dev v0 via 2001:db8:2::2 dev v1
    
    Signed-off-by: Jonas Gorski <[email protected]>
    KanjiMonster committed May 17, 2024
    Configuration menu
    Copy the full SHA
    b4d9941 View commit details
    Browse the repository at this point in the history