Don't load entities for docker virtual ethernet interfaces in System Monitor (#107966)

This commit is contained in:
G Johansson 2024-01-13 20:39:34 +01:00 committed by GitHub
parent 852a73267f
commit 5d3e069655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,9 @@ def get_all_network_interfaces() -> set[str]:
"""Return all network interfaces on system."""
interfaces: set[str] = set()
for interface, _ in psutil.net_if_addrs().items():
if interface.startswith("veth"):
# Don't load docker virtual network interfaces
continue
interfaces.add(interface)
_LOGGER.debug("Adding interfaces: %s", ", ".join(interfaces))
return interfaces