diff --git a/doc/plan.org b/doc/plan.org index fb5cf2e..0af5f6d 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -113,7 +113,7 @@ | | | | | 2019-03-21 | Meet Laurent #3 | | | | - My dog ate my homework | | -| | | | +| | - Router solicitation for finding router on startup! | | | | | | | | | | | 2019-03-30 | NAT64 1:1 table ICMP, ICMPv6 working | | @@ -770,8 +770,8 @@ DEBUG:main:OUTGOING: >>> ****** Do we have a routing for fe80::/10? Probably not. Shouldn't we see it in the controller then? ****** TODO Implement address learning? - - +****** TODO Not sure whether we should react on router solicitation + - Using static routes -> should do the job ***** TODO Implement the calculation ***** TODO Sketch the flow for session handling for icmp6 w/o packet loss - switch receives icmp6 packet for known prefix diff --git a/p4app/controller.py b/p4app/controller.py index d670500..c0fe29c 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -49,6 +49,7 @@ class L2Controller(object): self.info={} self.info['ndp_multicast'] = ipaddress.ip_network("ff02::1:ff00:0/104") self.info['mac_address'] = "00:00:0a:00:00:42" + self.info['ipv6_link_local'] = ipaddress.ip_address("fe80::200:aff:fe00:42") self.info['v6_mask'] = 64 self.info['v6_base'] = ipaddress.ip_network("2001:db8::/32") @@ -399,7 +400,11 @@ class L2Controller(object): if ICMPv6ND_NS in orig_packet and orig_packet['IPv6'].src == '::': log.debug("Neighbor solicitation for checking her own IP address") elif ICMPv6MLReport2 in orig_packet and orig_packet['IPv6'].dst == 'ff02::16': - log.debug("Multicast registration -- should probably handle this") + mc_group = orig_packet['ICMPv6MLDMultAddrRec'].dst + log.debug("Multicast registration for {} from {} -- should probably handle this".format(mc_group, cpu_header['ingress_port'])) + elif ICMPv6ND_RS in orig_packet and orig_packet['IPv6'].dst == 'ff02::2': + 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__())) elif cpu_header.task == self.task['ICMP6_NS']: