summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorHolesch, Simon (GED-SDD1) <Simon.Holesch@bshg.com>2020-09-01 10:13:36 +0000
committerDaniel Wagner <wagi@monom.org>2020-09-17 21:33:52 +0200
commitdccfb13a5195d286ffb4b52cb8b8f8efa97fb85f (patch)
tree7bf1836218890d2ac32223da753a17520494b4eb /plugins
parentd011590837f7d98d58633d0da847fe28f9d75195 (diff)
downloadconnman-dccfb13a5195d286ffb4b52cb8b8f8efa97fb85f.tar.gz
wifi: Detect invalid key with 4-way handshake offloading
wpa_supplicant is able to offload the 4-way handshake into the driver. In this case the 4WAY_HANDSHAKE state is skipped and therefore the current mechanism to detect a wrong password doesn't work any more. This patch extends the detection mechanism to also work with the offloading feature. The status code 16 is relatively generic, so this can lead to false positives.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wifi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index fc304e3b..74b773bc 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -74,6 +74,7 @@
#define P2P_LISTEN_PERIOD 500
#define P2P_LISTEN_INTERVAL 2000
+#define ASSOC_STATUS_AUTH_TIMEOUT 16
#define ASSOC_STATUS_NO_CLIENT 17
#define LOAD_SHAPING_MAX_RETRIES 3
@@ -2422,7 +2423,9 @@ static bool handle_4way_handshake_failure(GSupplicantInterface *interface,
{
struct connman_service *service;
- if (wifi->state != G_SUPPLICANT_STATE_4WAY_HANDSHAKE)
+ if ((wifi->state != G_SUPPLICANT_STATE_4WAY_HANDSHAKE) &&
+ !((wifi->state == G_SUPPLICANT_STATE_ASSOCIATING) &&
+ (wifi->assoc_code == ASSOC_STATUS_AUTH_TIMEOUT)))
return false;
if (wifi->connected)