mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-19 18:43:03 -05:00
wpa_s AP mode: Fix regression in P2P AP mode setup
Commit c76e5d7f9b7a4ed8c201f280a04e579d52765572 moved the ap_configured_cb() call into a completion callback from AP mode code. However, this callback can be called before hostap_setup_interface() returns. In that case, the ap_configured_cb() ended up getting called before the wpa_supplicant connection information was updated. Fix this by reordering code to set up everything before calling hostapd_setup_interface().
This commit is contained in:
parent
4378fc14eb
commit
e73edcaa6a
@ -447,16 +447,16 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
|
||||
hapd_iface->bss[0]->driver = wpa_s->driver;
|
||||
hapd_iface->bss[0]->drv_priv = wpa_s->drv_priv;
|
||||
|
||||
wpa_s->current_ssid = ssid;
|
||||
os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN);
|
||||
wpa_s->assoc_freq = ssid->frequency;
|
||||
|
||||
if (hostapd_setup_interface(wpa_s->ap_iface)) {
|
||||
wpa_printf(MSG_ERROR, "Failed to initialize AP interface");
|
||||
wpa_supplicant_ap_deinit(wpa_s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
wpa_s->current_ssid = ssid;
|
||||
os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN);
|
||||
wpa_s->assoc_freq = ssid->frequency;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user