public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH common] fix #4547: set MTU on dynamically created vlan bridges
Date: Fri, 24 Feb 2023 12:06:21 +0100	[thread overview]
Message-ID: <20230224110621.765001-1-d.csapak@proxmox.com> (raw)

Otherwise the created vlan bridge has the default MTU, which is
unexpected when the original bridge has some other MTU configured.

We already do this for the firewall bridges, so we should do so too for
the vlan bridges.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
technically this is a breaking change i think, since someone might
depend on the fact that the vlan bridges always have the default mtu,
but there is no way to configure that besides from manually modifying
the /etc/network/interfaces file, so not completely sure
if we want to do that now, or with the next major release

 src/PVE/Network.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index 355637b..22ca5b3 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -620,6 +620,9 @@ sub activate_bridge_vlan {
 	    iface_create($bridgevlan, 'bridge');
 	}
 
+	my $bridgemtu = read_bridge_mtu($bridge);
+	eval { run_command(['/sbin/ip', 'link', 'set', $bridgevlan, 'mtu', $bridgemtu]) };
+
 	# for each physical interface (eth or bridge) bind them to bridge vlan
 	foreach my $iface (@ifaces) {
 	    activate_bridge_vlan_slave($bridgevlan, $iface, $tag);
-- 
2.30.2





             reply	other threads:[~2023-02-24 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 11:06 Dominik Csapak [this message]
2023-02-24 16:03 ` [pve-devel] 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=20230224110621.765001-1-d.csapak@proxmox.com \
    --to=d.csapak@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