From: Jo-Philipp Wich Date: Fri, 20 Sep 2019 07:07:23 +0000 (+0200) Subject: nl80211: properly detect WEP encryption in wpa_supp scan results X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7faeaeafe1cda153a0784bd62ea3835ddd0c935d;p=oweals%2Fiwinfo.git nl80211: properly detect WEP encryption in wpa_supp scan results Signed-off-by: Jo-Philipp Wich --- 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, "]");