[pve-devel] [PATCH V2 pve-network 2/7] vlan: ovs: use dot1q-tunnel when vlanaware is enabled

Alexandre Derumier aderumier at odiso.com
Tue Jun 2 11:20:22 CEST 2020


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Network/SDN/Zones/VlanPlugin.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/PVE/Network/SDN/Zones/VlanPlugin.pm b/PVE/Network/SDN/Zones/VlanPlugin.pm
index 8364451..987c553 100644
--- a/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -61,7 +61,12 @@ sub generate_sdn_config {
 	@iface_config = ();
 	push @iface_config, "ovs_type OVSIntPort";
 	push @iface_config, "ovs_bridge $bridge";
-	push @iface_config, "ovs_options tag=$tag";
+	if($vnet->{vlanaware}) {
+	    push @iface_config, "ovs_options vlan_mode=dot1q-tunnel tag=$tag";
+	} else {
+	    push @iface_config, "ovs_options tag=$tag";
+	}
+
 	push(@{$config->{$vnet_uplink}}, @iface_config) if !$config->{$vnet_uplink};
 
 	@iface_config = ();
-- 
2.20.1




More information about the pve-devel mailing list