]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix wrong AKM priority for FILS
authorSeongsu Choi <seongsu.choi@samsung.com>
Tue, 30 Aug 2022 04:21:16 +0000 (13:21 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 31 Aug 2022 14:02:03 +0000 (17:02 +0300)
According to the OCE specification, the STA shall select the AKM in
priority order from the list below.

1. FT Authentication over FILS (SHA-384) 00-0F-AC:17
2. FILS (SHA-384) 00-0F-AC:15
3. FT Authentication over FILS (SHA-256) 00-0F-AC:16
4. FILS (SHA-256) 00-0F-AC:14
5. FT Authentication using IEEE Std 802.1X (SHA-256) 00-0F-AC:3
6. Authentication using IEEE Std 802.1X (SHA-256) 00-0F-AC:5
7. Authentication using IEEE Std 802.1X 00-0F-AC:1

Move the FT-FILS-SHA256 check to be after the FILS-SHA384 one to match
this.

Signed-off-by: Seongsu Choi <seongsu.choi@samsung.com>
wpa_supplicant/wpa_supplicant.c

index f91609bd70fbf033c1c6c29b16e674e8e68e7903..09ba7cda9d9b27257fff62d6e219183ce5b5066f 100644 (file)
@@ -1691,13 +1691,15 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
        } else if (sel & WPA_KEY_MGMT_FT_FILS_SHA384) {
                wpa_s->key_mgmt = WPA_KEY_MGMT_FT_FILS_SHA384;
                wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT-FILS-SHA384");
-       } else if (sel & WPA_KEY_MGMT_FT_FILS_SHA256) {
-               wpa_s->key_mgmt = WPA_KEY_MGMT_FT_FILS_SHA256;
-               wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT-FILS-SHA256");
 #endif /* CONFIG_IEEE80211R */
        } else if (sel & WPA_KEY_MGMT_FILS_SHA384) {
                wpa_s->key_mgmt = WPA_KEY_MGMT_FILS_SHA384;
                wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FILS-SHA384");
+#ifdef CONFIG_IEEE80211R
+       } else if (sel & WPA_KEY_MGMT_FT_FILS_SHA256) {
+               wpa_s->key_mgmt = WPA_KEY_MGMT_FT_FILS_SHA256;
+               wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT-FILS-SHA256");
+#endif /* CONFIG_IEEE80211R */
        } else if (sel & WPA_KEY_MGMT_FILS_SHA256) {
                wpa_s->key_mgmt = WPA_KEY_MGMT_FILS_SHA256;
                wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FILS-SHA256");