Dot11QoS QoS Control bits in reverse order
Looking at the 802.11-2012 spec and Wireshark output, it appears that the TID, EOSP, Ack Policy, and Reserved fields are in reverse order of what they should be. I made Pull Request #785 with what I think is the correct ordering.
I modified the existing Dot11QoS - build unit test by adding a TID parameter to the Dot11Qos layer substituting the actual string that I got with my updated version. If you would prefer a separate test, I could create a separate test.
Before this change Wireshark and Scapy reported different TIDs for a locally captured packet trace. With this change, Scapy and Wireshark agree on TID values.
Hi @william-r-dieter
I'm still trying to catchup on all your wonderful additions you made to pyDot11. Reading this, if this is what I think this is, then Scapy is in the correct order. Wireshark flips the Endian for the enduser. The folks at IEEE are to "blame" for they saw fit to make things like crc32 Little Endian, and the rest of the frame in Big Endian, etc..
I could be way off here, but I think this is most likely where this thread came from?
Hi @stryngs, Wireshark breaks down the bytes into bit by bit fields and I could see the original byte ordering in the packet hex dump. The Wireshark dissection was matching what the 802.11 spec says for that bit pattern.
It would be an easy mistake to make. Normally I think of the bits starting from Bit 0 and that is how they were originally ordered in the Scapy dissector, so it looked reasonable. However, the scapy logic is that the bit fields pack in from the most significant bit first. In the change for this bug fix, I did not change the byte ordering, just the bits.
Almost all of the time the QoS Control field is 0x0000, so it would be easy to miss. Something is messed up in my home network, and the TID settings are all over the place. Annoying though it will be to fix, it helped expose this bug.