]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Always include WPA_STA_AUTHORIZED in station flags mask
authorIlan Peer <ilan.peer@intel.com>
Tue, 28 Nov 2023 10:14:10 +0000 (12:14 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 6 Dec 2023 19:54:08 +0000 (21:54 +0200)
As otherwise, the underlying driver would not handle a change
in the 'authorized' state.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/ap_drv_ops.c

index 883243d5c40721ecd410e4fa52e0fa8165e78c36..11a4eac8223c8b53178621808296a9e88d5e72e2 100644 (file)
@@ -311,7 +311,8 @@ int hostapd_set_sta_flags(struct hostapd_data *hapd, struct sta_info *sta)
 {
        int set_flags, total_flags, flags_and, flags_or;
        total_flags = hostapd_sta_flags_to_drv(sta->flags);
-       set_flags = WPA_STA_SHORT_PREAMBLE | WPA_STA_WMM | WPA_STA_MFP;
+       set_flags = WPA_STA_SHORT_PREAMBLE | WPA_STA_WMM | WPA_STA_MFP |
+               WPA_STA_AUTHORIZED;
 
        /*
         * All the station flags other than WPA_STA_SHORT_PREAMBLE are relevant
@@ -328,10 +329,6 @@ int hostapd_set_sta_flags(struct hostapd_data *hapd, struct sta_info *sta)
                return 0;
        }
 
-       if (((!hapd->conf->ieee802_1x && !hapd->conf->wpa) ||
-            sta->auth_alg == WLAN_AUTH_FT) &&
-           sta->flags & WLAN_STA_AUTHORIZED)
-               set_flags |= WPA_STA_AUTHORIZED;
        flags_or = total_flags & set_flags;
        flags_and = total_flags | ~set_flags;
        return hostapd_sta_set_flags(hapd, sta->addr, total_flags,