[pve-devel] [PATCH pve-network] vxlan interface : use vxlan$vnetid

Alexandre Derumier aderumier at odiso.com
Thu Jun 6 14:16:56 CEST 2019


vxlan number can be huge (16millions), don't use tag for interface name.
(my last ifupdown2 patch ifdown/ifup vxlan interface on reload)

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Network/Network/VxlanMulticastPlugin.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/Network/Network/VxlanMulticastPlugin.pm b/PVE/Network/Network/VxlanMulticastPlugin.pm
index f544006..c6dea92 100644
--- a/PVE/Network/Network/VxlanMulticastPlugin.pm
+++ b/PVE/Network/Network/VxlanMulticastPlugin.pm
@@ -60,8 +60,8 @@ sub generate_network_config {
     $mtu = $vnet->{mtu} if $vnet->{mtu};
 
     my $config = "\n";
-    $config .= "auto vxlan$tag\n";
-    $config .= "iface vxlan$tag inet manual\n";
+    $config .= "auto vxlan$vnetid\n";
+    $config .= "iface vxlan$vnetid inet manual\n";
     $config .= "       vxlan-id $tag\n";
     $config .= "       vxlan-svcnodeip $multicastaddress\n" if $multicastaddress;
     $config .= "       vxlan-physdev $iface\n" if $iface;
@@ -69,7 +69,7 @@ sub generate_network_config {
     $config .= "\n";
     $config .= "auto $vnetid\n";
     $config .= "iface $vnetid inet manual\n";
-    $config .= "        bridge_ports vxlan$tag\n";
+    $config .= "        bridge_ports vxlan$vnetid\n";
     $config .= "        bridge_stp off\n";
     $config .= "        bridge_fd 0\n";
     $config .= "        mtu $mtu\n" if $mtu;
-- 
2.11.0




More information about the pve-devel mailing list