From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH] mac80211: disallow moving netns
Date: Wed, 11 Feb 2009 20:27:30 +0100 [thread overview]
Message-ID: <1234380450.16004.42.camel@johannes.local> (raw)
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>
---
net/mac80211/iface.c | 1 +
net/mac80211/main.c | 1 +
2 files changed, 2 insertions(+)
--- wireless-testing.orig/net/mac80211/iface.c 2009-02-11 20:17:10.000000000 +0100
+++ wireless-testing/net/mac80211/iface.c 2009-02-11 20:18:14.000000000 +0100
@@ -810,6 +810,7 @@ int ieee80211_if_add(struct ieee80211_lo
memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
+ ndev->features |= NETIF_F_NETNS_LOCAL;
/* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */
sdata = netdev_priv(ndev);
--- wireless-testing.orig/net/mac80211/main.c 2009-02-11 20:17:10.000000000 +0100
+++ wireless-testing/net/mac80211/main.c 2009-02-11 20:18:15.000000000 +0100
@@ -922,6 +922,7 @@ int ieee80211_register_hw(struct ieee802
memcpy(local->mdev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
SET_NETDEV_DEV(local->mdev, wiphy_dev(local->hw.wiphy));
+ local->mdev->features |= NETIF_F_NETNS_LOCAL;
result = register_netdevice(local->mdev);
if (result < 0)
reply other threads:[~2009-02-11 19:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234380450.16004.42.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=ebiederm@xmission.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox