mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 11:48:23 -05:00
WPS: Reschedule AP configuration reload on EAP completion
Reduce race condition of the station trying to reconnect immediately after AP reconfiguration through WPS by rescheduling the reload timeout to happen after EAP completion rather than the originally scheduled 100 ms after new configuration became known. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
04e6278848
commit
7b75c30109
@ -29,6 +29,7 @@
|
|||||||
#include "pmksa_cache_auth.h"
|
#include "pmksa_cache_auth.h"
|
||||||
#include "ap_config.h"
|
#include "ap_config.h"
|
||||||
#include "ap_drv_ops.h"
|
#include "ap_drv_ops.h"
|
||||||
|
#include "wps_hostapd.h"
|
||||||
#include "ieee802_1x.h"
|
#include "ieee802_1x.h"
|
||||||
|
|
||||||
|
|
||||||
@ -2128,5 +2129,6 @@ static void ieee802_1x_finished(struct hostapd_data *hapd,
|
|||||||
os_sleep(0, 10000);
|
os_sleep(0, 10000);
|
||||||
ap_sta_disconnect(hapd, sta, sta->addr,
|
ap_sta_disconnect(hapd, sta, sta->addr,
|
||||||
WLAN_REASON_IEEE_802_1X_AUTH_FAILED);
|
WLAN_REASON_IEEE_802_1X_AUTH_FAILED);
|
||||||
|
hostapd_wps_eap_completed(hapd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,19 @@ static void wps_reload_config(void *eloop_data, void *user_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void hostapd_wps_eap_completed(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Reduce race condition of the station trying to reconnect immediately
|
||||||
|
* after AP reconfiguration through WPS by rescheduling the reload
|
||||||
|
* timeout to happen after EAP completion rather than the originally
|
||||||
|
* scheduled 100 ms after new configuration became known.
|
||||||
|
*/
|
||||||
|
if (eloop_deplete_timeout(0, 0, wps_reload_config, hapd->iface, NULL))
|
||||||
|
wpa_printf(MSG_DEBUG, "WPS: Reschedule immediate configuration reload");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void hapd_new_ap_event(struct hostapd_data *hapd, const u8 *attr,
|
static void hapd_new_ap_event(struct hostapd_data *hapd, const u8 *attr,
|
||||||
size_t attr_len)
|
size_t attr_len)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ int hostapd_init_wps(struct hostapd_data *hapd,
|
|||||||
int hostapd_init_wps_complete(struct hostapd_data *hapd);
|
int hostapd_init_wps_complete(struct hostapd_data *hapd);
|
||||||
void hostapd_deinit_wps(struct hostapd_data *hapd);
|
void hostapd_deinit_wps(struct hostapd_data *hapd);
|
||||||
void hostapd_update_wps(struct hostapd_data *hapd);
|
void hostapd_update_wps(struct hostapd_data *hapd);
|
||||||
|
void hostapd_wps_eap_completed(struct hostapd_data *hapd);
|
||||||
int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
|
int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
|
||||||
const char *uuid, const char *pin, int timeout);
|
const char *uuid, const char *pin, int timeout);
|
||||||
int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
||||||
@ -61,6 +62,10 @@ static inline void hostapd_update_wps(struct hostapd_data *hapd)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void hostapd_wps_eap_completed(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
|
static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
|
||||||
const u8 *addr,
|
const u8 *addr,
|
||||||
char *buf, size_t buflen)
|
char *buf, size_t buflen)
|
||||||
|
Loading…
Reference in New Issue
Block a user