mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-10-30 01:12:07 +00:00
Bug fix. Remove redundant break statement in IP allocation loop. (#1294)
* Remove redundant break statement in IP allocation loop. * Fix: append IP to allowed_ips list instead of overwriting it
This commit is contained in:
+1
-2
@@ -1054,9 +1054,8 @@ def API_addPeers(configName):
|
|||||||
if ipStatus:
|
if ipStatus:
|
||||||
for subnet in availableIps.keys():
|
for subnet in availableIps.keys():
|
||||||
for ip in availableIps[subnet]:
|
for ip in availableIps[subnet]:
|
||||||
allowed_ips = [ip]
|
allowed_ips.append(ip)
|
||||||
break
|
break
|
||||||
break
|
|
||||||
else:
|
else:
|
||||||
return ResponseObject(False, "No more available IP can assign")
|
return ResponseObject(False, "No more available IP can assign")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user