mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Do not permit duplicate IP addresses for device
FIXES #177 Apply the change suggested in the issue body: UISP can report devices with duplicate IP addresses across interfaces. Check that an IP address is unique before applying it. Changed for both Flat and Hierarchy networks.
This commit is contained in:
parent
b9b344464c
commit
85becbd5c6
@ -54,7 +54,9 @@ def buildFlatGraph():
|
||||
for ip in interface["addresses"]:
|
||||
ip = ip["cidr"]
|
||||
if isIpv4Permitted(ip):
|
||||
ipv4.append(fixSubnet(ip))
|
||||
ip = fixSubnet(ip)
|
||||
if ip not in ipv4:
|
||||
ipv4.append(ip)
|
||||
|
||||
# TODO: Figure out Mikrotik IPv6?
|
||||
mac = device['identification']['mac']
|
||||
@ -157,7 +159,9 @@ def buildFullGraph():
|
||||
for ip in interface["addresses"]:
|
||||
ip = ip["cidr"]
|
||||
if isIpv4Permitted(ip):
|
||||
ipv4.append(fixSubnet(ip))
|
||||
ip = fixSubnet(ip)
|
||||
if ip not in ipv4:
|
||||
ipv4.append(ip)
|
||||
|
||||
# TODO: Figure out Mikrotik IPv6?
|
||||
mac = device['identification']['mac']
|
||||
|
Loading…
Reference in New Issue
Block a user