nl80211: properly detect WEP encryption in wpa_supp scan results
authorJo-Philipp Wich <jo@mein.io>
Fri, 20 Sep 2019 07:07:23 +0000 (09:07 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 Sep 2019 11:12:56 +0000 (13:12 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
iwinfo_nl80211.c

index 6e438a7f7551758f4da7ed72d4302eaf05e637eb..9855d88e4023970e7dce69a98de025eaee54e2cf 100644 (file)
@@ -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, "]");