aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-11 14:27:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:51:39 -0500
commit076ae609d20901b5fd9bc19fc4c245624c423970 (patch)
tree5d57012f770ea8cf7493b6db3027f60490412f0c /net
parent53d6f81c7814690ba096584c733e5deaa34fdd8a (diff)
mac80211: disallow moving netns
mac80211 currently assumes init_net for all interfaces, so really will not cope well with network namespaces, at least at this time. To change this, we would have keep track of the netns in addition to the ifindex, which is not something I want to think about right now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/iface.c1
-rw-r--r--net/mac80211/main.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index df94b9365264..e8221180b6c1 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -798,6 +798,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
798 798
799 memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); 799 memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
800 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy)); 800 SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
801 ndev->features |= NETIF_F_NETNS_LOCAL;
801 802
802 /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */ 803 /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */
803 sdata = netdev_priv(ndev); 804 sdata = netdev_priv(ndev);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5667f4e8067f..795f8c4a9fa0 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -916,6 +916,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
916 916
917 memcpy(local->mdev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN); 917 memcpy(local->mdev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
918 SET_NETDEV_DEV(local->mdev, wiphy_dev(local->hw.wiphy)); 918 SET_NETDEV_DEV(local->mdev, wiphy_dev(local->hw.wiphy));
919 local->mdev->features |= NETIF_F_NETNS_LOCAL;
919 920
920 result = register_netdevice(local->mdev); 921 result = register_netdevice(local->mdev);
921 if (result < 0) 922 if (result < 0)