]> git.proxmox.com Git - pve-common.git/commitdiff
fix #4547: set MTU on dynamically created vlan bridges
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 24 Feb 2023 11:06:21 +0000 (12:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 Feb 2023 16:01:40 +0000 (17:01 +0100)
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>
src/PVE/Network.pm

index 355637b15086278e15751f32167cf61ff2c2b773..22ca5b3cc120d700a66640778f9565fabadbbfca 100644 (file)
@@ -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);