]> git.proxmox.com Git - pve-network.git/commitdiff
vxlan: use vxlan<id> interface name
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 4 Jun 2019 05:03:40 +0000 (07:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 4 Jun 2019 07:43:14 +0000 (09:43 +0200)
we can't change online vxlan tag,
better to map interface name to vxlan tag.
(ifreload with delete old interface, and create a new with correct vxlan)

also vxlan-id are unique

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Network/Network/VxlanMulticastPlugin.pm

index f71094aaf27faf46df696ccfd59a047634344168..16dc5933c7e9d0d8419178c8df35cb4a08f836a9 100644 (file)
@@ -65,16 +65,16 @@ sub generate_network_config {
     }
 
     my $config = "\n";
-    $config .= "auto vxlan$vnetid\n";
-    $config .= "iface vxlan$vnetid inet manual\n";
-    $config .= "       vxlan-id $tag\n" if $tag;
+    $config .= "auto vxlan$tag\n";
+    $config .= "iface vxlan$tag inet manual\n";
+    $config .= "       vxlan-id $tag\n";
     $config .= "       vxlan-svcnodeip $multicastaddress\n" if $multicastaddress;
     $config .= "       vxlan-physdev $iface\n" if $iface;
     $config .= "       mtu $mtu\n" if $mtu;
     $config .= "\n";
     $config .= "auto $vnetid\n";
     $config .= "iface $vnetid inet manual\n";
-    $config .= "        bridge_ports vxlan$vnetid\n";
+    $config .= "        bridge_ports vxlan$tag\n";
     $config .= "        bridge_stp off\n";
     $config .= "        bridge_fd 0\n";
     $config .= "        mtu $mtu\n" if $mtu;