network: vlan-aware bridge: fix pvid when trunks is defined
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 25 May 2020 11:05:08 +0000 (13:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Jun 2020 12:38:17 +0000 (14:38 +0200)
commitaa91ae3d1b053599d3a48f7f5b79df608a52ab4c
treea21195f5e725b15c8cbd0e11a94a93686f120f7f
parent1b6ad61c61bc65efae7957b194864ac8377e70d0
network: vlan-aware bridge: fix pvid when trunks is defined

Currently, when a trunks is defined, the vlan tag is not used
for pvid with vlan-aware bridge. (It's ok with ovs switch)

example:

net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,tag=2,trunks=2-11

before
------
tap100i0  2-11

after
-----
tap100i0  2 PVID Egress Untagged
 3-11

No regression for other configurations:

net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1

before
------
tap100i0  1 PVID Egress Untagged
 2-4094

after
-----
tap100i0  1 PVID Egress Untagged
 2-4094

net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,tag=2

before
------
tap100i0  2 PVID Egress Untagged

after
-----
tap100i0  2 PVID Egress Untagged

net0: e1000=BA:90:68:B8:CF:F5,bridge=vmbr1,trunks=2-11

before
------
tap100i0  1 PVID Egress Untagged
 2-11

after
-----
tap100i0  1 PVID Egress Untagged
 2-11

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