Commit 6673a9f4 authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller

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: 74a0f2fe ("ipv6: rt6_info output redirect to tunnel output")
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: default avatarThomas Graf <tgraf@suug.ch>
Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9267135c
...@@ -1780,6 +1780,7 @@ int ip6_route_add(struct fib6_config *cfg) ...@@ -1780,6 +1780,7 @@ int ip6_route_add(struct fib6_config *cfg)
goto out; goto out;
lwtunnel_state_get(lwtstate); lwtunnel_state_get(lwtstate);
rt->rt6i_lwtstate = lwtstate; rt->rt6i_lwtstate = lwtstate;
if (lwtunnel_output_redirect(rt->rt6i_lwtstate))
rt->dst.output = lwtunnel_output6; rt->dst.output = lwtunnel_output6;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment