diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index fe0d154f2..4d158a9c6 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -196,6 +196,10 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit) return; } + if ((wpa_s->mac_addr_rand_enable & MAC_ADDR_RAND_SCAN) && + wpa_s->wpa_state <= WPA_SCANNING) + wpa_setup_mac_addr_rand_params(params, wpa_s->mac_addr_scan); + if (wpas_update_random_addr_disassoc(wpa_s) < 0) { wpa_msg(wpa_s, MSG_INFO, "Failed to assign random MAC address for a scan");