]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Allow routes to use nexthop objects
authorDavid Ahern <dsahern@gmail.com>
Sat, 8 Jun 2019 21:53:34 +0000 (14:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2019 17:44:57 +0000 (10:44 -0700)
commitd6920b00465b63f379196e6375944702639e607c
tree2e1bca429dcd237fbb858a42e5b5382eaf9f3bd3
parentba0a806518fee36662ecdc42ea4aecb0ef3c300c
ipv6: Allow routes to use nexthop objects

Add support for RTA_NH_ID attribute to allow a user to specify a
nexthop id to use with a route. fc_nh_id is added to fib6_config to
hold the value passed in the RTA_NH_ID attribute. If a nexthop id
is given, the gateway, device, encap and multipath attributes can
not be set.

Update ip6_route_del to check metric and protocol before nexthop
specs. If fc_nh_id is set, then it must match the id in the route
entry. Since IPv6 allows delete of a cached entry (an exception),
add ip6_del_cached_rt_nh to cycle through all of the fib6_nh in
a fib entry if it is using a nexthop.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_fib.h
net/ipv6/route.c