commit 6081438564bb051394aa5c1207a95e92415d5987
parent 6618ad1feef3b1a30eb1ab6867ea03357174d645
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Mon, 8 Jul 2019 18:59:49 +0200
monitor: Show IP Allocation KDEs from EAPoL-Key 2/4, 3/4 frames
Diffstat:
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/monitor/nlmon.c b/monitor/nlmon.c
@@ -981,6 +981,13 @@ static bool print_oui(unsigned int level, const uint8_t *oui)
return true;
}
+static void print_ipv4(unsigned int level, const char *label,
+ const uint8_t *addr)
+{
+ print_attr(level, "%s: %u.%u.%u.%u", label,
+ addr[0], addr[1], addr[2], addr[3]);
+}
+
static void print_ie_vendor(unsigned int level, const char *label,
const void *data, uint16_t size)
{
@@ -1010,6 +1017,19 @@ static void print_ie_vendor(unsigned int level, const char *label,
}
} else if (!memcmp(oui, wfa_oui, 3)) {
switch (oui[3]) {
+ case 0x04:
+ print_attr(level + 1, "IP Address Request KDE");
+ return;
+ case 0x05:
+ print_attr(level + 1, "IP Address Allocation KDE");
+
+ if (size < 12)
+ return;
+
+ print_ipv4(level + 2, "Client IP Address", data + 0);
+ print_ipv4(level + 2, "Subnet Mask", data + 4);
+ print_ipv4(level + 2, "GO IP Address", data + 8);
+ return;
case 0x10:
print_ie_wfa_hs20(level + 1, label, data, size);
return;