]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
GAS: Accept GAS response using AP MLD MAC address
authorJouni Malinen <j@w1.fi>
Sat, 13 Jan 2024 10:22:01 +0000 (12:22 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Jan 2024 17:09:31 +0000 (19:09 +0200)
The GAS request may have been issued using a link address of the AP
MLD's affiliated link and the driver may translate that address to the
MLD MAC address when associated with the AP MLD. Accept GAS responses
where the addresses map to the same AP MLD.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/gas_query.c

index c301f7410819f5eb9ab6c0f2ab255d5062299224..0cebe8c10e9d12c6d50384e8b5d460635d4a03c2 100644 (file)
@@ -199,10 +199,16 @@ static struct gas_query_pending *
 gas_query_get_pending(struct gas_query *gas, const u8 *addr, u8 dialog_token)
 {
        struct gas_query_pending *q;
+       struct wpa_supplicant *wpa_s = gas->wpa_s;
+
        dl_list_for_each(q, &gas->pending, struct gas_query_pending, list) {
                if (os_memcmp(q->addr, addr, ETH_ALEN) == 0 &&
                    q->dialog_token == dialog_token)
                        return q;
+               if (wpa_s->valid_links &&
+                   os_memcmp(wpa_s->ap_mld_addr, addr, ETH_ALEN) == 0 &&
+                   wpas_ap_link_address(wpa_s, q->addr))
+                       return q;
        }
        return NULL;
 }