GAS: Update source MAC address on preassoc_mac_addr randomization

The GAS query source MAC address was not getting updated correctly when
preassoc_mac_addr is enabled. Fix this by copying the current MAC
address to the GAS query source address.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
This commit is contained in:
Veerendranath Jakkam 2020-08-11 01:31:49 +05:30 committed by Jouni Malinen
parent 1289ecf4cc
commit 43106e122b

View file

@ -694,14 +694,16 @@ static void gas_query_start_cb(struct wpa_radio_work *work, int deinit)
return; return;
} }
if (!query->maintain_addr && !wpa_s->conf->gas_rand_mac_addr && if (!query->maintain_addr && !wpa_s->conf->gas_rand_mac_addr) {
wpas_update_random_addr_disassoc(wpa_s) < 0) { if (wpas_update_random_addr_disassoc(wpa_s) < 0) {
wpa_msg(wpa_s, MSG_INFO, wpa_msg(wpa_s, MSG_INFO,
"Failed to assign random MAC address for GAS"); "Failed to assign random MAC address for GAS");
gas_query_free(query, 1); gas_query_free(query, 1);
radio_work_done(work); radio_work_done(work);
return; return;
} }
os_memcpy(query->sa, wpa_s->own_addr, ETH_ALEN);
}
gas->work = work; gas->work = work;
gas_query_tx_initial_req(gas, query); gas_query_tx_initial_req(gas, query);