All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
@ 2020-01-16  9:43 Niko Kortstrom
  2020-01-16 14:02 ` Nicolas Dichtel
  2020-01-20  9:01 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Niko Kortstrom @ 2020-01-16  9:43 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji; +Cc: netdev, Niko Kortstrom

Support for moving IPv4 GRE tunnels between namespaces was added in
commit b57708add314 ("gre: add x-netns support"). The respective change
for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
namespaces.

Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>
---
 net/ipv6/ip6_gre.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index ee968d980746..55bfc5149d0c 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1466,7 +1466,6 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
 		dev->mtu -= 8;
 
 	if (tunnel->parms.collect_md) {
-		dev->features |= NETIF_F_NETNS_LOCAL;
 		netif_keep_dst(dev);
 	}
 	ip6gre_tnl_init_features(dev);
@@ -1894,7 +1893,6 @@ static void ip6gre_tap_setup(struct net_device *dev)
 	dev->needs_free_netdev = true;
 	dev->priv_destructor = ip6gre_dev_free;
 
-	dev->features |= NETIF_F_NETNS_LOCAL;
 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 	netif_keep_dst(dev);
@@ -2197,7 +2195,6 @@ static void ip6erspan_tap_setup(struct net_device *dev)
 	dev->needs_free_netdev = true;
 	dev->priv_destructor = ip6gre_dev_free;
 
-	dev->features |= NETIF_F_NETNS_LOCAL;
 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 	netif_keep_dst(dev);
-- 
2.24.1


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

* Re: [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
  2020-01-16  9:43 [PATCH] net: ip6_gre: fix moving ip6gre between namespaces Niko Kortstrom
@ 2020-01-16 14:02 ` Nicolas Dichtel
  2020-01-16 14:43   ` kortstro
  2020-01-20  9:01 ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Dichtel @ 2020-01-16 14:02 UTC (permalink / raw)
  To: Niko Kortstrom, davem, kuznet, yoshfuji; +Cc: netdev

Le 16/01/2020 à 10:43, Niko Kortstrom a écrit :
> Support for moving IPv4 GRE tunnels between namespaces was added in
> commit b57708add314 ("gre: add x-netns support"). The respective change
> for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
> did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
> another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
> ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
> namespaces.
> 
> Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>
LGTM.
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Did you test real x-vrf cases with the three kinds of gre interfaces
(gre/collect_md, gretap and erspan)?

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

* Re: [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
  2020-01-16 14:02 ` Nicolas Dichtel
@ 2020-01-16 14:43   ` kortstro
  2020-01-16 16:00     ` Nicolas Dichtel
  0 siblings, 1 reply; 6+ messages in thread
From: kortstro @ 2020-01-16 14:43 UTC (permalink / raw)
  To: nicolas.dichtel, davem, kuznet, yoshfuji; +Cc: netdev

On 1/16/20 4:02 PM, Nicolas Dichtel wrote:
> Le 16/01/2020 à 10:43, Niko Kortstrom a écrit :
>> Support for moving IPv4 GRE tunnels between namespaces was added in
>> commit b57708add314 ("gre: add x-netns support"). The respective change
>> for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
>> did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
>> another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
>> ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
>> namespaces.
>>
>> Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>
> LGTM.
> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>
> Did you test real x-vrf cases with the three kinds of gre interfaces
> (gre/collect_md, gretap and erspan)?
This was only verified in real use with ip6gretap.

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

* Re: [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
  2020-01-16 14:43   ` kortstro
@ 2020-01-16 16:00     ` Nicolas Dichtel
  2020-01-17 23:52       ` William Tu
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Dichtel @ 2020-01-16 16:00 UTC (permalink / raw)
  To: kortstro, davem, kuznet, yoshfuji; +Cc: netdev, William Tu

+ William Tu

Le 16/01/2020 à 15:43, kortstro a écrit :
> On 1/16/20 4:02 PM, Nicolas Dichtel wrote:
>> Le 16/01/2020 à 10:43, Niko Kortstrom a écrit :
>>> Support for moving IPv4 GRE tunnels between namespaces was added in
>>> commit b57708add314 ("gre: add x-netns support"). The respective change
>>> for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
>>> did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
>>> another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
>>> ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
>>> namespaces.
>>>
>>> Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>
>> LGTM.
>> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>>
>> Did you test real x-vrf cases with the three kinds of gre interfaces
>> (gre/collect_md, gretap and erspan)?
> This was only verified in real use with ip6gretap.
William, did you set this flag on collect_md interfaces because you did not test
this feature or was it another reason?

Note: the flag was added here: 6712abc168eb ("ip6_gre: add ip6 gre and gretap
collect_md mode").

Regards,
Nicolas

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

* Re: [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
  2020-01-16 16:00     ` Nicolas Dichtel
@ 2020-01-17 23:52       ` William Tu
  0 siblings, 0 replies; 6+ messages in thread
From: William Tu @ 2020-01-17 23:52 UTC (permalink / raw)
  To: nicolas.dichtel
  Cc: kortstro, David Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	Linux Kernel Network Developers

On Thu, Jan 16, 2020 at 8:00 AM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
>
> + William Tu
>
> Le 16/01/2020 à 15:43, kortstro a écrit :
> > On 1/16/20 4:02 PM, Nicolas Dichtel wrote:
> >> Le 16/01/2020 à 10:43, Niko Kortstrom a écrit :
> >>> Support for moving IPv4 GRE tunnels between namespaces was added in
> >>> commit b57708add314 ("gre: add x-netns support"). The respective change
> >>> for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
> >>> did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
> >>> another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
> >>> ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
> >>> namespaces.
> >>>
> >>> Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>
> >> LGTM.
> >> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Hi Nicolas,

I did not test moving between namespaces at that time.
Your change looks good to me.

Acked-by: William Tu <u9012063@gmail.com>

Thanks
William

> >>
> >> Did you test real x-vrf cases with the three kinds of gre interfaces
> >> (gre/collect_md, gretap and erspan)?
> > This was only verified in real use with ip6gretap.
> William, did you set this flag on collect_md interfaces because you did not test
> this feature or was it another reason?
>
> Note: the flag was added here: 6712abc168eb ("ip6_gre: add ip6 gre and gretap
> collect_md mode").
>
> Regards,
> Nicolas

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

* Re: [PATCH] net: ip6_gre: fix moving ip6gre between namespaces
  2020-01-16  9:43 [PATCH] net: ip6_gre: fix moving ip6gre between namespaces Niko Kortstrom
  2020-01-16 14:02 ` Nicolas Dichtel
@ 2020-01-20  9:01 ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2020-01-20  9:01 UTC (permalink / raw)
  To: niko.kortstrom; +Cc: kuznet, yoshfuji, netdev

From: Niko Kortstrom <niko.kortstrom@nokia.com>
Date: Thu, 16 Jan 2020 11:43:27 +0200

> Support for moving IPv4 GRE tunnels between namespaces was added in
> commit b57708add314 ("gre: add x-netns support"). The respective change
> for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support")
> did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to
> another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from
> ip6gre tunnels to allow moving ip6gre tunnel endpoints between network
> namespaces.
> 
> Signed-off-by: Niko Kortstrom <niko.kortstrom@nokia.com>

Applied, thanks.

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

end of thread, other threads:[~2020-01-20  9:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16  9:43 [PATCH] net: ip6_gre: fix moving ip6gre between namespaces Niko Kortstrom
2020-01-16 14:02 ` Nicolas Dichtel
2020-01-16 14:43   ` kortstro
2020-01-16 16:00     ` Nicolas Dichtel
2020-01-17 23:52       ` William Tu
2020-01-20  9:01 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.