__findFirstOctetIP() is expecting min and max available octets according to
its code, however the caller getFreeIP() gives it the min octet and (max -
min + 1), which is the length instead.
Signed-off-by: Zhu Yanhai <gaoyang.zyh@taobao.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
def setUsedIP(self, domname, interface, ip):
self.used_ips['%s:%s' % (domname, interface)] = ip
- def __findFirstOctetIP(self, prefix, min, max):
+ def __findFirstOctetIP(self, prefix, min, len):
+ max = min + len
for i in range(min, max):
ip = '%s%s' % (prefix, str(i))
found = False