3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 23:09:34 +01:00

station: Make sure bss_match also matches the ssid

Kernel might report hidden BSSes that are reported from beacon frames
separately than ones reported due to probe responses.  This may confuse
the station network collation logic since the scan_bss generated by the
probe response might be removed erroneously when processing the scan_bss
that was generated due to a beacon.

Make sure that bss_match also takes the SSID into account and only
matches scan_bss structures that have the same BSSID and SSID contents.
This commit is contained in:
Denis Kenzior 2021-02-03 12:55:18 -06:00
parent 8fd6985214
commit 9af25d937d

View File

@ -375,7 +375,13 @@ static bool bss_match(const void *a, const void *b)
const struct scan_bss *bss_a = a; const struct scan_bss *bss_a = a;
const struct scan_bss *bss_b = b; const struct scan_bss *bss_b = b;
return !memcmp(bss_a->addr, bss_b->addr, sizeof(bss_a->addr)); if (memcmp(bss_a->addr, bss_b->addr, sizeof(bss_a->addr)))
return false;
if (bss_a->ssid_len != bss_b->ssid_len)
return false;
return !memcmp(bss_a->ssid, bss_b->ssid, bss_a->ssid_len);
} }
struct bss_expiration_data { struct bss_expiration_data {