diff --git a/src/monitor.c b/src/monitor.c index 18e7877..243452e 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -360,8 +360,9 @@ static int monitor_gluon_node_parse_ie(const uint8_t *ie, size_t ie_len, void *d return 0; } - if (ie_len < 6 + 3) { - log_error("IE is too short."); + /* Need header + OUI + vendor type before inspecting vendor-specific fields */ + if (ie_len < 6) { + log_debug("Vendor IE too short to inspect OUI."); return 0; } @@ -375,6 +376,11 @@ static int monitor_gluon_node_parse_ie(const uint8_t *ie, size_t ie_len, void *d return 0; } + if (ie_len < 6 + 3) { + log_error("Gluon node IE is too short."); + return 0; + } + log_debug("Found gluon node IE length=%d", gluon_tlv_len); /* Validate TLVs. We can re-use the ieee80211 helper for this */