aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@sonymobile.com>2016-09-20 06:40:04 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-23 14:36:55 (GMT)
commit02adead53ea0719d138752cf98ba19e8699a7f8e (patch)
tree0e7748a737ea7ec7de3bb8c5729253f488e2938e /wpa_supplicant/events.c
parentef24ad3ec5bee3237ff00abd6292891a0c1bf008 (diff)
downloadhostap-02adead53ea0719d138752cf98ba19e8699a7f8e.zip
hostap-02adead53ea0719d138752cf98ba19e8699a7f8e.tar.gz
hostap-02adead53ea0719d138752cf98ba19e8699a7f8e.tar.bz2
Add ignore_auth_resp control interface debug parameter
Implement "SET ignore_auth_resp <0/1>" command to simulate auth/assoc response loss and EAPOL RX packet loss by ignoring corresponding incoming events. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index ba30780..ed96228 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3445,6 +3445,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
sme_event_auth(wpa_s, data);
break;
case EVENT_ASSOC:
+#ifdef CONFIG_TESTING_OPTIONS
+ if (wpa_s->ignore_auth_resp) {
+ wpa_printf(MSG_INFO,
+ "EVENT_ASSOC - ignore_auth_resp active!");
+ break;
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
wpa_supplicant_event_assoc(wpa_s, data);
if (data && data->assoc_info.authorized)
wpa_supplicant_event_assoc_auth(wpa_s, data);
@@ -3459,6 +3466,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data ? &data->disassoc_info : NULL);
break;
case EVENT_DEAUTH:
+#ifdef CONFIG_TESTING_OPTIONS
+ if (wpa_s->ignore_auth_resp) {
+ wpa_printf(MSG_INFO,
+ "EVENT_DEAUTH - ignore_auth_resp active!");
+ break;
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
wpas_event_deauth(wpa_s,
data ? &data->deauth_info : NULL);
break;