Blame SOURCES/0019-fix-fw-when-checking-tables-make-sure-to-check-the-a.patch

47f735
From 0ada4672b42c426de1ffc7f3ae2416629225369f Mon Sep 17 00:00:00 2001
47f735
From: Eric Garver <eric@garver.life>
47f735
Date: Mon, 15 Feb 2021 09:53:02 -0500
47f735
Subject: [PATCH 19/22] fix(fw): when checking tables make sure to check the
47f735
 actual backend
47f735
47f735
Calling get_backend_by_ipv() will return nftables if we're using
47f735
nftables backend, but we really need to check if iptables, et al. are
47f735
available.
47f735
47f735
(cherry picked from commit 48d97fb40929afbc1b0bc82759ad75b1937f6e3f)
47f735
(cherry picked from commit fba59a99735ec46d787141350564137abfec0c87)
47f735
---
47f735
 src/firewall/core/fw.py | 12 ++++++------
47f735
 1 file changed, 6 insertions(+), 6 deletions(-)
47f735
47f735
diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
47f735
index 15284a4929e9..3eb54e37ab5c 100644
47f735
--- a/src/firewall/core/fw.py
47f735
+++ b/src/firewall/core/fw.py
47f735
@@ -131,18 +131,18 @@ class Firewall(object):
47f735
     def _check_tables(self):
47f735
         # check if iptables, ip6tables and ebtables are usable, else disable
47f735
         if self.ip4tables_enabled and \
47f735
-           "filter" not in self.get_backend_by_ipv("ipv4").get_available_tables():
47f735
-            log.warning("iptables not usable, disabling IPv4 firewall.")
47f735
+           "filter" not in self.ip4tables_backend.get_available_tables():
47f735
+            log.info1("iptables is not usable.")
47f735
             self.ip4tables_enabled = False
47f735
 
47f735
         if self.ip6tables_enabled and \
47f735
-           "filter" not in self.get_backend_by_ipv("ipv6").get_available_tables():
47f735
-            log.warning("ip6tables not usable, disabling IPv6 firewall.")
47f735
+           "filter" not in self.ip6tables_backend.get_available_tables():
47f735
+            log.info1("ip6tables is not usable.")
47f735
             self.ip6tables_enabled = False
47f735
 
47f735
         if self.ebtables_enabled and \
47f735
-           "filter" not in self.get_backend_by_ipv("eb").get_available_tables():
47f735
-            log.warning("ebtables not usable, disabling ethernet bridge firewall.")
47f735
+           "filter" not in self.ebtables_backend.get_available_tables():
47f735
+            log.info1("ebtables is not usable.")
47f735
             self.ebtables_enabled = False
47f735
 
47f735
         # is there at least support for ipv4 or ipv6
47f735
-- 
47f735
2.27.0
47f735