[v2,1/4] batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves

Message ID 1456867148-31883-2-git-send-email-andrew@lunn.ch (mailing list archive)
State Superseded, archived
Delegated to: Marek Lindner
Headers

Commit Message

Andrew Lunn March 1, 2016, 9:19 p.m. UTC
  The batX soft interface should not be moved between network name
spaces. This is similar to bridges, bonds, tunnels, which are not
allowed to move between network namespaces.

Suggested-by: Daniel Ehlers <danielehlers@mindeye.net>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Antonio Quartulli <a@unstable.cc>
---
 net/batman-adv/soft-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Sven Eckelmann March 13, 2016, 9:29 a.m. UTC | #1
On Tuesday 01 March 2016 22:19:05 Andrew Lunn wrote:
> The batX soft interface should not be moved between network name
> spaces. This is similar to bridges, bonds, tunnels, which are not
> allowed to move between network namespaces.
> 
> Suggested-by: Daniel Ehlers <danielehlers@mindeye.net>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Acked-by: Antonio Quartulli <a@unstable.cc>
> ---
>  net/batman-adv/soft-interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Sven Eckelmann <sven@narfation.org>

Andrew, would it be ok for you to apply this patch first while the last 
two/three patches are still discussed? At least this could (when Marek agrees) 
reduce the amount of patches you have to resend each time.

Kind regards,
	Sven
  
Andrew Lunn March 13, 2016, 3:24 p.m. UTC | #2
On Sun, Mar 13, 2016 at 10:29:21AM +0100, Sven Eckelmann wrote:
> On Tuesday 01 March 2016 22:19:05 Andrew Lunn wrote:
> > The batX soft interface should not be moved between network name
> > spaces. This is similar to bridges, bonds, tunnels, which are not
> > allowed to move between network namespaces.
> > 
> > Suggested-by: Daniel Ehlers <danielehlers@mindeye.net>
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > Acked-by: Antonio Quartulli <a@unstable.cc>
> > ---
> >  net/batman-adv/soft-interface.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Sven Eckelmann <sven@narfation.org>
> 
> Andrew, would it be ok for you to apply this patch first while the last 
> two/three patches are still discussed?

Sure, no problem. Please take it.

      Andrew
  
Marek Lindner April 21, 2016, 10:48 a.m. UTC | #3
On Sunday, March 13, 2016 16:24:23 Andrew Lunn wrote:
> On Sun, Mar 13, 2016 at 10:29:21AM +0100, Sven Eckelmann wrote:
> > On Tuesday 01 March 2016 22:19:05 Andrew Lunn wrote:
> > > The batX soft interface should not be moved between network name
> > > spaces. This is similar to bridges, bonds, tunnels, which are not
> > > allowed to move between network namespaces.
> > >
> > > 
> > >
> > > Suggested-by: Daniel Ehlers <danielehlers@mindeye.net>
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > Acked-by: Antonio Quartulli <a@unstable.cc>
> > > ---
> > >
> > >  net/batman-adv/soft-interface.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > 
> >
> > Reviewed-by: Sven Eckelmann <sven@narfation.org>
> >
> > 
> >
> > Andrew, would it be ok for you to apply this patch first while the last 
> > two/three patches are still discussed?
> 
> Sure, no problem. Please take it.

Applied in revision 34199a6.

Thanks,
Marek
  

Patch

diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 7679f3a..f4aa60a 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -955,7 +955,7 @@  static void batadv_softif_init_early(struct net_device *dev)
 
 	dev->netdev_ops = &batadv_netdev_ops;
 	dev->destructor = batadv_softif_free;
-	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_NETNS_LOCAL;
 	dev->priv_flags |= IFF_NO_QUEUE;
 
 	/* can't call min_mtu, because the needed variables