diff options
author | Johannes Berg | 2014-04-09 22:32:16 +0200 |
---|---|---|
committer | Johannes Berg | 2014-04-10 10:09:16 +0200 |
commit | 74f8274103b78bf227711e655656dc737ad2bda7 (patch) | |
tree | c369be9e13c6d5ee51380a0aca5daa9f86f16992 /net/wireless | |
parent | 96998e3a2f6aeb6e7d91f6b1ced98d4b903d75fd (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')
-rw-r--r-- | net/wireless/ibss.c | 3 |
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; |