aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wpa_supplicant/wpa_supplicant.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index cc5a9cf..a9e5e8e 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -173,6 +173,14 @@ int wpa_eapol_send(struct wpa_supplicant *wpa_s, int type,
if (preauth && wpa_s->l2_preauth == NULL)
return -1;
+ if (wpa_s->key_mgmt == WPA_KEY_MGMT_PSK && !preauth) {
+ /* Current SSID is using WPA-PSK, drop possible frames (mainly,
+ * EAPOL-Start) from EAPOL state machines. */
+ wpa_printf(MSG_DEBUG, "WPA: drop TX EAPOL in WPA-PSK mode "
+ "(type=%d len=%d)", type, len);
+ return -1;
+ }
+
msglen = sizeof(*ethhdr) + sizeof(*hdr) + len;
msg = malloc(msglen);
if (msg == NULL)