public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH common] fix #4547: set MTU on dynamically created vlan bridges
@ 2023-02-24 11:06 Dominik Csapak
  2023-02-24 16:03 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2023-02-24 11:06 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: Re: [PATCH common] fix #4547: set MTU on dynamically created vlan bridges
  2023-02-24 11:06 [pve-devel] [PATCH common] fix #4547: set MTU on dynamically created vlan bridges Dominik Csapak
@ 2023-02-24 16:03 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-02-24 16:03 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 24/02/2023 12:06, Dominik Csapak wrote:
> 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

meh, if we adopt that view on what a breaking change is we wouldn't
be allowed to fix any bug ;-)  

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

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-24 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 11:06 [pve-devel] [PATCH common] fix #4547: set MTU on dynamically created vlan bridges Dominik Csapak
2023-02-24 16:03 ` [pve-devel] applied: " Thomas Lamprecht

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