Blame SOURCES/firewalld-0.3.9-RHBZ#1054270_36a54c11.patch

36ae71
commit 36a54c1132ea6df16fc8fe572dc02cd9218297cb
36ae71
Author: Thomas Woerner <twoerner@redhat.com>
36ae71
Date:   Thu Jan 16 14:34:55 2014 +0100
36ae71
36ae71
    - fixed rich rule apply from settings (RHBZ#1054068)
36ae71
    
36ae71
    In settings the rule is saved in the rule_id format. A Rich_Rule has to be
36ae71
    recreated to be able to use the rule.
36ae71
36ae71
diff --git a/src/firewall/core/fw_zone.py b/src/firewall/core/fw_zone.py
36ae71
index b1310b1..8921bba 100644
36ae71
--- a/src/firewall/core/fw_zone.py
36ae71
+++ b/src/firewall/core/fw_zone.py
36ae71
@@ -307,7 +307,7 @@ class FirewallZone:
36ae71
                     elif key == "masquerade":
36ae71
                         self.add_masquerade(zone)
36ae71
                     elif key == "rules":
36ae71
-                        self.add_rule(zone, args)
36ae71
+                        self.add_rule(zone, Rich_Rule(rule_str=args))
36ae71
                     elif key == "interfaces":
36ae71
                         self.change_zone_of_interface(zone, args)
36ae71
                     elif key == "sources":
36ae71
@@ -341,7 +341,8 @@ class FirewallZone:
36ae71
                     elif key == "masquerade":
36ae71
                         self.__masquerade(enable, zone)
36ae71
                     elif key == "rules":
36ae71
-                        mark = self.__rule(enable, zone, args)
36ae71
+                        mark = self.__rule(enable, zone,
36ae71
+                                           Rich_Rule(rule_str=args), None)
36ae71
                         obj.settings["rules"][args]["mark"] = mark
36ae71
                     elif key == "interfaces":
36ae71
                         self.__interface(enable, zone, args)