pass in prefix len

This commit is contained in:
Nico Schottelius 2019-03-04 15:38:16 +01:00
parent cf844477a9
commit c60b5f2d9e
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ class L2Controller(object):
for v6route in self.v6_routes[self.mode]:
host = "h{}".format(v6route['port'])
dev = "{}-eth0".format(host)
net = ipaddress.ip_network(v6route['net'])
ipaddr = net[1]
net = v6route['net']
ipaddr = "{}/{}".format(net[1],net.prefix_len)
self.add_host_ips(host, str(net), str(ipaddr), dev)