Skip to content
Snippets Groups Projects
Commit 03daacce authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix default available IPs

We should reserve 10 addresses at the beginning and 5 at the end.
Meaning for a /24 network, we should start at 11 and end at 249.
parent bf0dac5e
No related branches found
No related tags found
No related merge requests found
......@@ -415,9 +415,9 @@ def retrieve_ips(subnet, prefix):
data = {'ips': [], 'first': '', 'last': ''}
else:
hosts = [str(ip) for ip in address.hosts()]
if len(hosts) > 15:
first = hosts[9]
last = hosts[-5]
if len(hosts) > 17:
first = hosts[10]
last = hosts[-6]
else:
first = hosts[0]
last = hosts[-1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment