summaryrefslogtreecommitdiff
path: root/iwinfo_lua.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-09-21 21:02:10 +0200
committerJo-Philipp Wich <jo@mein.io>2016-09-21 21:02:15 +0200
commitfd9e17be0c43bd6b8df5371f0b353747bc563874 (patch)
treef66c98922a068fb1a69127a5fce1c6e0d22f37d3 /iwinfo_lua.c
parent717ff717509e53ace280c4216d1150af5f1d1b82 (diff)
downloadiwinfo-fd9e17be0c43bd6b8df5371f0b353747bc563874.tar.gz
lua: fix WPA cipher reporting
Use the same logic as the command line interface for reporting the used WPA ciphers. Instead of printing the intersection of pairwise and group ciphers, report both group and pairwise ciphers. This fixes a case where a connection which uses CCMP for pairwise and TKIP as groupwise cipher is getting reported as using the NONE cipher. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'iwinfo_lua.c')
-rw-r--r--iwinfo_lua.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iwinfo_lua.c b/iwinfo_lua.c
index 94913ac..1421111 100644
--- a/iwinfo_lua.c
+++ b/iwinfo_lua.c
@@ -134,21 +134,21 @@ static char * iwinfo_crypto_desc(struct iwinfo_crypto_entry *c)
sprintf(desc, "mixed WPA/WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
iwinfo_crypto_print_ciphers(
- c->pair_ciphers & c->group_ciphers));
+ c->pair_ciphers | c->group_ciphers));
break;
case 2:
sprintf(desc, "WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
iwinfo_crypto_print_ciphers(
- c->pair_ciphers & c->group_ciphers));
+ c->pair_ciphers | c->group_ciphers));
break;
case 1:
sprintf(desc, "WPA %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
iwinfo_crypto_print_ciphers(
- c->pair_ciphers & c->group_ciphers));
+ c->pair_ciphers | c->group_ciphers));
break;
}
}