summaryrefslogtreecommitdiff
path: root/net/ieee802154/6lowpan
diff options
context:
space:
mode:
authorAlexander Aring <aar@pengutronix.de>2016-06-18 10:45:35 +0200
committerMarcel Holtmann <marcel@holtmann.org>2016-07-08 12:20:57 +0200
commit1c5bf998b3dca0599a2cce885619ffc06fc594df (patch)
tree7706441c52848fe4690b5a451f15c803b428687f /net/ieee802154/6lowpan
parent66e5c2672cd11b9310008099faf6a4ffb9dfb6d0 (diff)
ieee802154: allow netns create of lowpan interface
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> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/6lowpan')
-rw-r--r--net/ieee802154/6lowpan/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index 935ab932e841..d7efbf0dad20 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]));