nl80211: fix parsing of mixed wpa encryption in wpa_supp scan results
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
f096bfd317
commit
a766751369
1 changed files with 2 additions and 2 deletions
|
@ -2185,11 +2185,11 @@ static int nl80211_get_txpwrlist(const char *ifname, char *buf, int *len)
|
|||
static void nl80211_get_scancrypto(char *spec, struct iwinfo_crypto_entry *c)
|
||||
{
|
||||
int wpa_version = 0;
|
||||
char *p, *proto, *suites;
|
||||
char *p, *q, *proto, *suites;
|
||||
|
||||
c->enabled = 0;
|
||||
|
||||
for (p = strtok(spec, "[]"); p != NULL; p = strtok(NULL, "[]")) {
|
||||
for (p = strtok_r(spec, "[]", &q); p; p = strtok_r(NULL, "[]", &q)) {
|
||||
if (!strcmp(p, "WEP")) {
|
||||
c->enabled = 1;
|
||||
c->auth_suites = IWINFO_KMGMT_NONE;
|
||||
|
|
Loading…
Reference in a new issue