From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH firewall 1/2] compile: report rule errors to syslog if running as daemon
Date: Wed, 2 Jul 2025 15:03:46 +0200 [thread overview]
Message-ID: <20250702130350.1841508-1-c.heiss@proxmox.com> (raw)
.. otherwise, they just get silently swallowed and never reported to the
user/service log.
Signed-off-by: Christoph Heiss <c.heiss@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-07-02 13:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 13:03 Christoph Heiss [this message]
2025-07-02 13:09 ` [pve-devel] [PATCH RFC firewall 2/2] firewall: adjust to new qemu-server module structure Christoph Heiss
2025-07-03 7:37 ` Fabian Grünbichler
2025-07-03 13:04 ` [pve-devel] applied-series: " Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250702130350.1841508-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.