diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-04-09 16:36:50 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-10 04:09:18 -0400 |
commit | c14a74007f3712413140b5d06d4f7691234a8d3b (patch) | |
tree | d60c93156354888bc838ca9eeb9de178a874e71f /net | |
parent | 74f8274103b78bf227711e655656dc737ad2bda7 (diff) |
cfg80211: ignore invalid BSSIDs when looking for BSSes
When looking for a BSS matching given parameters, ignore invalid
BSSIDs. This avoids, for example, trying to join an IBSS that has
a multicast BSSID, which isn't supported by all drivers nor is it
a valid configuration of the IBSS so better create a new one with
a correctly chosen random BSSID.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/scan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 13f611469e6c..cf478c075ddc 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -540,6 +540,8 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | |||
540 | continue; | 540 | continue; |
541 | if (channel && bss->pub.channel != channel) | 541 | if (channel && bss->pub.channel != channel) |
542 | continue; | 542 | continue; |
543 | if (!is_valid_ether_addr(bss->pub.bssid)) | ||
544 | continue; | ||
543 | /* Don't get expired BSS structs */ | 545 | /* Don't get expired BSS structs */ |
544 | if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) && | 546 | if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) && |
545 | !atomic_read(&bss->hold)) | 547 | !atomic_read(&bss->hold)) |