mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 08:44:03 -05:00
Make sure AP interface is initialize before accepting WPS commands
This commit is contained in:
parent
7a649c7dda
commit
48b357a989
@ -324,6 +324,8 @@ void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s,
|
|||||||
|
|
||||||
int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid)
|
int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid)
|
||||||
{
|
{
|
||||||
|
if (!wpa_s->ap_iface)
|
||||||
|
return -1;
|
||||||
return hostapd_wps_button_pushed(wpa_s->ap_iface->bss[0]);
|
return hostapd_wps_button_pushed(wpa_s->ap_iface->bss[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,6 +335,9 @@ int wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|||||||
{
|
{
|
||||||
int ret, ret_len = 0;
|
int ret, ret_len = 0;
|
||||||
|
|
||||||
|
if (!wpa_s->ap_iface)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (pin == NULL) {
|
if (pin == NULL) {
|
||||||
unsigned int rpin = wps_generate_pin();
|
unsigned int rpin = wps_generate_pin();
|
||||||
ret_len = os_snprintf(buf, buflen, "%d", rpin);
|
ret_len = os_snprintf(buf, buflen, "%d", rpin);
|
||||||
|
Loading…
Reference in New Issue
Block a user