File feature-upstream-new-check-config-1.patch of Package firewalld.24873

From 51260672a597367b71be33c3264cf64124f7e97a Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Fri, 5 Nov 2021 15:59:41 -0400
Subject: [PATCH] fix(io): _check_config() expects a dict

Some _check_config() implementations look for keys in the all_config
argument. Unfortunately when io.check_config() is called it passes a
tuple of tuple.

Solution is to make io.check_config() call io.check_config_dict().
---
 src/firewall/core/io/io_object.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: firewalld-0.9.3/src/firewall/core/io/io_object.py
===================================================================
--- firewalld-0.9.3.orig/src/firewall/core/io/io_object.py
+++ firewalld-0.9.3/src/firewall/core/io/io_object.py
@@ -115,9 +115,10 @@ class IO_Object(object):
                 errors.INVALID_TYPE,
                 "structure size mismatch %d != %d" % \
                 (len(conf), len(self.IMPORT_EXPORT_STRUCTURE)))
-        for i,(element,value) in enumerate(self.IMPORT_EXPORT_STRUCTURE):
-            self._check_config_structure(conf[i], value)
-            self._check_config(conf[i], element, conf)
+        conf_dict = {}
+        for i,(x,y) in enumerate(self.IMPORT_EXPORT_STRUCTURE):
+            conf_dict[x] = conf[i]
+        self.check_config_dict(conf_dict)
 
     def check_config_dict(self, conf):
         type_formats = dict([(x[0], x[1]) for x in self.IMPORT_EXPORT_STRUCTURE])
openSUSE Build Service is sponsored by