|
|
dddd59 |
commit 42faa017bdf89ea4d050ee7a5d5a283cd28e6e8c
|
|
|
dddd59 |
Author: Thomas Woerner <twoerner@redhat.com>
|
|
|
dddd59 |
Date: Wed Aug 24 19:09:50 2016 +0200
|
|
|
dddd59 |
|
|
|
dddd59 |
firewall.core.fw_transaction: Load helper modules in FirewallZoneTransaction
|
|
|
dddd59 |
|
|
|
dddd59 |
Helper modules for services that are enabled in the default zone have been
|
|
|
dddd59 |
loaded before, but not for zones that are enabled later on because of a
|
|
|
dddd59 |
interface/source binding.
|
|
|
dddd59 |
|
|
|
dddd59 |
This happened because for these zones the FirewallZoneTransaction is used
|
|
|
dddd59 |
directly and because of this the added modules are simply not used.
|
|
|
dddd59 |
|
|
|
dddd59 |
diff --git a/src/firewall/core/fw_transaction.py b/src/firewall/core/fw_transaction.py
|
|
|
dddd59 |
index c5dfc0c..9d4c522 100644
|
|
|
dddd59 |
--- a/src/firewall/core/fw_transaction.py
|
|
|
dddd59 |
+++ b/src/firewall/core/fw_transaction.py
|
|
|
dddd59 |
@@ -321,6 +321,18 @@ class FirewallZoneTransaction(SimpleFirewallTransaction):
|
|
|
dddd59 |
del self.chains[:]
|
|
|
dddd59 |
del self.modules[:]
|
|
|
dddd59 |
|
|
|
dddd59 |
+ def prepare(self, enable, rules=None, modules=None):
|
|
|
dddd59 |
+ log.debug4("%s.prepare(%s, %s)" % (type(self), enable, "..."))
|
|
|
dddd59 |
+
|
|
|
dddd59 |
+ rules, modules = super(FirewallZoneTransaction, self).prepare(
|
|
|
dddd59 |
+ enable, rules, modules)
|
|
|
dddd59 |
+
|
|
|
dddd59 |
+ for module in self.modules:
|
|
|
dddd59 |
+ if module not in modules:
|
|
|
dddd59 |
+ modules.append(module)
|
|
|
dddd59 |
+
|
|
|
dddd59 |
+ return rules, modules
|
|
|
dddd59 |
+
|
|
|
dddd59 |
def add_chain(self, table, chain):
|
|
|
dddd59 |
table_chain = (table, chain)
|
|
|
dddd59 |
if table_chain not in self.chains:
|