From 9f05e57509d82c160a1338c05a936e90695b606e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 23 Mar 2019 14:18:48 +0100 Subject: [PATCH] Update table handling for NDP in the switch --- p4app/controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p4app/controller.py b/p4app/controller.py index ed2c75a..c18f6a7 100755 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -50,7 +50,7 @@ class L2Controller(object): # https://en.wikipedia.org/wiki/Solicited-node_multicast_address 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['v6_mask'] = 64 @@ -179,10 +179,11 @@ class L2Controller(object): def init_ndp_in_switch(self, addr): icmp6_addr = self.gen_ndp_multicast_addr(addr) icmp6_net = "{}/128".format(icmp6_addr) + mac_addr = self.info['mac_addr'] self.controller.table_add("v6_networks", "icmp6_neighbor_solicitation", - [str(icmp6_net)], [str(addr)]) + [str(icmp6_net)], [str(addr), str(mac_addr)]) def fill_tables(self): self.controller.table_clear("v6_networks")