Message ID | 20200116094327.11747-1-niko.kortstrom@nokia.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | net: ip6_gre: fix moving ip6gre between namespaces | expand |
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)?
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 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
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
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.
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);
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(-)