diff --git a/p4app/controller.py b/p4app/controller.py index 08ec9ac..813679c 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -214,17 +214,15 @@ class L2Controller(object): for nat64map in self.nat64_map[self.mode]: self.static_nat64_mapping(**nat64map) - def static_nat64_mapping(self, nat64_prefix, v6_network, v4_network): - nat64_prefix = str(v6_nat64_prefix) + nat64_prefix = str(nat64_prefix) net_ipv6 = str(v6_network) net_ipv4 = str(v4_network) + log.info("NAT64 map: {} -> {} -> {}".format(nat64_prefix, v6_network, v4_network)) - log.info("NAT64 map: {} -> {} -> {}".format(v6_nat64_prefix, v6_network, v4_network)) - - self.controller.table_add("v6_networks", "nat64_static", nat64_prefix, [net_ipv6], [net_ipv4]) - self.controller.table_add("v4_networks", "nat46_static", [net_ipv4], [net_ipv6]) + self.controller.table_add("v6_networks", "nat64_static", [nat64_prefix], [net_ipv6, net_ipv4, nat64_prefix]) + self.controller.table_add("v4_networks", "nat46_static", [net_ipv4], [net_ipv6, net_ipv4, nat64_prefix]) def config_hosts(self):