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

wiphy: only connect to SAE if feature is supported

This commit is contained in:
James Prestwood 2018-09-24 14:29:52 -07:00 committed by Denis Kenzior
parent 36c441c945
commit 272cb441cd

View File

@ -182,6 +182,17 @@ bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss)
if (rsn_info.mfpr && !wiphy_select_cipher(wiphy, if (rsn_info.mfpr && !wiphy_select_cipher(wiphy,
rsn_info.group_management_cipher)) rsn_info.group_management_cipher))
return false; return false;
/*
* if the AP ONLY supports SAE/WPA3, then we can only connect
* if the wiphy feature is supported. Otherwise the AP may list
* SAE as one of the AKM's but also support PSK (hybrid). In
* this case we still want to allow a connection even if SAE
* is not supported.
*/
if (IE_AKM_IS_SAE(rsn_info.akm_suites) &&
!wiphy_has_feature(wiphy, NL80211_FEATURE_SAE))
return false;
} else if (r != -ENOENT) } else if (r != -ENOENT)
return false; return false;