[pve-devel] [PATCH firewall 1/2] compile: report rule errors to syslog if running as daemon
Christoph Heiss
c.heiss at proxmox.com
Wed Jul 2 15:03:46 CEST 2025
.. otherwise, they just get silently swallowed and never reported to the
user/service log.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
src/PVE/Firewall.pm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 491c738..13112be 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -4392,7 +4392,14 @@ sub compile_iptables_filter {
);
}
};
- warn $@ if $@; # just to be sure - should not happen
+
+ if ($@) {
+ if ($verbose) { # running from cli
+ warn $@;
+ } else {
+ syslog('warn', "$@\n");
+ }
+ }
}
# generate firewall rules for LXC containers
--
2.49.0
More information about the pve-devel
mailing list