[numeros_disponibles] Ne pas distribuer les .0 et les .255
Ignore-this: d181e3e764704054e42005c419347dcb darcs-hash:20111121131320-3651d-d8bd7f201c4048f31cbdda1ef3dea1a72b2f5bba.gz
This commit is contained in:
parent
21300a1e7b
commit
a84edd327c
1 changed files with 2 additions and 2 deletions
|
@ -54,11 +54,11 @@ def update_ip(plage, occupees):
|
|||
for i in ip:
|
||||
n.append(int(i))
|
||||
while 1:
|
||||
if n[3] < 255:
|
||||
if n[3] < 254:
|
||||
n[3] += 1
|
||||
else:
|
||||
n[2] += 1
|
||||
n[3] = 0
|
||||
n[3] = 1
|
||||
if n[2] == 255: break
|
||||
ip = "%d.%d.%d.%d" % tuple(n)
|
||||
if not AddrInNet(ip, ne):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue