ieee80211: preserve all 12 bits of the A-MPDU delimiter length - #1187
Open
mgonzalezlopezudc wants to merge 1 commit into
Open
ieee80211: preserve all 12 bits of the A-MPDU delimiter length#1187mgonzalezlopezudc wants to merge 1 commit into
mgonzalezlopezudc wants to merge 1 commit into
Conversation
The MPDU subframe decoder discarded the high length nibble and overwrote the length with its low byte, decoding 0xABC as 0xBC. Combine both parts before setting the field to restore symmetry with the encoder. Add registered-serializer round trips at 0, 255, 256, 0xABC, and 4095 plus a fixed-byte decoding case. Assert decoded fields using fresh byte-backed packets so cached serialized bytes cannot mask the defect.
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.
What
Preserve all 12 bits of the A-MPDU delimiter length when deserializing
Ieee80211MpduSubframeHeaderinIeee80211MpduSubframeHeaderSerializer.Why
In
Ieee80211MpduSubframeHeaderSerializer::deserializeFields(), the decoder previously discarded the high length nibble and overwrote the length with only the low byte:Because
readUint4() >> 8evaluates to 0 and the subsequentsetLength(stream.readUint8())unconditionally overwrote the length with only the low 8 bits, any delimiter length >= 256 had its upper 4 bits discarded (e.g., decoding0xABCas0x0BC).Restoring:
restores symmetry with
serializeFields(), which emits the 12-bit length across the high nibble and low byte per IEEE Std 802.11 A-MPDU delimiter specifications.Reading Order
This PR consists of a single self-contained commit:
97fdb7ba2e—ieee80211: preserve all 12 bits of the A-MPDU delimiter lengthIeee80211MpduSubframeHeaderSerializer::deserializeFieldsand adds unit testIeee80211MpduSubframeHeaderSerializer_1.testverifying round-trip serialization/deserialization across byte boundaries (0, 255, 256, 0xABC, 4095) and fixed-byte decoding.src/inet/linklayer/ieee80211/mac/Ieee80211MacHeaderSerializer.cctests/unit/Ieee80211MpduSubframeHeaderSerializer_1.testArchitectural Surface
src/inet/linklayer/ieee80211/mac/Ieee80211MacHeaderSerializer.cctests/unit/Ieee80211MpduSubframeHeaderSerializer_1.testIeee80211MpduSubframeHeaderSerializer).Ieee80211MpduSubframeHeaderchunk definition; fixes deserialization of byte-backed packets into chunk fields.src/inet/are unsealed (doc/project/enforcement/check-source-seals.shPASS). No architectural deviations (AV-*) or naming deviations (NV-*) introduced.Baselines
No fingerprint or statistical baseline updates required.
Verification Evidence
make MODE=debug -j$(nproc): Clean build (libINET_dbg.so).make MODE=release -j$(nproc): Clean build (libINET.so).doc/project/enforcement/check-commits.sh upstream/master..HEAD: PASS (1 commit, linear, valid subject/facts format, clean splits).doc/project/enforcement/check-source-seals.sh --base upstream/master: PASS (all touched files unsealed).doc/project/enforcement/check-naming.sh --base upstream/master: PASS (0 mechanical candidates in changed files).doc/project/enforcement/check-architecture.sh src/inet/linklayer/ieee80211: PASS (clean architecture).inet_run_unit_tests -m debug -f 'Ieee80211MpduSubframeHeaderSerializer.*': PASS (Ieee80211MpduSubframeHeaderSerializer_1.testpassed in 0.594s).