Blame SOURCES/0027-fix-nm-reload-only-consider-NM-connections-with-a-re.patch

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