From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-firewall 1/3] nftables: add support for auto-merge set option
Date: Thu, 25 Sep 2025 18:12:45 +0200 [thread overview]
Message-ID: <20250925161250.436548-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250925161250.436548-1-s.hanreich@proxmox.com>
nftables sets do not support overlapping ranges in ipsets with the
interval flag enabled, unless explicitly enabled via auto-merge. This
option has not yet been exposed by proxmox-nftables, so add it to the
library. This requires at least nftables 1.1.0 to work, which is
available since Debian trixie.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-nftables/src/types.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/proxmox-nftables/src/types.rs b/proxmox-nftables/src/types.rs
index c613e64..c146d9c 100644
--- a/proxmox-nftables/src/types.rs
+++ b/proxmox-nftables/src/types.rs
@@ -500,6 +500,9 @@ pub struct SetConfig {
#[serde(skip_serializing_if = "Option::is_none")]
size: Option<i64>,
+
+ #[serde(skip_serializing_if = "Option::is_none")]
+ auto_merge: Option<bool>,
}
impl SetConfig {
@@ -512,6 +515,7 @@ impl SetConfig {
timeout: None,
gc_interval: None,
size: None,
+ auto_merge: None,
}
}
@@ -523,6 +527,11 @@ impl SetConfig {
self.flags.push(flag);
self
}
+
+ pub fn with_auto_merge(mut self, auto_merge: bool) -> Self {
+ self.auto_merge = Some(auto_merge);
+ self
+ }
}
#[derive(Clone, Debug, Deserialize, Serialize)]
--
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-09-25 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-25 16:12 [pve-devel] [PATCH proxmox-firewall 0/3] create ipsets with auto-merge option enabled Stefan Hanreich
2025-09-25 16:12 ` Stefan Hanreich [this message]
2025-09-25 16:12 ` [pve-devel] [PATCH proxmox-firewall 2/3] firewall: set auto-merge flag for ipsets Stefan Hanreich
2025-09-25 16:12 ` [pve-devel] [PATCH proxmox-firewall 3/3] firewall: tests: regenerate snapshot Stefan Hanreich
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=20250925161250.436548-2-s.hanreich@proxmox.com \
--to=s.hanreich@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.