From 39eb3807f3497fffeea19183691b54489a811239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=A4gele?= Date: Tue, 8 Sep 2015 15:28:05 +0200 Subject: [PATCH] fix #894 by actually updating with the modified settings --- system/firewalld.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/firewalld.py b/system/firewalld.py index 9a63da3a544..47d98544000 100644 --- a/system/firewalld.py +++ b/system/firewalld.py @@ -76,7 +76,7 @@ options: notes: - Not tested on any Debian based system. requirements: [ 'firewalld >= 0.2.11' ] -author: "Adam Miller (@maxamillion)" +author: "Adam Miller (@maxamillion)" ''' EXAMPLES = ''' @@ -138,7 +138,7 @@ def set_port_disabled_permanent(zone, port, protocol): #################### # source handling -# +# def get_source(zone, source): fw_zone = fw.config().getZoneByName(zone) fw_settings = fw_zone.getSettings() @@ -151,11 +151,13 @@ def add_source(zone, source): fw_zone = fw.config().getZoneByName(zone) fw_settings = fw_zone.getSettings() fw_settings.addSource(source) + fw_zone.update(fw_settings) def remove_source(zone, source): fw_zone = fw.config().getZoneByName(zone) fw_settings = fw_zone.getSettings() fw_settings.removeSource(source) + fw_zone.update(fw_settings) #################### # service handling @@ -191,7 +193,7 @@ def set_service_disabled_permanent(zone, service): fw_settings = fw_zone.getSettings() fw_settings.removeService(service) fw_zone.update(fw_settings) - + #################### # rich rule handling