]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix PASN auth alg check on big-endian CPUs
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:25:31 +0000 (11:25 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 09:25:31 +0000 (11:25 +0200)
auth_type is set to a value that is already converted to host byte order
and as such the following comparison must not convert the defined value
to little-endian byte order.

Fixes: 58a96187eed8 ("nl80211: Allow PASN Authentication frames with random (foreign) MAC address")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211_event.c

index 354f18d289aecaf7c4e454a644b7ca5b371f97be..a58fff2022128eb6a1dfc5f5e686ec6f6f679fd4 100644 (file)
@@ -1721,7 +1721,7 @@ static void mlme_event(struct i802_bss *bss,
        }
 
        if (cmd == NL80211_CMD_FRAME && stype == WLAN_FC_STYPE_AUTH &&
-           auth_type == host_to_le16(WLAN_AUTH_PASN)) {
+           auth_type == WLAN_AUTH_PASN) {
                wpa_printf(MSG_DEBUG,
                           "nl80211: %s: Allow PASN frame for foreign address",
                           bss->ifname);