]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Create init helper for fib6_nh
authorDavid Ahern <dsahern@gmail.com>
Thu, 28 Mar 2019 03:53:50 +0000 (20:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2019 17:48:03 +0000 (10:48 -0700)
commitae08c0dc9e49eee0903446bef8a85b155f5ac7b9
treed9071d0da220d818ea4a54d808218fa33e33b42f
parent7b42b539c204f6bdb0139df87f3fec6dcd35371d
ipv6: Create init helper for fib6_nh

Similar to IPv4, consolidate the fib6_nh initialization into a helper.
As a new standalone function, add a cleanup path to put lwtstate on
error.

To avoid modifying fib6_config flags, move the reject check to a helper
that is invoked once by fib6_nh_init to reset the device and then
again in ip6_route_info_create to set the fib6_flags.

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