public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network] fix #5324: non vlanaware zone: add mtu to veth links
@ 2024-03-25 17:01 Alexandre Derumier
  2024-04-04 13:58 ` Stefan Hanreich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2024-03-25 17:01 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 src/PVE/Network/SDN/Zones/VlanPlugin.pm            | 3 +++
 src/test/zones/vlan/bridge/expected_sdn_interfaces | 4 ++++
 src/test/zones/vlan/bridge/sdn_config              | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 6a68e8d..13fb49e 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -106,17 +106,20 @@ sub generate_sdn_config {
 	@iface_config = ();
 	push @iface_config, "link-type veth";
 	push @iface_config, "veth-peer-name $vnet_uplinkpeer";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$vnet_uplink}}, @iface_config) if !$config->{$vnet_uplink};
 
 	@iface_config = ();
 	push @iface_config, "link-type veth";
 	push @iface_config, "veth-peer-name $vnet_uplink";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$vnet_uplinkpeer}}, @iface_config) if !$config->{$vnet_uplinkpeer};
 
 	@iface_config = ();
 	push @iface_config, "bridge_ports $bridge_ports $vnet_uplinkpeer";
 	push @iface_config, "bridge_stp off";
 	push @iface_config, "bridge_fd 0";
+	push @iface_config, "mtu $mtu" if $mtu;
 	push(@{$config->{$bridgevlan}}, @iface_config) if !$config->{$bridgevlan};
     }
 
diff --git a/src/test/zones/vlan/bridge/expected_sdn_interfaces b/src/test/zones/vlan/bridge/expected_sdn_interfaces
index f9e96d1..fc05ff7 100644
--- a/src/test/zones/vlan/bridge/expected_sdn_interfaces
+++ b/src/test/zones/vlan/bridge/expected_sdn_interfaces
@@ -4,20 +4,24 @@ auto ln_myvnet
 iface ln_myvnet
 	link-type veth
 	veth-peer-name pr_myvnet
+	mtu 9200
 
 auto myvnet
 iface myvnet
 	bridge_ports ln_myvnet
 	bridge_stp off
 	bridge_fd 0
+	mtu 9200
 
 auto pr_myvnet
 iface pr_myvnet
 	link-type veth
 	veth-peer-name ln_myvnet
+	mtu 9200
 
 auto vmbr0v100
 iface vmbr0v100
 	bridge_ports  eth0.100 pr_myvnet
 	bridge_stp off
 	bridge_fd 0
+	mtu 9200
diff --git a/src/test/zones/vlan/bridge/sdn_config b/src/test/zones/vlan/bridge/sdn_config
index c6cfaaa..c61e659 100644
--- a/src/test/zones/vlan/bridge/sdn_config
+++ b/src/test/zones/vlan/bridge/sdn_config
@@ -6,6 +6,6 @@
                       },
              },
   zones   => {
-               ids => { myzone => { bridge => "vmbr0", ipam => "pve", type => "vlan" } },
+               ids => { myzone => { bridge => "vmbr0", ipam => "pve", type => "vlan", mtu => "9200" } },
              },
 }
-- 
2.39.2




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

end of thread, other threads:[~2024-04-04 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 17:01 [pve-devel] [PATCH pve-network] fix #5324: non vlanaware zone: add mtu to veth links Alexandre Derumier
2024-04-04 13:58 ` Stefan Hanreich

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