This commit is contained in:
Grayton Ward 2021-09-15 00:12:42 -04:00 committed by GitHub
commit 60fbb1b42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -244,8 +244,10 @@ class ProxmoxAPI(object):
try:
# IP address validation
if socket.inet_aton(ip_address):
# Ignore localhost
if ip_address != '127.0.0.1':
# Ignore localhost and docker IPs
if (ip_address != '127.0.0.1' and # Ignore localhost
"02:42" not in network["hardware-address"] and # Ingore Docker Interfaces
"veth" not in network["name"]): # Ignore virtual ethernet ports
system_info.ip_address = ip_address
except socket.error:
pass
@ -256,8 +258,11 @@ class ProxmoxAPI(object):
try:
# IP address validation
if socket.inet_aton(ip_address['ip-address']):
# Ignore localhost
if ip_address['ip-address'] != '127.0.0.1':
if (ip_address['ip-address'] != '127.0.0.1' and # Ignore localhost
"02:42" not in network["hardware-address"] and # Ingore Docker Interfaces
"veth" not in network["name"]): # Ignore virtual ethernet ports
system_info.ip_address = ip_address['ip-address']
except socket.error:
pass