diff --git a/p4app/controller.py b/p4app/controller.py index ba4b5bb..8e536ef 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -381,16 +381,21 @@ class L2Controller(object): pass elif packet.type == 0x4242: 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) - orig_packet = ether_orig / IPv6(cpu_header.load) - log.debug("reassambled={}".format(orig_packet.__repr__())) - if cpu_header.task == self.task['DEBUG']: - log.debug("Debug purpose only") + # Bug? This might be IPv4 as well later! + 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']: - log.info("Doing neighbor solicitation") + log.info("Doing neighbor solicitation for the switch in the controller") self.handle_icmp6_ns(orig_packet) elif cpu_header.task == self.task['ICMP6_GENERAL']: if ICMPv6EchoRequest in orig_packet: