From 00131ca88c456c777bca41401c3e783132e4430c Mon Sep 17 00:00:00 2001 From: Grische <2787581+grische@users.noreply.github.com> Date: Thu, 14 May 2026 12:44:09 +0200 Subject: [PATCH] monitor: ignore short non-gluon vendor IEs without logging an error The IE parser checked ie_len < 9 and log_error()'d "IE is too short." before validating the OUI, so any third-party vendor-specific IE (tag 0xdd) shorter than 9 bytes was logged as an error even though it was never destined for us. WiFi scans routinely showed such IEs from other devices. Validate only the 6 bytes needed for the OUI/type compare first, then re-check the full length after the IE is confirmed to be a gluon node IE so a genuinely truncated one is still logged as an error. Co-Authored-By: Claude Opus 4.7 --- src/monitor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 */