Fix ordering of bit fields in the Dot11QoS QoS Control field

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
This commit is contained in:
William R. Dieter 2017-08-28 14:33:51 -07:00
parent db280e3613
commit 25c6470ca8
2 changed files with 5 additions and 5 deletions

View File

@ -178,10 +178,10 @@ class Dot11(Packet):
class Dot11QoS(Packet):
name = "802.11 QoS"
fields_desc = [ BitField("TID",None,4),
BitField("EOSP",None,1),
fields_desc = [ BitField("Reserved",None,1),
BitField("Ack Policy",None,2),
BitField("Reserved",None,1),
BitField("EOSP",None,1),
BitField("TID",None,4),
ByteField("TXOP",None) ]
def guess_payload_class(self, payload):
if isinstance(self.underlayer, Dot11):

View File

@ -8611,8 +8611,8 @@ Dot11 in p and p.addr3 == "00:00:00:00:00:00"
p.mysummary() == '802.11 Management 0 00:00:00:00:00:00 > 00:00:00:00:00:00'
= Dot11QoS - build
s = str(Dot11(type=2, subtype=8)/Dot11QoS())
s == b'\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
s = str(Dot11(type=2, subtype=8)/Dot11QoS(TID=4))
s == b'\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00'
= Dot11QoS - dissection
p = Dot11(s)