mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
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>
This commit is contained in:
parent
74f8274103
commit
c14a74007f
1 changed files with 2 additions and 0 deletions
|
@ -540,6 +540,8 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
|
||||||
continue;
|
continue;
|
||||||
if (channel && bss->pub.channel != channel)
|
if (channel && bss->pub.channel != channel)
|
||||||
continue;
|
continue;
|
||||||
|
if (!is_valid_ether_addr(bss->pub.bssid))
|
||||||
|
continue;
|
||||||
/* Don't get expired BSS structs */
|
/* Don't get expired BSS structs */
|
||||||
if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
|
if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
|
||||||
!atomic_read(&bss->hold))
|
!atomic_read(&bss->hold))
|
||||||
|
|
Loading…
Reference in a new issue