ieee80211: correct ordinary Duration encoding and Block Ack reservations - #1204
Draft
mgonzalezlopezudc wants to merge 3 commits into
Draft
mgonzalezlopezudc wants to merge 3 commits into
mgonzalezlopezudc wants to merge 3 commits into
Conversation
An undersized BAR reservation must yield zero response Duration rather than a negative model value or unsigned wire wrap. Test insufficient, exact, and positive reservations through the production policy. Change: src.ieee80211.duration | behavior.change.fix | test | wifi-audit
Fractional Duration calculations must reserve the next whole microsecond in typed transmitted headers as well as serialized bytes. Normalize at DCF, HCF and response construction boundaries, reject out-of-range ordinary durations, and keep special Duration/ID encodings out of received NAV calculations. Tests cover all seven serialized header families, fractional and range boundaries, and received special-ID filtering. Fixtures that serialize a pre-transmission header now explicitly assign zero Duration. PHY airtime remains unchanged. Change: src.ieee80211.duration | behavior.change.fix | test | wifi-audit
Reserved or special incoming Duration/ID encodings are not airtime. Exclude them before ACK, CTS and Block Ack subtraction so malformed peer input cannot become a large reservation or trigger the ordinary-duration serializer range check. Preserve residual airtime for valid values. Focused tests cover both DCF and QoS ACK/CTS policies, Basic Block Ack, negative input and special encodings. Debug and release builds pass. Change: src.ieee80211.duration | behavior.change.fix | test | wifi-audit
mgonzalezlopezudc
force-pushed
the
fix/ieee80211-audit-duration-encoding
branch
from
September 16, 2026 20:56
40157af to
2cd66c3
Compare
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.
Summary
Fractional ordinary Duration was truncated on wire and could disagree with typed NAV. Normalize typed producers and serializers, enforce the ordinary range, and exclude special IDs from NAV and response arithmetic. A Basic BAR with insufficient reservation now yields zero response Duration rather than a negative value that can wrap on wire.
Scope
WLAN Duration helper, DCF/HCF producers, serializers, recipient policies and Rx; BA clamp prerequisite first.
Standards references: IEEE 802.11-2024 §§9.2.4.2 and 9.2.5.1.
Dependencies and merge order
No prerequisite within this audit series; this topic was built and tested independently on the pinned base.
The Basic BA clamp is included here; do not open or merge a duplicate PR from
fix/ieee80211-audit-blockack-duration. Reconcile policy overlap with #1128 before merge.Validation
Pinned test base:
7287f347aaca36e557c708d6930a6f5a450b2833.The isolated topic head passed an assertions-enabled debug build (
-O0 -Wall -g0; debug symbols omitted for storage) and the focused checks below. The larger integration source tree also passed debug and release compilation; no separate release build is claimed for this topic.Executed focused test commands, from the repository root after
source setenv -q:inet_run_unit_tests -m debug -f 'Ieee80211(DurationRounding|ResponseDuration|BlockAckDuration|MsduAggregation|OnWireBitCompliance)_1\.test'Results: 5 unit cases passed.
Limits and review status
Fractional production trigger is latent on this base. Synthetic boundary tests establish the field contract, not short-GI operation.
Draft pending final independent review and reconciliation with current upstream. Live PR overlap has not been reverified against the pinned test base.