]> git.proxmox.com Git - pve-network.git/commitdiff
fix #4683: zones: QinQ: fix vlan-protocol when bridge is VLAN aware
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 20 Apr 2023 21:36:21 +0000 (23:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Jun 2023 08:23:57 +0000 (10:23 +0200)
The tagged bridge interface need to also have to correct
vlan-protocol

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Zones/QinQPlugin.pm
src/test/zones/qinq/bridge_vlanaware_vlanprotocol/expected_sdn_interfaces

index f4d12bce2942a14a2defea38da69672395b3b87b..8b9de433d559c8f8473bf34db49341fe33ce073c 100644 (file)
@@ -98,13 +98,17 @@ sub generate_sdn_config {
     } elsif ($vlan_aware) {
         # VLAN_aware_brige-(tag)----->vlanwarebridge-(tag)----->vnet
 
+       $zone_bridge_ports = "$bridge.$stag";
+
        if ($vlanprotocol) {
            @iface_config = ();
            push @iface_config, "bridge-vlan-protocol $vlanprotocol";
            push(@{$config->{$bridge}}, @iface_config) if !$config->{$bridge};
-       }
 
-       $zone_bridge_ports = "$bridge.$stag";
+           @iface_config = ();
+           push @iface_config, "vlan-protocol $vlanprotocol";
+           push(@{$config->{$zone_bridge_ports}}, @iface_config) if !$config->{$zone_bridge_ports};
+       }
 
     } else {
        # eth--->eth.x(svlan)----->vlanwarebridge-(tag)----->vnet---->vnet
index 0bc301b7c262417f09f05e5d998416aa75417fc1..b24238f00ec7357531312dc86c1c6f3572efe61b 100644 (file)
@@ -20,6 +20,10 @@ auto vmbr0
 iface vmbr0
        bridge-vlan-protocol 802.1ad
 
+auto vmbr0.10
+iface vmbr0.10
+       vlan-protocol 802.1ad
+
 auto z_myzone
 iface z_myzone
        bridge-stp off