[pve-devel] [PATCH pve-firewall 3/3] add syslog on pvefw chains removal

Alexandre Derumier aderumier at odiso.com
Wed Jan 9 14:56:53 CET 2019


---
 src/PVE/Firewall.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 1a9be89..dca1103 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -4157,8 +4157,10 @@ sub remove_pvefw_chains_iptables {
     $cmdlist .= "COMMIT\n";
 
     if($iptablescmd eq "ip6tables") {
+	syslog(info => "remove pvefw ip6tables chains");
 	ip6tables_restore_cmdlist($cmdlist);
     } else {
+	syslog(info => "remove pvefw iptables chains");
 	iptables_restore_cmdlist($cmdlist);
     }
 }
@@ -4174,7 +4176,10 @@ sub remove_pvefw_chains_ipset {
 	$cmdlist .= "destroy $chain\n";
     }
 
-    ipset_restore_cmdlist($cmdlist) if $cmdlist;
+    if($cmdlist) {
+	syslog(info => "remove pvefw ipset chains");
+	ipset_restore_cmdlist($cmdlist);
+    }
 }
 
 sub init {
-- 
2.11.0




More information about the pve-devel mailing list