Skip to content

Add 802.11 Radio Measurement action support#5039

Open
middleendian wants to merge 2 commits into
secdev:masterfrom
middleendian:dot11_radio_measurement
Open

Add 802.11 Radio Measurement action support#5039
middleendian wants to merge 2 commits into
secdev:masterfrom
middleendian:dot11_radio_measurement

Conversation

@middleendian

Copy link
Copy Markdown
Contributor

Dot11 Radio Measurement Action

Scope:

  • Adds Dot11RadioMeasurement for Action category 5.
  • Adds Radio Measurement Request and Report action bodies for actions 0
    and 1.
  • Specializes Beacon measurement request/report fields for Measurement Type
    5.
  • Leaves unsupported measurement types as raw
    measurement_request_data / measurement_report_data.
  • Adds focused dissection and raw round-trip tests for Beacon request,
    Beacon report, and unsupported measurement request fallback.

Spec references used in code comments:

  • IEEE Std 802.11-2020, 9.6.6.1: Radio Measurement Action field values.
  • IEEE Std 802.11-2020, 9.6.6.2: Radio Measurement Request frame.
  • IEEE Std 802.11-2020, 9.6.6.3: Radio Measurement Report frame.
  • IEEE Std 802.11-2020, 9.4.2.20: Measurement Request element.
  • IEEE Std 802.11-2020, 9.4.2.20.7: Beacon request.
  • IEEE Std 802.11-2020, 9.4.2.21: Measurement Report element.
  • IEEE Std 802.11-2020, 9.4.2.21.7: Beacon report.

Intentional partial support:

  • Only Beacon measurement type 5 is specialized in this PR.
  • Other measurement types are retained as raw bytes instead of being parsed
    with the wrong field layout.
  • The frame bodies parse one Measurement Request/Report element.

Test command used:

test/run_tests -t test/scapy/layers/dot11.uts -F

Result:

PASSED=68 FAILED=0

AI-Assisted: yes (Codex)

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.22%. Comparing base (2498fbb) to head (94e7777).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5039      +/-   ##
==========================================
- Coverage   80.22%   80.22%   -0.01%     
==========================================
  Files         387      387              
  Lines       96450    96473      +23     
==========================================
+ Hits        77381    77395      +14     
- Misses      19069    19078       +9     
Files with missing lines Coverage Δ
scapy/layers/dot11.py 92.17% <100.00%> (+0.27%) ⬆️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

polybassa
polybassa previously approved these changes Jul 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial 802.11 Radio Measurement (Action category 5) dissection support to Scapy, focusing on Radio Measurement Request/Report actions and specializing Beacon measurement (type 5) while preserving raw bytes for unsupported measurement types.

Changes:

  • Introduces Dot11RadioMeasurement action layer plus Request/Report body layers, with Beacon request/report specializations.
  • Adds layer bindings for Action category 0x05 and actions 0 (request) / 1 (report).
  • Extends dot11.uts with dissection + raw round-trip tests for Beacon request/report and unsupported request fallback.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
scapy/layers/dot11.py Adds Radio Measurement action/request/report packets, Beacon specializations, and layer bindings.
test/scapy/layers/dot11.uts Adds regression tests covering Beacon request/report dissection and raw fallback behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scapy/layers/dot11.py Outdated
Comment thread scapy/layers/dot11.py Outdated
Comment thread scapy/layers/dot11.py
Comment thread scapy/layers/dot11.py
Comment thread test/scapy/layers/dot11.uts
@polybassa

Copy link
Copy Markdown
Contributor

Thanks for the PR, please add the AI-Assisted Trailer to your commits.

@middleendian

middleendian commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the PR, please add the AI-Assisted Trailer to your commits.

Hi !

Is it required to trigger validity checking of commits? Because my first push had no AI-assisted line, I had rebased and pushed with AI-assisted line in commit message.
To make sure I've cloned a fresh copy of remote and checked comments, They have AI-assisted trailer in both commits.

Thanks

ugur@ugur-ThinkPad-E15:~/sandbox/scapy$ git branch
  dot11_he_operation
* dot11_radio_measurement
  master
ugur@ugur-ThinkPad-E15:~/sandbox/scapy$ git log -n2
commit 9d6828a27b4d497860beca2ffdbe64524294a930 (HEAD -> dot11_radio_measurement, origin/dot11_radio_measurement)
Author: Ugur Dogru <ugur.dogru@axon-networks.com>
Date:   Fri Jul 17 12:55:48 2026 +0300

    dot11: address Radio Measurement review feedback
    
    Return bytes from Beacon request/report extract_padding().
    Keep non-decoded report bodies in measurement_report_data, including
    refused Beacon reports.
    Use field names consistent with existing dot11 layers and add regression
    tests for unsupported/refused report fallback.
    
    AI-Assisted: yes (Codex)

commit 94e7777c1bfc3377d1891480289e8a9758b1fea5
Author: Ugur Dogru <ugur.dogru@axon-networks.com>
Date:   Tue Jul 7 11:53:03 2026 +0300

    Add 802.11 Radio Measurement action support
    
    AI-Assisted: yes (Codex)

@gpotter2

Copy link
Copy Markdown
Member

Hm, looks funky. Could you try rebasing against master? Thanks !

@middleendian

Copy link
Copy Markdown
Contributor Author

Hm, looks funky. Could you try rebasing against master? Thanks !

I don't get it. without merging?

@gpotter2

gpotter2 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Yeah. Like

git pull --rebase upstream master
git push -f

Ugur Dogru added 2 commits July 22, 2026 14:17
Return bytes from Beacon request/report extract_padding().
Keep non-decoded report bodies in measurement_report_data, including
refused Beacon reports.
Use field names consistent with existing dot11 layers and add regression
tests for unsupported/refused report fallback.

AI-Assisted: yes (Codex)
@middleendian
middleendian force-pushed the dot11_radio_measurement branch from 9d6828a to 3e44262 Compare July 22, 2026 11:17
@middleendian

Copy link
Copy Markdown
Contributor Author

Yeah. Like

git pull --rebase upstream master
git push -f

AI-Assisted check seems OK with this. Thanks !

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.

4 participants