public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-network] sdn: zones: look the underlay interface up correctly
@ 2026-09-09  7:53 Hannes Laimer
  2026-09-09  8:13 ` Stefan Hanreich
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Laimer @ 2026-09-09  7:53 UTC (permalink / raw)
  To: pve-devel

The interfaces reader returns the table under a key, and the vxlan and
evpn zones looked their underlay interface up at the top level of the
reader's result, so the MTU they derive from it never applied and every
vnet bridge of theirs got the default or the zone's own MTU.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
the alternative would be already passing `->{ifaces}`, but we'd lose the
options like that. i think this is better.

 src/PVE/Network/SDN/Zones/EvpnPlugin.pm  | 3 ++-
 src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 0e79707..f89decf 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -214,7 +214,8 @@ sub generate_sdn_config {
 
     my $mtu = 1450;
     if ($iface) {
-        $mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
+        $mtu = $interfaces_config->{ifaces}->{$iface}->{mtu} - 50
+            if $interfaces_config->{ifaces}->{$iface}->{mtu};
     }
     $mtu = $plugin_config->{mtu} if $plugin_config->{mtu};
 
diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
index a408261..b4e743e 100644
--- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -119,7 +119,8 @@ sub generate_sdn_config {
 
     my $mtu = 1450;
     if ($iface) {
-        $mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
+        $mtu = $interfaces_config->{ifaces}->{$iface}->{mtu} - 50
+            if $interfaces_config->{ifaces}->{$iface}->{mtu};
     }
     $mtu = $plugin_config->{mtu} if $plugin_config->{mtu};
 
-- 
2.47.3





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

end of thread, other threads:[~2026-09-09  8:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09  7:53 [PATCH pve-network] sdn: zones: look the underlay interface up correctly Hannes Laimer
2026-09-09  8:13 ` Stefan Hanreich
2026-09-09  8:42   ` Hannes Laimer

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