libiwinfo: properly detect wep and unencrypted wifi iface state on madwifi
This commit is contained in:
parent
3a3b9ed806
commit
b93fe69907
1 changed files with 4 additions and 1 deletions
|
@ -641,6 +641,9 @@ int madwifi_get_encryption(const char *ifname, char *buf)
|
|||
c->pair_ciphers |= IWINFO_CIPHER_WEP40;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
|
||||
default:
|
||||
c->pair_ciphers = IWINFO_CIPHER_WEP40 |
|
||||
IWINFO_CIPHER_WEP104;
|
||||
|
@ -699,7 +702,7 @@ int madwifi_get_encryption(const char *ifname, char *buf)
|
|||
}
|
||||
}
|
||||
|
||||
c->enabled = (c->wpa_version || c->auth_algs) ? 1 : 0;
|
||||
c->enabled = (c->wpa_version || (c->auth_algs && c->pair_ciphers)) ? 1 : 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue