]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Fix authorized MAC removal
authorJouni Malinen <j@w1.fi>
Sat, 13 Jan 2024 21:11:08 +0000 (23:11 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Jan 2024 21:47:20 +0000 (23:47 +0200)
Missing array referencing ended up only the first entry in the list to
be compared.

Fixes: 31fcea931d91 ("WPS 2.0: Add support for AuthorizedMACs attribute")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/wps/wps_registrar.c

index 9587293d0f887497c8f0376f2c8ab4346eec508d..2b9c469aa6ed8d1b8239b1f310fcd63c2e9b8da5 100644 (file)
@@ -259,7 +259,7 @@ static void wps_registrar_remove_authorized_mac(struct wps_registrar *reg,
        wpa_printf(MSG_DEBUG, "WPS: Remove authorized MAC " MACSTR,
                   MAC2STR(addr));
        for (i = 0; i < WPS_MAX_AUTHORIZED_MACS; i++) {
-               if (os_memcmp(reg->authorized_macs, addr, ETH_ALEN) == 0)
+               if (os_memcmp(reg->authorized_macs[i], addr, ETH_ALEN) == 0)
                        break;
        }
        if (i == WPS_MAX_AUTHORIZED_MACS) {