Update table handling for NDP in the switch
This commit is contained in:
parent
9f5a37f7f6
commit
9f05e57509
|
@ -50,7 +50,7 @@ class L2Controller(object):
|
||||||
|
|
||||||
# https://en.wikipedia.org/wiki/Solicited-node_multicast_address
|
# https://en.wikipedia.org/wiki/Solicited-node_multicast_address
|
||||||
self.info['ndp_multicast'] = ipaddress.ip_network("ff02::1:ff00:0/104")
|
self.info['ndp_multicast'] = ipaddress.ip_network("ff02::1:ff00:0/104")
|
||||||
self.info['mac_address'] = "00:00:0a:00:00:42"
|
self.info['mac_addr'] = "00:00:0a:00:00:42"
|
||||||
self.info['ipv6_link_local'] = ipaddress.ip_address("fe80::200:aff:fe00:42")
|
self.info['ipv6_link_local'] = ipaddress.ip_address("fe80::200:aff:fe00:42")
|
||||||
|
|
||||||
self.info['v6_mask'] = 64
|
self.info['v6_mask'] = 64
|
||||||
|
@ -179,10 +179,11 @@ class L2Controller(object):
|
||||||
def init_ndp_in_switch(self, addr):
|
def init_ndp_in_switch(self, addr):
|
||||||
icmp6_addr = self.gen_ndp_multicast_addr(addr)
|
icmp6_addr = self.gen_ndp_multicast_addr(addr)
|
||||||
icmp6_net = "{}/128".format(icmp6_addr)
|
icmp6_net = "{}/128".format(icmp6_addr)
|
||||||
|
mac_addr = self.info['mac_addr']
|
||||||
|
|
||||||
self.controller.table_add("v6_networks",
|
self.controller.table_add("v6_networks",
|
||||||
"icmp6_neighbor_solicitation",
|
"icmp6_neighbor_solicitation",
|
||||||
[str(icmp6_net)], [str(addr)])
|
[str(icmp6_net)], [str(addr), str(mac_addr)])
|
||||||
|
|
||||||
def fill_tables(self):
|
def fill_tables(self):
|
||||||
self.controller.table_clear("v6_networks")
|
self.controller.table_clear("v6_networks")
|
||||||
|
|
Loading…
Reference in New Issue