From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-firewall] nftables: add support for mark-keyed verdict maps
Date: Wed, 23 Sep 2026 12:01:11 +0200 [thread overview]
Message-ID: <c9e3da74-822f-4d6b-81ba-467b1238fea5@proxmox.com> (raw)
In-Reply-To: <20260827131756.1413841-1-h.laimer@proxmox.com>
lgtm
Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com>
On 8/27/26 3:18 PM, Hannes Laimer wrote:
> nftables sets and maps can be keyed by the packet mark, but the mark
> element type has not yet been exposed by proxmox-nftables. A vmap
> statement could so far only be parsed, not constructed, so the only ones
> in use come from the static ruleset skeleton. Add both to the lib.
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> proxmox-nftables/src/statement.rs | 9 +++++++++
> proxmox-nftables/src/types.rs | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/proxmox-nftables/src/statement.rs b/proxmox-nftables/src/statement.rs
> index 44a4c48..0416623 100644
> --- a/proxmox-nftables/src/statement.rs
> +++ b/proxmox-nftables/src/statement.rs
> @@ -312,6 +312,15 @@ pub struct Vmap {
> data: Expression,
> }
>
> +impl Vmap {
> + pub fn new(key: impl Into<Expression>, data: impl Into<Expression>) -> Self {
> + Self {
> + key: key.into(),
> + data: data.into(),
> + }
> + }
> +}
> +
> #[derive(Clone, Debug, Deserialize, Serialize)]
> pub struct Match {
> op: Operator,
> diff --git a/proxmox-nftables/src/types.rs b/proxmox-nftables/src/types.rs
> index 86ccaf8..f79229b 100644
> --- a/proxmox-nftables/src/types.rs
> +++ b/proxmox-nftables/src/types.rs
> @@ -56,6 +56,7 @@ pub enum ElementType {
> Ifname,
> Ipv4Addr,
> Ipv6Addr,
> + Mark,
> }
> proxmox_serde::forward_display_to_serialize!(ElementType);
>
next prev parent reply other threads:[~2026-09-23 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 13:17 [PATCH proxmox-firewall] nftables: add support for mark-keyed verdict maps Hannes Laimer
2026-09-23 10:01 ` Stefan Hanreich [this message]
2026-09-23 19:15 ` applied: " Thomas Lamprecht
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=c9e3da74-822f-4d6b-81ba-467b1238fea5@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox