daemon: fixed issue with dhcp service and dealing with addresses with a prefix of 32

This commit is contained in:
Blake Harnden 2021-04-22 23:02:42 -07:00
parent 7938379e6d
commit dcf402ae04
2 changed files with 5 additions and 1 deletions

View file

@ -149,6 +149,8 @@ class DhcpService(ConfigService):
subnets = []
for iface in self.node.get_ifaces(control=False):
for ip4 in iface.ip4s:
if ip4.size == 1:
continue
# divide the address space in half
index = (ip4.size - 2) / 2
rangelow = ip4[index]