public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs v3 01/38] ve-config: firewall: add a constructor for sctp matches
Date: Tue, 22 Sep 2026 12:09:05 +0200	[thread overview]
Message-ID: <20260922100943.1151484-2-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260922100943.1151484-1-h.laimer@proxmox.com>

The tcp and udp matches can already be built from a port pair, while
an sctp match is only reachable by parsing rule options. Add the
missing constructor so a match can be assembled from parts for every
protocol that carries ports.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 proxmox-ve-config/src/firewall/types/rule_match.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/proxmox-ve-config/src/firewall/types/rule_match.rs b/proxmox-ve-config/src/firewall/types/rule_match.rs
index 8e142f7..8e9c0c6 100644
--- a/proxmox-ve-config/src/firewall/types/rule_match.rs
+++ b/proxmox-ve-config/src/firewall/types/rule_match.rs
@@ -437,6 +437,10 @@ pub struct Sctp {
 }
 
 impl Sctp {
+    pub fn new(ports: Ports) -> Self {
+        Self { ports }
+    }
+
     fn from_options(options: &RuleOptions) -> Result<Self, Error> {
         Ok(Self {
             ports: Ports::from_options(options)?,
-- 
2.47.3





  reply	other threads:[~2026-09-22 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 10:09 [PATCH access-control/cluster/docs/manager/network/proxmox{-ve-rs,-firewall,-perl-rs} v3 00/38] sdn: add microsegmentation support Hannes Laimer
2026-09-22 10:09 ` Hannes Laimer [this message]
2026-09-22 10:09 ` [PATCH proxmox-ve-rs v3 02/38] ve-config: sdn: add microseg signature-identity engine Hannes Laimer
2026-09-22 10:13 ` [PATCH access-control/cluster/docs/manager/network/proxmox{-ve-rs,-firewall,-perl-rs} v3 00/38] sdn: add microsegmentation support Hannes Laimer

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=20260922100943.1151484-2-h.laimer@proxmox.com \
    --to=h.laimer@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal