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