nl80211: properly detect WEP encryption in wpa_supp scan results

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-20 09:07:23 +02:00
parent 629b5ffdd9
commit 7faeaeafe1

View 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, "]");