Commit 1c5bf998 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

ieee802154: allow netns create of lowpan interface

This patch reverts commit f9d1ce8f ("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: default avatarStefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: default avatarAlexander Aring <aar@pengutronix.de>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 66e5c267
...@@ -130,8 +130,7 @@ static int lowpan_newlink(struct net *src_net, struct net_device *ldev, ...@@ -130,8 +130,7 @@ static int lowpan_newlink(struct net *src_net, struct net_device *ldev,
pr_debug("adding new link\n"); pr_debug("adding new link\n");
if (!tb[IFLA_LINK] || if (!tb[IFLA_LINK])
!net_eq(dev_net(ldev), &init_net))
return -EINVAL; return -EINVAL;
/* find and hold wpan device */ /* find and hold wpan device */
wdev = dev_get_by_index(dev_net(ldev), nla_get_u32(tb[IFLA_LINK])); wdev = dev_get_by_index(dev_net(ldev), nla_get_u32(tb[IFLA_LINK]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment