More debug in controller

This commit is contained in:
Nico Schottelius 2019-03-25 13:11:47 +01:00
parent 236bd8e7d6
commit 0dc8791afb

View file

@ -424,9 +424,16 @@ class L2Controller(object):
if packet.type == 0x0800:
pass
log.debug("Received raw (untagged) packet - BUG")
self.debug_print_pkg(pkg)
elif packet.type == 0x86dd:
self.debug_print_pkg(pkg)
cpu_header = CpuHeader(packet.payload)
ether_orig = Ether(src=packet.src, dst=packet.dst, type=cpu_header.type)
orig_packet = ether_orig / IPv4(cpu_header.load)
log.debug("v4 reassambled={}".format(orig_packet.__repr__()))
elif packet.type == 0x4242:
cpu_header = CpuHeader(packet.payload)
@ -447,7 +454,7 @@ class L2Controller(object):
src = orig_packet['IPv6'].src
log.debug("Router solicitation from {} -- should probably handle this?".format(src))
elif cpu_header.task == self.task['DEBUG']:
log.debug("reassambled={}".format(orig_packet.__repr__()))
log.debug("v6 reassambled={}".format(orig_packet.__repr__()))
elif cpu_header.task == self.task['ICMP6_NS']:
log.info("Doing neighbor solicitation for the switch in the controller")
self.handle_icmp6_ns(orig_packet)