firewalld/backport-fix-functions-check-config-fails-if-direct.xml-exists.patch
xinghe 1edcb32374 fix Community bugs
(cherry picked from commit ba447285bdddb3688f2e3f28e17b9db47da7f82a)
2022-09-02 09:42:55 +08:00

38 lines
1.6 KiB
Diff

From 1439a47f55ae7d226639237948fb1fab49aa81b4 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Wed, 23 Mar 2022 14:55:00 -0400
Subject: [PATCH] fix(functions): --check-config fails if direct.xml exists
Conflict: NA
Reference: https://github.com/firewalld/firewalld/commit/1439a47f55ae7d226639237948fb1fab49aa81b4
Fixes: 3b466b8bf092 ("fix(check-config): use the dictionary variants")
(cherry picked from commit cf9ffb678134dc498c4b08444e17792e340d04a9)
---
src/firewall/core/io/functions.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/firewall/core/io/functions.py b/src/firewall/core/io/functions.py
index c357223a..63e3407d 100644
--- a/src/firewall/core/io/functions.py
+++ b/src/firewall/core/io/functions.py
@@ -83,7 +83,7 @@ def check_config(fw):
try:
obj = Direct(config.FIREWALLD_DIRECT)
obj.read()
- obj.check_config_dict(obj.export_config_dict())
+ obj.check_config(obj.export_config())
except FirewallError as error:
raise FirewallError(error.code, "'%s': %s" % (config.FIREWALLD_DIRECT, error.msg))
except Exception as msg:
@@ -92,7 +92,7 @@ def check_config(fw):
try:
obj = LockdownWhitelist(config.LOCKDOWN_WHITELIST)
obj.read()
- obj.check_config_dict(obj.export_config_dict())
+ obj.check_config(obj.export_config())
except FirewallError as error:
raise FirewallError(error.code, "'%s': %s" % (config.LOCKDOWN_WHITELIST, error.msg))
except Exception as msg:
--
2.23.0