From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 832891FF14C for ; Fri, 26 Jun 2026 15:34:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AC3BD130CF; Fri, 26 Jun 2026 15:34:09 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-ve-rs 1/5] wireguard: add mtu option to wireguard interface properties Date: Fri, 26 Jun 2026 15:33:51 +0200 Message-ID: <20260626133357.274255-2-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260626133357.274255-1-s.hanreich@proxmox.com> References: <20260626133357.274255-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782480836900 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.592 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [wireguard.rs] Message-ID-Hash: SJM3XOPM3R6VOEHA6R2UCOAHJNTAOMRX X-Message-ID-Hash: SJM3XOPM3R6VOEHA6R2UCOAHJNTAOMRX X-MailFrom: s.hanreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This allows users to explicitly set the MTU that should be configured for the WireGuard interface. Signed-off-by: Stefan Hanreich --- .../sdn/fabric/section_config/protocol/wireguard.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs index a2d8c6e..aaeef35 100644 --- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs +++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs @@ -529,6 +529,10 @@ pub struct WireGuardInterfaceProperties { /// whether to generate an IPv6 link-local address for this interface #[serde(skip_serializing_if = "Option::is_none")] pub(crate) ip6_ll: Option, + + /// The MTU for this WireGuard interface. + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) mtu: Option, } impl WireGuardInterfaceProperties { @@ -551,6 +555,11 @@ impl WireGuardInterfaceProperties { pub fn ip6(&self) -> Option<&Ipv6Cidr> { self.ip6.as_ref() } + + /// Get the MTU set for this interface + pub fn mtu(&self) -> Option { + self.mtu + } } /// Determines whether the given `PersistentKeepalive` value means that it is @@ -590,6 +599,10 @@ pub struct WireGuardInterfaceCreateProperties { /// whether to generate an IPv6 link-local address for this interface #[serde(skip_serializing_if = "Option::is_none")] pub(crate) ip6_ll: Option, + + /// The MTU for this WireGuard interface. + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) mtu: Option, } pub mod private_keys { -- 2.47.3