netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: use lwtunnel_output6() only if flag redirect is set
@ 2015-07-24  8:59 Nicolas Dichtel
  2015-07-24 10:42 ` Thomas Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2015-07-24  8:59 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nicolas Dichtel, Thomas Graf, Roopa Prabhu

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>
---
 net/ipv6/route.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f216cb998628..67b2367126f3 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);
-- 
2.4.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-27  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-24  8:59 [PATCH net-next] ipv6: use lwtunnel_output6() only if flag redirect is set Nicolas Dichtel
2015-07-24 10:42 ` Thomas Graf
2015-07-24 13:39 ` roopa
2015-07-27  8:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).