summaryrefslogtreecommitdiff
path: root/net/wireless/ibss.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-04-09 22:32:16 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-04-10 10:09:16 +0200
commit74f8274103b78bf227711e655656dc737ad2bda7 (patch)
treec369be9e13c6d5ee51380a0aca5daa9f86f16992 /net/wireless/ibss.c
parent96998e3a2f6aeb6e7d91f6b1ced98d4b903d75fd (diff)
cfg80211: reject invalid IBSS BSSIDs in wext compat code
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>
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r--net/wireless/ibss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index e16cc132c58a..f55f6ffcfcec 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;