Closed willbelr closed 5 years ago
Hi ! Please retry against master, that was fixed in https://github.com/secdev/scapy/pull/1667
FTR We had introduced native FCS handling, but that lead to some trouble as packets could either be Dot11 or Dot11FCS. It is now fixed, as Dot11 will work for both
Not sure I'm barking at a right tree, but now it seems that the only way to test whether Dot11 is in the packet is by only accessing it, all other methods fail:
>>> pkt = Dot11FCS()/IP()
>>> Dot11 in pkt
False
>>> pkt.haslayer(Dot11)
0
>>> pkt[Dot11]
<Dot11FCS |>
And it takes now a try/except wrapping around the code to handle the IndexError
in case the pkt doesn't have the layer.
@haim0n Please open a new issue
Maybe it's worth reopening the original issue?
It seems that haslayer() is broken in scapy 2.4.2-1. An app that used to work fine this summer is now broken, as the method always return 0.
# Details
# Steps to reproduce:
Output: