++ info ++ link local

This commit is contained in:
Nico Schottelius 2019-03-19 23:21:40 +01:00
commit 2a623a0807
2 changed files with 9 additions and 4 deletions

View file

@ -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']: