]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add UNPROT_DEAUTH command for testing OCV
authorMathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Mon, 6 Aug 2018 19:46:41 +0000 (15:46 -0400)
committerJouni Malinen <j@w1.fi>
Mon, 17 Dec 2018 13:50:12 +0000 (15:50 +0200)
This new wpa_supplicant control interface command can be used to
simplify testing SA Query with OCV.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
wpa_supplicant/ctrl_iface.c

index 77a3133d8d5605e35e5c7fe5da72aca33dd0c7d4..a742949dba0ef6501d4aa99ed8072601ca4e8a2b 100644 (file)
@@ -56,6 +56,7 @@
 #include "drivers/driver.h"
 #include "mesh.h"
 #include "dpp_supplicant.h"
+#include "sme.h"
 
 static int wpa_supplicant_global_iface_list(struct wpa_global *global,
                                            char *buf, int len);
@@ -10506,6 +10507,10 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
        } else if (os_strcmp(buf, "RESEND_ASSOC") == 0) {
                if (wpas_ctrl_resend_assoc(wpa_s) < 0)
                        reply_len = -1;
+       } else if (os_strcmp(buf, "UNPROT_DEAUTH") == 0) {
+               sme_event_unprot_disconnect(
+                       wpa_s, wpa_s->bssid, NULL,
+                       WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA);
 #endif /* CONFIG_TESTING_OPTIONS */
        } else if (os_strncmp(buf, "VENDOR_ELEM_ADD ", 16) == 0) {
                if (wpas_ctrl_vendor_elem_add(wpa_s, buf + 16) < 0)