libwifi: add remove_dot11qos function

This commit is contained in:
Mathy Vanhoef 2021-05-16 22:07:13 +04:00
parent e665e2d8ad
commit 6cb61da4a1

View File

@ -146,6 +146,15 @@ def is_amsdu(p):
else: else:
return p.Reserved == 1 return p.Reserved == 1
def remove_dot11qos(p):
if not Dot11QoS in p: return
p = p.copy()
payload = p[Dot11QoS].payload
p.remove_payload()
p /= payload
p.subtype = 0
return p
#### Packet Processing Functions #### #### Packet Processing Functions ####
class DHCP_sock(DHCP_am): class DHCP_sock(DHCP_am):