pass in prefix len

This commit is contained in:
Nico Schottelius 2019-03-04 15:38:16 +01:00
parent cf844477a9
commit c60b5f2d9e

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)