Fix VXLAN regression test to make it more specific

This commit is contained in:
Pierre LALET 2017-09-16 20:58:26 +02:00
parent 90912f7633
commit ed1da06a0a
1 changed files with 4 additions and 3 deletions

View File

@ -643,8 +643,8 @@ Dot11WEP(_)
assert(TCP in _ and _[TCP].seq == 12345678)
= RadioTap Big-Small endian dissection
raw = b'\x00\x00\x1a\x00/H\x00\x00\xe1\xd3\xcb\x05\x00\x00\x00\x00@0x\x14@\x01\xac\x00\x00\x00'
r = RadioTap(raw)
data = b'\x00\x00\x1a\x00/H\x00\x00\xe1\xd3\xcb\x05\x00\x00\x00\x00@0x\x14@\x01\xac\x00\x00\x00'
r = RadioTap(data)
r.show()
assert r.present == 18479
@ -7435,7 +7435,8 @@ assert(p.data[0].ifname.startswith("lo"))
str(UDP(sport=1024, dport=4789, len=None, chksum=None)/VXLAN(flags=0x08, vni=42)) == b'\x04\x00\x12\xb5\x00\x10\x00\x00\x08\x00\x00\x00\x00\x00\x2a\x00'
= Verify VXLAN Ethernet Binding
str(VXLAN(vni=23)/Ether(dst="11:11:11:11:11:11", src="11:11:11:11:11:11", type=0x800)) == b'\x0c\x00\x00\x03\x00\x00\x17\x00\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x08\x00'
pkt = VXLAN(raw(VXLAN(vni=23)/Ether(dst="11:11:11:11:11:11", src="11:11:11:11:11:11", type=0x800)))
pkt.flags.NextProtocol and pkt.NextProtocol == 3
= Verify UDP dport overloading
p = Ether(dst="11:11:11:11:11:11", src="22:22:22:22:22:22")