]> git.ipfire.org Git - thirdparty/lldpd.git/commit
interfaces: fix for limitation of 10 VLANs for LLDP .1q feature
authorRadhika Mahankali <radhika@cumulusnetworks.com>
Fri, 6 Dec 2019 19:25:48 +0000 (11:25 -0800)
committerVincent Bernat <vincent@bernat.ch>
Sun, 26 Jan 2020 14:12:08 +0000 (15:12 +0100)
commit626ea3610fa365ccfece217085c84b7d699a700b
treef1ccf8b4207f2fecb0b1a31813d214f4665f53f4
parent6f66d1086b11c2f9b73f574b2c54dadc6b2ea29b
interfaces: fix for limitation of 10 VLANs for LLDP .1q feature

Max 10 VLAN ids are supported on a port for .1q feature

Root Cause: All the VLANs learnt from netlink is dropped after 10 VLANs due
to the static array allocation of only 10 VLAN ids in the interface structure.
Beyond 10 VLAN membership for a port are ignored and error message gets
printed causing flooding of messages when hundreds of VLANs are configured.

Fix: Changed the static VLAN id array to VLAN id bitmap. With the bitmap all 4k
VLANs can be stored and learnt from netlink messages.
- Added a message to indicate when the LLDP packet is not sent out because
its too big. This will be helpful for user when too many VLANs are
configured and LLDP packets are not sent out.

Limitation: Even though the VLAN learning from netlink messages has been
alleviated, due to the LLDP message size around 380 VLANs can be advertised in
the packet. This number can vary based on the number of other TLVs being
advertised by LLDP.

vlan info shows interface_name.vlan-id which makes it look like sub
interface and causes confusion

Root Cause: Vlan name is sent as part of the .1q TLVs. But, the vlan name
format was <nterface-name>.<vlan-id> which makes it look like a sub-interface.

Fix: The vlan name cannot be removed from the vlan-info display since it is
sent/received as part of the .1q TLV in LLDP packet. But, changed the
vlan name format to vlan-<vlan-id> to avoid the confusion.
(cherry picked from commit 38db598121f5ce615f98d6cdaf41d5360c40dc3c)

Conflicts:
src/daemon/interfaces-linux.c
src/daemon/lldpd.h
NEWS
src/daemon/interfaces-bsd.c
src/daemon/interfaces-linux.c
src/daemon/interfaces.c
src/daemon/lldpd.h
src/daemon/netlink.c
src/daemon/protocols/lldp.c
tests/integration/test_interfaces.py