Skip to content
Snippets Groups Projects
Commit 8bcf817b authored by Pierre Lorinquer's avatar Pierre Lorinquer
Browse files

Fix variable length field computation in EAP_MD5, EAP_TLS and EAP_FAST.

Example:
>>> EAP_FAST().show()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "scapy/packet.py", line 923, in show
    return self._show_or_dump(dump, indent, lvl, label_lvl)
  File "scapy/packet.py", line 906, in _show_or_dump
    reprval = f.i2repr(self,fvalue)
  File "scapy/fields.py", line 572, in i2repr
    return x[:self.length_from(pkt)].encode("hex")
  File "scapy/layers/l2.py", line 590, in <lambda>
    XStrLenField('data', '', length_from=lambda pkt: pkt.len - 10 if
pkt.L == 1 else pkt.len - 6)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
parent 2cd6d334
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment