Fix extract_odid_from_scapy_packet: never decoded Wi-Fi beacons (v2.2.4)#5
Merged
Conversation
…) — v2.2.4 The Scapy beacon path built the vendor-IE bytes as `bytes(elt.oui) + ...`, but Scapy's Dot11EltVendorSpecific.oui is an INT, so bytes(int) produced a huge zero-filled buffer and the ASTM OUI (FA:0B:BC) never matched — the packaged WifiWorker decoded ZERO Remote ID even with a healthy monitor-mode capture, while the byte-level extract_odid_from_dot11 parser decoded the same frames fine. Delegate the Scapy path to extract_odid_from_dot11(bytes(dot11)) so Wi-Fi Beacon and NAN decoding share one proven code path; enrich meta with RSSI when present. Root-caused on hardware (AR9271/ath9k_htc): on 3235 captured frames the raw parser decoded 9 ODID and the scapy parser 0; after the fix, 9 and 9. Adds tests/test_wifi_parse.py (byte parser + scapy/byte parity regression). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197da7dhvcPoHxYKamrYqyM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scapy's
Dot11EltVendorSpecific.ouiis an int, sobytes(elt.oui)built a huge zero buffer and the ASTM OUI never matched — the packaged WifiWorker decoded zero Remote ID despite a healthy monitor capture. The byte parser worked. Now the scapy path delegates toextract_odid_from_dot11(bytes(dot11))(one proven path).Root-caused on hardware (AR9271): 3235 frames → raw parser 9 ODID, scapy parser 0; after fix, 9 and 9. Adds regression tests.
🤖 Generated with Claude Code