Skip to content

Commit a0d311a

Browse files
committed
test: wrap encrypted beacon test with no_debug_dissector
The encrypted beacon payload cannot be parsed as ZigBeeBeacon, which raises an exception when conf.debug_dissector is True (as in CI).
1 parent 8ce727b commit a0d311a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/scapy/layers/dot15d4.uts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,10 @@ assert p[Padding].load == b"\xAA\xBB"
337337
= Dot15d4 Beacon with aux_sec_header (issue #4928)
338338

339339
# Given: raw bytes for a Dot15d4 Beacon frame with fcf_security=1
340-
pkt = Dot15d4(b'\x08\xD0\x84\x21\x43\x01\x00\x00\x00\x00\x48\xDE\xAC\x02\x05\x00\x00\x00\x55\xCF\x00\x00\x51\x52\x53\x54\x22\x3B\xC1\xEC\x84\x1A\xB5\x53')
341-
# When: packet is dissected
342-
# Then: fcf_security is set and aux_sec_header is correctly parsed
340+
# Note: remaining bytes are encrypted data, so ZigBeeBeacon dissection is expected to fail
341+
with no_debug_dissector():
342+
pkt = Dot15d4(b'\x08\xD0\x84\x21\x43\x01\x00\x00\x00\x00\x48\xDE\xAC\x02\x05\x00\x00\x00\x55\xCF\x00\x00\x51\x52\x53\x54\x22\x3B\xC1\xEC\x84\x1A\xB5\x53')
343+
343344
assert pkt.fcf_frametype == 0
344345
assert pkt.fcf_security == 1
345346
assert Dot15d4Beacon in pkt

0 commit comments

Comments
 (0)