From: Robert Obkircher <r.obkircher@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-firewall 1/2] api: firewall: add option to preserve comments
Date: Mon, 15 Dec 2025 16:08:45 +0100 [thread overview]
Message-ID: <20251215150906.257151-2-r.obkircher@proxmox.com> (raw)
In-Reply-To: <20251215150906.257151-1-r.obkircher@proxmox.com>
Signed-off-by: Robert Obkircher <r.obkircher@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 93f8c34..06384b4 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -1451,6 +1451,13 @@ our $host_option_properties = {
default => 0,
optional => 1,
},
+ preserve_comments => {
+ description => "Pass comments from the UI to the underlying firewall configuration. "
+ . "May involve truncation.",
+ type => 'boolean',
+ default => 0,
+ optional => 1,
+ },
};
our $vm_option_properties = {
@@ -3288,7 +3295,7 @@ sub parse_hostfw_option {
my $loglevels = "emerg|alert|crit|err|warning|notice|info|debug|nolog";
if ($line =~
- m/^(enable|nosmurfs|tcpflags|ndp|log_nf_conntrack|nf_conntrack_allow_invalid|protection_synflood|nftables):\s*(0|1)\s*$/i
+ m/^(enable|nosmurfs|tcpflags|ndp|log_nf_conntrack|nf_conntrack_allow_invalid|protection_synflood|nftables|preserve_comments):\s*(0|1)\s*$/i
) {
$opt = lc($1);
$value = int($2);
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-12-15 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 15:08 [pve-devel] [PATCH firewall/manager/proxmox{-ve-rs, -firewall} 0/5] fix #7068: show rule comments in iptables and nftables Robert Obkircher
2025-12-15 15:08 ` Robert Obkircher [this message]
2025-12-15 15:08 ` [pve-devel] [PATCH pve-firewall 2/2] fix #7068: show rule comments in iptables output Robert Obkircher
2025-12-15 15:08 ` [pve-devel] [PATCH pve-manager 1/1] ui: firewall: add preserve comments option Robert Obkircher
2025-12-15 15:08 ` [pve-devel] [PATCH proxmox-ve-rs 1/1] firewall: parse preserve_comments host firewall option Robert Obkircher
2025-12-15 15:08 ` [pve-devel] [PATCH proxmox-firewall 1/2] fix #7068: show rule comments in nftables output Robert Obkircher
2025-12-15 15:08 ` [pve-devel] [PATCH proxmox-firewall 2/2] firewall: add rule comments to snapshot tests Robert Obkircher
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=20251215150906.257151-2-r.obkircher@proxmox.com \
--to=r.obkircher@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox