Adjust table parameters

This commit is contained in:
Nico Schottelius 2019-03-14 16:43:57 +01:00
parent 353ed9e5e6
commit 71c8155cd2

View file

@ -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):