]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Restore the flow of set beacon and WPA key init
authorXin Deng <quic_deng@quicinc.com>
Tue, 11 Apr 2023 10:24:58 +0000 (18:24 +0800)
committerJouni Malinen <j@w1.fi>
Wed, 19 Apr 2023 08:47:52 +0000 (11:47 +0300)
hostapd start AP flow changed in commit 931e5d4f9e2e. However, that
could cause a regression in a legacy AP driver where the set key
operation for GTK, IGTK, and BIGTK before AP start (set beacon) would
cause the driver to ignore the key set command. Restore the flow of the
set beacon and WPA key init operations to make sure drivers can receive
and set group keys correctly.

Fixes: 931e5d4f9e2e ("mbssid: Configure all BSSes before beacon setup")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/hostapd.c

index 8b3fb404d33c4a3e324b96c2f2d0b123319af6bd..a20882794b378cc5955e88eac4202044294c63a1 100644 (file)
@@ -1476,11 +1476,11 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
                return -1;
        }
 
-       if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0)
+       if (start_beacon && hostapd_start_beacon(hapd, flush_old_stations) < 0)
                return -1;
 
-       if (start_beacon)
-               return hostapd_start_beacon(hapd, flush_old_stations);
+       if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0)
+               return -1;
 
        return 0;
 }