ieee802154: fix netns settings
6LoWPAN currently doesn't supports x-netns and works only in init_net. With this patch, we ensure that: - the wpan interface cannot be moved to another netns; - the 6lowpan interface cannot be moved to another netns; - the wpan interface is in the same netns than the 6lowpan interface; - the 6lowpan interface is in init_net. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:

committed by
Marcel Holtmann

parent
a715d11e45
commit
f9d1ce8f81
@@ -225,6 +225,7 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb,
|
||||
switch (state) {
|
||||
/* TODO NETDEV_DEVTYPE */
|
||||
case NETDEV_REGISTER:
|
||||
dev->features |= NETIF_F_NETNS_LOCAL;
|
||||
wpan_dev->identifier = ++rdev->wpan_dev_id;
|
||||
list_add_rcu(&wpan_dev->list, &rdev->wpan_dev_list);
|
||||
rdev->devlist_generation++;
|
||||
|
Reference in New Issue
Block a user