From: Alexandre Derumier Date: Tue, 4 Jun 2019 05:03:40 +0000 (+0200) Subject: vxlan: use vxlan interface name X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4394cbf294992c5a0e4829b24b06bd3c60369b88;p=matthieu%2Fpve-network.git vxlan: use vxlan interface name 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 --- diff --git a/PVE/Network/Network/VxlanMulticastPlugin.pm b/PVE/Network/Network/VxlanMulticastPlugin.pm index f71094a..16dc593 100644 --- a/PVE/Network/Network/VxlanMulticastPlugin.pm +++ b/PVE/Network/Network/VxlanMulticastPlugin.pm @@ -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;