Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] nl80211: fix mgmt tx status and testmode reporting for netns
@ 2013-06-24 11:50 Michal Kazior
  2013-06-24 13:41 ` Johannes Berg
  2013-06-25  7:17 ` [PATCH v2] " Michal Kazior
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Kazior @ 2013-06-24 11:50 UTC (permalink / raw)
  To: linux-wireless, johannes; +Cc: Michal Kazior

These two events were sent to the default network
namespace.

This caused AP mode in a non-default netns to not
work correctly. Mgmt tx status was multicasted to
a different (default) netns instead of the one the
AP was in.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 net/wireless/nl80211.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b14b7e3..7bafce2 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6593,7 +6593,10 @@ void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
 
 	nla_nest_end(skb, data);
 	genlmsg_end(skb, hdr);
-	genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp);
+
+	rcu_read_lock();
+	genlmsg_multicast_allns(skb, 0, nl80211_testmode_mcgrp.id, GFP_ATOMIC);
+	rcu_read_unlock();
 }
 EXPORT_SYMBOL(cfg80211_testmode_event);
 #endif
@@ -10028,7 +10031,8 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
 
 	genlmsg_end(msg, hdr);
 
-	genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
+	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+				nl80211_mlme_mcgrp.id, gfp);
 	return;
 
  nla_put_failure:
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-25  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 11:50 [PATCH] nl80211: fix mgmt tx status and testmode reporting for netns Michal Kazior
2013-06-24 13:41 ` Johannes Berg
2013-06-25  7:17 ` [PATCH v2] " Michal Kazior
2013-06-25  8:50   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox