From 1cbe39d4260c633da4b7110d6e2e7722b8454af4 Mon Sep 17 00:00:00 2001 From: Eric Garver Date: Tue, 27 Apr 2021 08:56:13 -0400 Subject: [PATCH 27/30] fix(nm): reload: only consider NM connections with a real interface Where real interface means linux interface capable of having an IP address and does not exceed IFNAMSIZ. Fixes: rhbz 1928860 (cherry picked from commit f18f1cc96503fbc5d42f30ecdc6f0da4c56aac4d) (cherry picked from commit 7e9c4a5072ee3fd1aaf4162ef6ef1bf84b8a82eb) --- src/firewall/core/fw_nm.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/firewall/core/fw_nm.py b/src/firewall/core/fw_nm.py index 37282a1a7711..0e38dd47e927 100644 --- a/src/firewall/core/fw_nm.py +++ b/src/firewall/core/fw_nm.py @@ -141,7 +141,9 @@ def nm_get_connections(connections, connections_name): connections_name[uuid] = name for dev in devices: - connections[dev.get_iface()] = uuid + ip_iface = dev.get_ip_iface() + if ip_iface: + connections[ip_iface] = uuid def nm_get_interfaces(): """Get active interfaces from NM @@ -169,7 +171,9 @@ def nm_get_interfaces(): continue for dev in active_con.get_devices(): - active_interfaces.append(dev.get_iface()) + ip_iface = dev.get_ip_iface() + if ip_iface: + active_interfaces.append(ip_iface) return active_interfaces -- 2.27.0