[pve-devel] [PATCH 3/3] firewall instant API call update

Alen Grizonic a.grizonic at proxmox.com
Thu Jun 25 16:57:11 CEST 2015


Signed-off-by: Alen Grizonic <a.grizonic at proxmox.com>
---
 src/PVE/API2/Firewall/Cluster.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Firewall/Cluster.pm b/src/PVE/API2/Firewall/Cluster.pm
index ea51fcc..c4e2b63 100644
--- a/src/PVE/API2/Firewall/Cluster.pm
+++ b/src/PVE/API2/Firewall/Cluster.pm
@@ -175,7 +175,11 @@ __PACKAGE__->register_method({
 
 	PVE::Firewall::save_clusterfw_conf($cluster_conf);
 
-	PVE::Firewall::update();
+	# instant firewall update when using double (anti-lockout) API call
+	# -> not waiting for a firewall update at the first (timestamp enable) set
+	if (defined($param->{enable}) && ($param->{enable} > 1)) {
+	    PVE::Firewall::update();
+	}
 
 	return undef;
     }});
-- 
2.1.4





More information about the pve-devel mailing list