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

* Re: [PATCH net-next] ipv6: use lwtunnel_output6() only if flag redirect is set
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Graf @ 2015-07-24 10:42 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: davem, netdev, Roopa Prabhu

On 07/24/15 at 10:59am, Nicolas Dichtel wrote:
> 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>

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

* Re: [PATCH net-next] ipv6: use lwtunnel_output6() only if flag redirect is set
  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
  2 siblings, 0 replies; 4+ messages in thread
From: roopa @ 2015-07-24 13:39 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: davem, netdev, Thomas Graf

On 7/24/15, 1:59 AM, Nicolas Dichtel wrote:
> 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: Roopa Prabhu <roopa@cumulusnetworks.com>

thanks

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

* Re: [PATCH net-next] ipv6: use lwtunnel_output6() only if flag redirect is set
  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
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-07-27  8:01 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev, tgraf, roopa

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri, 24 Jul 2015 10:59:41 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[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).