Try to mute debugging a bit to focus on messages we have to answer

This commit is contained in:
Nico Schottelius 2019-03-19 21:12:40 +01:00
parent 809110edc7
commit fd3263d731

View file

@ -381,16 +381,21 @@ class L2Controller(object):
pass pass
elif packet.type == 0x4242: elif packet.type == 0x4242:
cpu_header = CpuHeader(packet.payload) cpu_header = CpuHeader(packet.payload)
log.debug("cpu = {}".format(cpu_header.__repr__()))
# Not necessary anymore - cpu decoding works
# log.debug("cpu = {}".format(cpu_header.__repr__()))
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 / IPv6(cpu_header.load)
log.debug("reassambled={}".format(orig_packet.__repr__()))
if cpu_header.task == self.task['DEBUG']: # Bug? This might be IPv4 as well later!
log.debug("Debug purpose only") orig_packet = ether_orig / IPv6(cpu_header.load)
if ICMPv6ND_NS in orig_packet and orig_packet['IPv6'].src == '::':
log.debug("Neighbor solicitation for checking her own IP address")
elif cpu_header.task == self.task['DEBUG']:
log.debug("reassambled={}".format(orig_packet.__repr__()))
elif cpu_header.task == self.task['ICMP6_NS']: elif cpu_header.task == self.task['ICMP6_NS']:
log.info("Doing neighbor solicitation") log.info("Doing neighbor solicitation for the switch in the controller")
self.handle_icmp6_ns(orig_packet) self.handle_icmp6_ns(orig_packet)
elif cpu_header.task == self.task['ICMP6_GENERAL']: elif cpu_header.task == self.task['ICMP6_GENERAL']:
if ICMPv6EchoRequest in orig_packet: if ICMPv6EchoRequest in orig_packet: