All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <a@unstable.cc>
To: Andrew Lunn <andrew@lunn.ch>
Cc: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves
Date: Sun, 24 Jan 2016 14:19:59 +0800	[thread overview]
Message-ID: <20160124061959.GC6148@prodigo.lan> (raw)
In-Reply-To: <20160123172006.GA3880@lunn.ch>

On Sat, Jan 23, 2016 at 06:20:06PM +0100, Andrew Lunn wrote:
> On Sat, Jan 23, 2016 at 10:06:37AM +0800, Antonio Quartulli wrote:
> > On Wed, Jan 20, 2016 at 06:48:27PM +0100, 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.
> > > 
> > 
> > Andrew,
> > I understand bridges and other similar interfaces do the same, but what
> > is the real reason for preventing a batman soft-interface from moving
> > between namespaces?
> 
> Humm, actually, a good question. I blindly copied this code without
> thinking about it.
> 
> One clear answer is the notification mechanism, used by
> batadv_hard_if_event(). As far as i can see, such events are only sent
> within the interfaces namespace. So for example you hot unplug a hard
> interface which the soft interface is using, you would not get the
> NETDEV_DOWN event if the soft interface is in a different namespace.

This raises another question (maybe addressed by another of your patch?): what
happens if an hard-interface currently enslaved in bat0 changes namespace?
Will this result in an UNREGISTER event like when the interface gets destroyed?
If not, I am not sure how the whole situation can still be consistent.

> 
> Now that i think of it, there are a few other reasons. All the
> interface management calls, and displaying of interface names would
> have to contains the namespace. Otherwise you look at the output for
> 'batctl o' and have no idea which namespace that wlan0 interface is
> from. Remember, interface names are only unique within a namespace,
> not across namespaces.

Yeah, it make sense. If the softif is in the same ns as the hardifs, it is
definitely necessary to prevent bat0 from jumping from a namespace to another.

Cheers,

-- 
Antonio Quartulli

  reply	other threads:[~2016-01-24  6:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 17:48 [B.A.T.M.A.N.] [PATCH 0/4] batman-adv: Add network name space support Andrew Lunn
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves Andrew Lunn
2016-01-23  2:06   ` Antonio Quartulli
2016-01-23 17:20     ` Andrew Lunn
2016-01-24  6:19       ` Antonio Quartulli [this message]
2016-01-24 10:42         ` Antonio Quartulli
2016-01-24 16:46           ` Andrew Lunn
2016-01-24 11:01   ` Antonio Quartulli
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: Create batman soft interfaces within correct netns Andrew Lunn
2016-01-25  3:28   ` Antonio Quartulli
2016-01-25 13:12     ` Andrew Lunn
2016-01-26  5:43       ` Antonio Quartulli
2016-01-26  5:55   ` Antonio Quartulli
2016-01-31 13:26   ` Sven Eckelmann
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: Handle parent interfaces in a different netns Andrew Lunn
2016-01-26 12:53   ` Antonio Quartulli
2016-01-26 13:25     ` Sven Eckelmann
2016-01-27 10:13   ` Sven Eckelmann
2016-01-27 10:44     ` Antonio Quartulli
2016-02-01  2:57     ` Antonio Quartulli
2016-02-02  2:11       ` Andrew Lunn
2016-01-31 13:26   ` Sven Eckelmann
2016-01-20 17:48 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: debugfs: Add netns support Andrew Lunn
2016-01-28  1:28   ` Antonio Quartulli
2016-01-28  1:40     ` Andrew Lunn
2016-01-28  2:29       ` Antonio Quartulli
2016-01-31 13:26   ` Sven Eckelmann
2016-01-28  2:59 ` [B.A.T.M.A.N.] [PATCH 0/4] batman-adv: Add network name space support Antonio Quartulli
2016-01-28  3:50   ` Andrew Lunn
2016-01-31 13:26 ` Sven Eckelmann
2016-02-12 15:57   ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160124061959.GC6148@prodigo.lan \
    --to=a@unstable.cc \
    --cc=andrew@lunn.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.