public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Ilan Karasik <ilankarasik@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: iamkarasik <ilankarasik@gmail.com>
Subject: [PATCH pve-container] fix #7571: emit mtu in ifupdown-based LXC guests
Date: Wed,  6 May 2026 19:00:02 -0400	[thread overview]
Message-ID: <20260506230002.36906-1-ilankarasik@gmail.com> (raw)

From: iamkarasik <ilankarasik@gmail.com>

Signed-off-by: iamkarasik <ilankarasik@gmail.com>
---
 src/PVE/LXC/Setup/Debian.pm | 3 +++
 1 file changed, 3 insertions(+)

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} = 1;
                 }
             }
+            $net->{mtu} = $d->{mtu} if defined($d->{mtu});
             $networks->{ $d->{name} } = $net if keys %$net;
         }
     }
@@ -337,6 +338,7 @@ sub setup_network {
                         $interfaces .= "\tgateway $gw\n";
                     }
                 }
+                $interfaces .= "\tmtu $net->{mtu}\n" if defined($net->{mtu});
                 foreach my $attr (@{ $section->{attr} }) {
                     $interfaces .= "\t$attr\n";
                 }
@@ -450,6 +452,7 @@ sub setup_network {
                     || $aname eq 'netmask'
                     || $aname eq 'gateway'
                     || $aname eq 'broadcast'
+                    || $aname eq 'mtu'
                 ) {
                     # skip
                 } else {
-- 
2.51.2




                 reply	other threads:[~2026-05-07  9:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260506230002.36906-1-ilankarasik@gmail.com \
    --to=ilankarasik@gmail.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