Skip to content

Add 802.11 HE Operation Info#5029

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

Add 802.11 HE Operation Info#5029
middleendian wants to merge 2 commits into
secdev:masterfrom
middleendian:dot11_he_operation

Conversation

@middleendian

Copy link
Copy Markdown
  • 802.11ax-2021 9.4.2.249
  • Add unit test

AI-Assisted: yes (Codex)

PR 0001: Dot11 Element ID Extension and HE Operation

Scope:

  • Adds Dot11EltExtension dispatch for Element ID 255.
  • Adds Dot11EltExtensionGeneric for unknown or unsupported extension IDs.
  • Adds Dot11EltHEOperation for Extended ID 36.
  • Adds Dot11HE6GOperationInfo when the HE Operation element indicates that
    6 GHz operation information is present.
  • Adds focused test/scapy/layers/dot11.uts tests for generic, short, HE, and
    HE 6 GHz extended elements.

Spec references used in code comments:

  • IEEE Std 802.11ax-2021, 9.4.2.1 and Table 9-92: Element ID Extension.
  • IEEE Std 802.11ax-2021, 9.4.2.249: HE Operation element.
  • IEEE Std 802.11ax-2021, Figure 9-788k: 6 GHz Operation Information field.

Intentional partial support:

  • Element ID Extension is a registry for many 802.11 information elements. This
    patch does not try to implement all of them.
  • Unknown and unsupported extension IDs intentionally remain
    Dot11EltExtensionGeneric.
  • EHT Operation and Multi-Link are left for separate follow-up patches so this
    first PR is reviewable on its own.

Focused test command used:

test/run_tests -t test/scapy/layers/dot11.uts -n 57-61 -F

Result:

PASSED=5 FAILED=0

Full dot11 suite note:

  • A full test/scapy/layers/dot11.uts run reached and passed the existing
    tests up through Dot11EltVHTOperation in isolation before I interrupted it
    in this local environment because it was taking longer than expected.
    The focused tests for this patch passed.

Ugur Dogru added 2 commits June 29, 2026 14:51
- 802.11ax-2021 9.4.2.249
- Add unit test

AI-Assisted: yes (Codex)
Comment thread scapy/layers/dot11.py

length = orb(_pkt[1])
ext_id = orb(_pkt[2])
if ext_id == 36 and length >= 7:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should be able to use a dictionary that is automatically registered based on the subclasses ext_ID. Like what was done in

scapy/scapy/layers/dot11.py

Lines 1059 to 1074 in fda6032

@classmethod
def register_variant(cls, id=None):
id = id or cls.ID.default
if id not in cls.registered_ies:
cls.registered_ies[id] = cls
@classmethod
def dispatch_hook(cls, _pkt=None, *args, **kargs):
if _pkt:
_id = ord(_pkt[:1])
idcls = cls.registered_ies.get(_id, cls)
if idcls.dispatch_hook != cls.dispatch_hook:
# Vendor has its own dispatch_hook
return idcls.dispatch_hook(_pkt=_pkt, *args, **kargs)
cls = idcls
return cls

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.

2 participants