diff mbox

[RESEND,bluetooth-next,3/3] ieee802154: allow netns create of lowpan interface

Message ID 20160618084535.4699-3-aar@pengutronix.de (mailing list archive)
State Accepted
Headers show

Commit Message

Alexander Aring June 18, 2016, 8:45 a.m. UTC
This patch reverts commit f9d1ce8f81eb ("ieee802154: fix netns settings").
The lowpan interface need to be created inside the net namespace where
the wpan interface is available. The wpan namespace can be changed only
by nl802154 before. Without this patch it's not possible to create a
lowpan interface for a wpan interface which isn't inside init_net
namespace.

Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Alexander Aring <aar@pengutronix.de>
---
 net/ieee802154/6lowpan/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Marcel Holtmann June 27, 2016, 6:10 a.m. UTC | #1
Hi Alex,

> This patch reverts commit f9d1ce8f81eb ("ieee802154: fix netns settings").
> The lowpan interface need to be created inside the net namespace where
> the wpan interface is available. The wpan namespace can be changed only
> by nl802154 before. Without this patch it's not possible to create a
> lowpan interface for a wpan interface which isn't inside init_net
> namespace.
> 
> Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/ieee802154/6lowpan/core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index 8c004a0..ee74df6 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -130,8 +130,7 @@  static int lowpan_newlink(struct net *src_net, struct net_device *ldev,
 
 	pr_debug("adding new link\n");
 
-	if (!tb[IFLA_LINK] ||
-	    !net_eq(dev_net(ldev), &init_net))
+	if (!tb[IFLA_LINK])
 		return -EINVAL;
 	/* find and hold wpan device */
 	wdev = dev_get_by_index(dev_net(ldev), nla_get_u32(tb[IFLA_LINK]));