From 7faeaeafe1cda153a0784bd62ea3835ddd0c935d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 20 Sep 2019 09:07:23 +0200 Subject: [PATCH] nl80211: properly detect WEP encryption in wpa_supp scan results Signed-off-by: Jo-Philipp Wich --- iwinfo_nl80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index 6e438a7..9855d88 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -2190,6 +2190,14 @@ static void nl80211_get_scancrypto(char *spec, struct iwinfo_crypto_entry *c) c->enabled = 0; for (p = strtok(spec, "[]"); p != NULL; p = strtok(NULL, "[]")) { + if (!strcmp(p, "WEP")) { + c->enabled = 1; + c->auth_suites = IWINFO_KMGMT_NONE; + c->auth_algs = IWINFO_AUTH_OPEN | IWINFO_AUTH_SHARED; + c->pair_ciphers = IWINFO_CIPHER_WEP40 | IWINFO_CIPHER_WEP104; + break; + } + proto = strtok(p, "-"); suites = strtok(NULL, "]"); -- 2.25.1