trunks= broken

patrick7

Well-Known Member
Jan 25, 2018
40
3
48
31
Since the last update, trunks= is ignored, instead, all 4096 vlans are added.
 
sure
Code:
(zrh2)root@vms1:~# pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.18-3-pve)
pve-manager: 6.1-11 (running version: 6.1-11/f2f18736)
pve-kernel-helper: 6.1-9
pve-kernel-5.3: 6.1-6
pve-kernel-5.3.18-3-pve: 5.3.18-3
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: residual config
ifupdown2: 2.0.1-1+pve8
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.2
libpve-access-control: 6.0-7
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-1
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-7
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-6
pve-cluster: 6.1-8
pve-container: 3.1-4
pve-docs: 6.1-6
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.0-7
pve-ha-manager: 3.0-9
pve-i18n: 2.1-1
pve-qemu-kvm: 4.1.1-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.1-20
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.3-pve1
 
Seems like this bug was introduced in https://git.proxmox.com/?p=pve-common.git;a=commitdiff;h=89ea13ef6b1555f92309da5c298e16579163eaf4.
The previous/old code looked like this and only added the default VLANs if no trunks were specified:
Code:
system("/sbin/bridge vlan add dev $iface vid 2-4094") == 0 ||
die "unable to add default vlan tags to interface $iface\n" if !$trunks;

The new code however always executes the call for adding all VLANs, followed by only dying if the command failed and no trunks were specified:
Code:
eval { run_command(['/sbin/bridge', 'vlan', 'add', 'dev', $iface, 'vid', '2-4094']) };
die "unable to add default vlan tags to interface $iface - $@\n"
    if $@ && !$trunks;
 
Hmm, I had also suspected this one, but I didn't immediately saw it.
it really seems so, the old code was really a mess using a "expression || die if condition" though, as this makes it really subtle, nice find! Working on a fix..
 
Thanks for fixing!
Btw, are there any plans to support trunks in the webgui? (e.g. under advanced, a simple text field where we can enter all vlan id's)
 
Btw, are there any plans to support trunks in the webgui? (e.g. under advanced, a simple text field where we can enter all vlan id's)

No active plans, but sounds sensible, it'd be great if you could open an enhancement requests over at our bug and feature tracker: https://bugzilla.proxmox.com/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!