summaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-07-24 10:59:41 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-27 01:00:51 -0700
commit6673a9f4e35c1f0e9976cd4e88042f87674a6b02 (patch)
treebd80eb6451b6fa61f3edd6960a0dca55be98c1cd /net/ipv6/route.c
parent9267135cca60674321139626f49077a4937d730e (diff)
ipv6: use lwtunnel_output6() only if flag redirect is set
This function make sense only when LWTUNNEL_STATE_OUTPUT_REDIRECT is set. The check is already done in IPv4. CC: Thomas Graf <tgraf@suug.ch> CC: Roopa Prabhu <roopa@cumulusnetworks.com> Fixes: 74a0f2fe8ed5 ("ipv6: rt6_info output redirect to tunnel output") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7f2214f8fde7..f91d2637072b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1780,7 +1780,8 @@ int ip6_route_add(struct fib6_config *cfg)
goto out;
lwtunnel_state_get(lwtstate);
rt->rt6i_lwtstate = lwtstate;
- rt->dst.output = lwtunnel_output6;
+ if (lwtunnel_output_redirect(rt->rt6i_lwtstate))
+ rt->dst.output = lwtunnel_output6;
}
ipv6_addr_prefix(&rt->rt6i_dst.addr, &cfg->fc_dst, cfg->fc_dst_len);