Convert network -> network_address

This commit is contained in:
Nico Schottelius 2019-03-14 16:59:55 +01:00
parent dfb50aefd7
commit 532f1be6ba

View file

@ -110,16 +110,16 @@ class L2Controller(object):
for mode in self.modes: for mode in self.modes:
self.nat64_map[mode] = [] self.nat64_map[mode] = []
# specific settings # specific settings -- only need the address (=offset), no mask
for mode in ["range_router"]: for mode in ["range_router"]:
for net in self.v6_routes[mode]: for net in self.v6_routes[mode]:
v6_net = net['net']I' v6_net = net['net'].network_address
v4_net = self.info['v4_nat64_map'].next() v4_net = self.info['v4_nat64_map'].next().network_address
self.nat64_map[mode].append({ self.nat64_map[mode].append({
"v6_network": v6_net, "v6_network": v6_net,
"v4_network": v4_net, "v4_network": v4_net,
"nat64_prefix": self.info['nat64_prefix'] "nat64_prefix": self.info['nat64_prefix'].network_address
}) })
self.init_boilerplate(sw_name) self.init_boilerplate(sw_name)