IP should be IPv4, but isn't

This commit is contained in:
Nico Schottelius 2019-03-25 13:14:29 +01:00
parent b5524b636f
commit e1146070c4

View file

@ -431,7 +431,7 @@ class L2Controller(object):
self.debug_print_pkg(pkg) self.debug_print_pkg(pkg)
cpu_header = CpuHeader(packet.payload) cpu_header = CpuHeader(packet.payload)
ether_orig = Ether(src=packet.src, dst=packet.dst, type=cpu_header.type) ether_orig = Ether(src=packet.src, dst=packet.dst, type=cpu_header.type)
orig_packet = ether_orig / IPv4(cpu_header.load) orig_packet = ether_orig / IP(cpu_header.load)
log.debug("v4 reassambled={}".format(orig_packet.__repr__())) log.debug("v4 reassambled={}".format(orig_packet.__repr__()))
elif packet.type == 0x4242: elif packet.type == 0x4242: