Blob Blame History Raw
From 54b9d3c0aab51a598162ccd58152861730b9cee7 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Wed, 29 Apr 2020 08:08:21 -0400
Subject: [PATCH 13/45] fix(direct): rule in a zone chain

Fixes: rhbz 1829104
Fixes: 3c439c9008ad ("chore: eliminate FirewallZoneTransaction class")
(cherry picked from commit f2941a82592b2ac6e9001b0d0f6c321fcb704005)
(cherry picked from commit f1d8753487e99ed8b3b036df36bedb861db00e65)
---
 src/firewall/core/fw_zone.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/firewall/core/fw_zone.py b/src/firewall/core/fw_zone.py
index 59c9401c1060..5677effab146 100644
--- a/src/firewall/core/fw_zone.py
+++ b/src/firewall/core/fw_zone.py
@@ -188,7 +188,7 @@ class FirewallZone(object):
             if splits[1] not in self.get_zones():
                 return None
             if len(splits) == 2 or \
-               (len(splits) == 3 and splits[2] in [ "log", "deny", "allow" ]):
+               (len(splits) == 3 and splits[2] in [ "pre", "log", "deny", "allow", "post" ]):
                 return (splits[1], _chain)
         return None
 
@@ -200,14 +200,12 @@ class FirewallZone(object):
             x = self.zone_from_chain(chain)
             if x is not None:
                 (_zone, _chain) = x
-
                 if use_transaction is None:
                     transaction = self.new_transaction()
                 else:
                     transaction = use_transaction
 
-                self.gen_chain_rules(_zone, True, [(table, _chain)],
-                                     transaction)
+                self.gen_chain_rules(_zone, True, table, _chain, transaction)
 
                 if use_transaction is None:
                     transaction.execute(True)
-- 
2.27.0