diff options
author | David Ahern <dsahern@gmail.com> | 2018-02-14 07:32:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-14 22:43:32 +0300 |
commit | 9942895b5ee4b0db53f32fbcb4a51360607aac1b (patch) | |
tree | 81b8c17ab70dd6b085f61fdeb154998b1b6c70c0 /net/ipv6/route.c | |
parent | 64da58528bdbdba171cf6c6ffaf39c2ee75e3a10 (diff) | |
download | linux-9942895b5ee4b0db53f32fbcb4a51360607aac1b.tar.xz |
net: Move ipv4 set_lwt_redirect helper to lwtunnel
IPv4 uses set_lwt_redirect to set the lwtunnel redirect functions as
needed. Move it to lwtunnel.h as lwtunnel_set_redirect and change
IPv6 to also use it.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9dcfadddd800..f0baae26db8f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2671,14 +2671,7 @@ static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg, if (err) goto out; rt->dst.lwtstate = lwtstate_get(lwtstate); - if (lwtunnel_output_redirect(rt->dst.lwtstate)) { - rt->dst.lwtstate->orig_output = rt->dst.output; - rt->dst.output = lwtunnel_output; - } - if (lwtunnel_input_redirect(rt->dst.lwtstate)) { - rt->dst.lwtstate->orig_input = rt->dst.input; - rt->dst.input = lwtunnel_input; - } + lwtunnel_set_redirect(&rt->dst); } ipv6_addr_prefix(&rt->rt6i_dst.addr, &cfg->fc_dst, cfg->fc_dst_len); |