From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 3C1BF1FF0AA for ; Mon, 07 Sep 2026 16:04:51 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4F6642126D; Mon, 07 Sep 2026 16:04:47 +0200 (CEST) Date: Mon, 07 Sep 2026 16:04:35 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: [PATCH v2] fix #7571: emit mtu in ifupdown-based LXC guests To: Ilan Karasik , pve-devel@lists.proxmox.com References: <1781605179.y4iy928e70.astroid@yuna.none> <20260617183228.95036-2-ilankarasik@gmail.com> In-Reply-To: <20260617183228.95036-2-ilankarasik@gmail.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1788789833.n8xgk28l2s.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788789871520 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.859 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 53XEIP3AQ3ER7NF6F5EVURVQ2HTHLBLJ X-Message-ID-Hash: 53XEIP3AQ3ER7NF6F5EVURVQ2HTHLBLJ X-MailFrom: f.gruenbichler@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: On June 17, 2026 8:32 pm, Ilan Karasik wrote: > This fixes a bug where custom mtu settings applied to an LXC container > are silently ignored during network setup for Debian-based guests > using ifupdown. >=20 > Because the Proxmox network setup was failing to write the mtu value > to the guest's `/etc/network/interfaces` file, the container would > always default to an mtu of 1500. >=20 > This patch resolves the issue by writing the `mtu ` directive into= the > guest's network configuration file at /etc/network/interfaces. >=20 > Signed-off-by: Ilan Karasik > --- > src/PVE/LXC/Setup/Debian.pm | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/src/PVE/LXC/Setup/Debian.pm b/src/PVE/LXC/Setup/Debian.pm > index 837397b..bbf73d5 100644 > --- a/src/PVE/LXC/Setup/Debian.pm > +++ b/src/PVE/LXC/Setup/Debian.pm > @@ -284,6 +284,7 @@ sub setup_network { > $net->{needsroute6} =3D 1; > } > } > + $net->{mtu} =3D $d->{mtu} if defined($d->{mtu}); > $networks->{ $d->{name} } =3D $net if keys %$net; > } > } > @@ -337,6 +338,7 @@ sub setup_network { > $interfaces .=3D "\tgateway $gw\n"; > } > } > + $interfaces .=3D "\tmtu $net->{mtu}\n" if defined($net->= {mtu}); sorry for the long turnaround time! should we also set this higher up in the dhcp/manual part? > foreach my $attr (@{ $section->{attr} }) { > $interfaces .=3D "\t$attr\n"; > } > @@ -450,6 +452,7 @@ sub setup_network { > || $aname eq 'netmask' > || $aname eq 'gateway' > || $aname eq 'broadcast' > + || $aname eq 'mtu' > ) { > # skip > } else { > --=20 > 2.51.2 >=20 >=20 >=20 >=20 >=20