]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv6: Defer initialization of dst to data path
authorDavid Ahern <dsahern@gmail.com>
Wed, 18 Apr 2018 00:33:15 +0000 (17:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Apr 2018 03:41:16 +0000 (23:41 -0400)
commit229a084a75aa7293319f1b0389340294702398fb
tree36dafe25f191ca6a46a6d60515e94315b6d1e1dd
parent02f1490b95cdad0f60a4a10a3ff2043274edc7f7
net/ipv6: Defer initialization of dst to data path

Defer setting dst input, output and error until fib entry is copied.

The reject path from ip6_route_info_create is moved to a new function
ip6_rt_init_dst_reject with a helper doing the conversion from fib6_type
to dst error.

The remainder of the new ip6_rt_init_dst is an amalgamtion of dst code
from addrconf_dst_alloc and the non-reject path of ip6_route_info_create.
The dst output function is always ip6_output and the input function is
either ip6_input (local routes), ip6_mc_input (multicast routes) or
ip6_forward (anything else).

A couple of places using dst.error are updated to look at rt6i_flags.

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