diff options
author | Daniel Gabay <daniel.gabay@intel.com> | 2024-08-23 10:55:46 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-08-26 17:33:51 +0200 |
commit | 3e9b4021fedf92c11233ae1a8615327d0cbbecd5 (patch) | |
tree | dda1f9704b13fdf71f63e21b37d17f2eafa9fe81 | |
parent | wifi: mwifiex: duplicate static structs used in driver instances (diff) | |
download | linux-3e9b4021fedf92c11233ae1a8615327d0cbbecd5.tar.xz linux-3e9b4021fedf92c11233ae1a8615327d0cbbecd5.zip |
wifi: mac80211: fix beacon SSID mismatch handling
Return false when memcmp with zero_ssid returns 0 to correctly
handle hidden SSIDs case.
Fixes: 9cc88678db5b ("wifi: mac80211: check SSID in beacon")
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20240823105546.7ab29ae287a6.I7f98e57e1ab6597614703fdd138cc88ad253d986@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/mlme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4779a18ab75d..f9526bbc3633 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -6664,7 +6664,7 @@ static bool ieee80211_mgd_ssid_mismatch(struct ieee80211_sub_if_data *sdata, return true; /* hidden SSID: zeroed out */ - if (memcmp(elems->ssid, zero_ssid, elems->ssid_len)) + if (!memcmp(elems->ssid, zero_ssid, elems->ssid_len)) return false; return memcmp(elems->ssid, cfg->ssid, cfg->ssid_len); |