Commit 3e9b4021 authored by Daniel Gabay's avatar Daniel Gabay Committed by Johannes Berg

wifi: mac80211: fix beacon SSID mismatch handling

Return false when memcmp with zero_ssid returns 0 to correctly
handle hidden SSIDs case.

Fixes: 9cc88678 ("wifi: mac80211: check SSID in beacon")
Reviewed-by: default avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: default avatarMiriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: default avatarDaniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20240823105546.7ab29ae287a6.I7f98e57e1ab6597614703fdd138cc88ad253d986@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 27ec3c57
...@@ -6664,7 +6664,7 @@ static bool ieee80211_mgd_ssid_mismatch(struct ieee80211_sub_if_data *sdata, ...@@ -6664,7 +6664,7 @@ static bool ieee80211_mgd_ssid_mismatch(struct ieee80211_sub_if_data *sdata,
return true; return true;
/* hidden SSID: zeroed out */ /* 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 false;
return memcmp(elems->ssid, cfg->ssid, cfg->ssid_len); return memcmp(elems->ssid, cfg->ssid, cfg->ssid_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment