linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cfg80211: reject invalid IBSS BSSIDs in wext compat code
@ 2014-04-09 20:39 Johannes Berg
  2014-04-09 20:39 ` [PATCH 2/2] cfg80211: ignore invalid BSSIDs when looking for BSSes Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2014-04-09 20:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: stefan.pietsch, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Don't allow using a multicast address as the BSSID, that
isn't a valid configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/ibss.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index 071e99c75e82..a953a60b4f41 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -481,6 +481,9 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev,
 	if (is_zero_ether_addr(bssid) || is_broadcast_ether_addr(bssid))
 		bssid = NULL;
 
+	if (bssid && !is_valid_ether_addr(bssid))
+		return -EINVAL;
+
 	/* both automatic */
 	if (!bssid && !wdev->wext.ibss.bssid)
 		return 0;
-- 
1.9.0


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

end of thread, other threads:[~2014-04-10  8:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 20:39 [PATCH 1/2] cfg80211: reject invalid IBSS BSSIDs in wext compat code Johannes Berg
2014-04-09 20:39 ` [PATCH 2/2] cfg80211: ignore invalid BSSIDs when looking for BSSes Johannes Berg
2014-04-10  7:00   ` Antonio Quartulli
2014-04-10  7:59     ` Johannes Berg
2014-04-10  8:25       ` Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).