From: Johannes Berg Date: Wed, 29 Sep 2010 10:45:06 +0000 (+0200) Subject: parse RSN IE information on PMKIDs and mgmt cipher suite X-Git-Tag: v0.9.22~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ba3f5236af15d045c3278194fd198a1addd3868;p=thirdparty%2Fiw.git parse RSN IE information on PMKIDs and mgmt cipher suite --- diff --git a/scan.c b/scan.c index 1a8c3b3..3b5fb60 100644 --- a/scan.c +++ b/scan.c @@ -468,6 +468,28 @@ static void print_rsn_ie(const char *defcipher, const char *defauth, len -= 2; } + if (len >= 2) { + int pmkid_count = data[0] | (data[1] << 8); + + if (len >= 2 + 16 * pmkid_count) { + tab_on_first(&first); + printf("\t * %d PMKIDs\n", pmkid_count); + /* not printing PMKID values */ + data += 2 + 16 * pmkid_count; + len -= 2 + 16 * pmkid_count; + } else + goto invalid; + } + + if (len >= 4) { + tab_on_first(&first); + printf("\t * Group mgmt cipher suite: "); + print_cipher(data); + printf("\n"); + data += 4; + len -= 4; + } + invalid: if (len != 0) { printf("\t\t * bogus tail data (%d):", len);