Skip to content

Fix extract_odid_from_scapy_packet: never decoded Wi-Fi beacons (v2.2.4)#5

Merged
ampledata merged 1 commit into
mainfrom
fix/wifi-scapy-odid-parse
Jul 24, 2026
Merged

Fix extract_odid_from_scapy_packet: never decoded Wi-Fi beacons (v2.2.4)#5
ampledata merged 1 commit into
mainfrom
fix/wifi-scapy-odid-parse

Conversation

@ampledata

Copy link
Copy Markdown
Contributor

Scapy's Dot11EltVendorSpecific.oui is an int, so bytes(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 to extract_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

…) — 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
@ampledata
ampledata merged commit 9a21818 into main Jul 24, 2026
4 checks passed
@ampledata
ampledata deleted the fix/wifi-scapy-odid-parse branch July 24, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant