File 0001-firewalld-fix-runtime-to-permanent-if-NM-not-in-use.patch of Package firewalld.10042
From f1c17415c587b3863e3a87bfb41223dfd1abc04a Mon Sep 17 00:00:00 2001
From: Eric Garver <e@erig.me>
Date: Tue, 9 Oct 2018 14:55:21 -0400
Subject: [PATCH] firewalld: fix --runtime-to-permanent if NM not in use.
Due to scope "settings" was not defined.
Fixes: #404
Fixes: e7c00a4063ff ("ifcfg: Modify ZONE= on permanent config changes")
(cherry picked from commit 17adfe4137cfd1c1734ff1b77304f70e163313fa)
---
src/firewall/server/firewalld.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/firewall/server/firewalld.py b/src/firewall/server/firewalld.py
index 6f1331b2..113df35d 100644
--- a/src/firewall/server/firewalld.py
+++ b/src/firewall/server/firewalld.py
@@ -436,8 +436,8 @@ class FirewallD(slip.dbus.service.Object):
nm_bus_name = nm_get_bus_name()
for name in self.fw.zone.get_zones():
conf = self.getZoneSettings(name)
- if nm_bus_name != None:
- settings = FirewallClientZoneSettings(conf)
+ settings = FirewallClientZoneSettings(conf)
+ if nm_bus_name is not None:
changed = False
for interface in settings.getInterfaces():
if self.fw.zone.interface_get_sender(name, interface) == nm_bus_name:
--
2.20.1