]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
4 years agointerfaces: don't modify chassis ID when overriden fix/chassisid-interface-flap 386/head
Vincent Bernat [Sat, 11 Apr 2020 14:21:30 +0000 (16:21 +0200)] 
interfaces: don't modify chassis ID when overriden

If the chassis ID has been overriden by the user, do not modify it.

Fix #385

4 years agotests: don't fail on __exit__ if we failed in __enter__
Vincent Bernat [Thu, 9 Apr 2020 16:12:04 +0000 (18:12 +0200)] 
tests: don't fail on __exit__ if we failed in __enter__

4 years agotests: fix bitmap test on 32bit
Vincent Bernat [Fri, 3 Apr 2020 20:34:18 +0000 (22:34 +0200)] 
tests: fix bitmap test on 32bit

4 years agotests: do not check for MED inventory if /sys/class/dmi not available
Vincent Bernat [Thu, 12 Mar 2020 12:25:37 +0000 (13:25 +0100)] 
tests: do not check for MED inventory if /sys/class/dmi not available

4 years agotests: do not enable asan on anything else than x86_64
Vincent Bernat [Thu, 12 Mar 2020 11:56:01 +0000 (12:56 +0100)] 
tests: do not enable asan on anything else than x86_64

It seems buggy.

4 years agotests: display tests/test-suite.log on errors
Vincent Bernat [Thu, 12 Mar 2020 10:54:34 +0000 (11:54 +0100)] 
tests: display tests/test-suite.log on errors

4 years agobuild: provide a default.nix file
Vincent Bernat [Thu, 12 Mar 2020 08:29:13 +0000 (09:29 +0100)] 
build: provide a default.nix file

4 years agoosx: update recipe for HomeBrew
Vincent Bernat [Sun, 2 Feb 2020 22:09:26 +0000 (23:09 +0100)] 
osx: update recipe for HomeBrew

4 years agorelease: 1.0.5 fix/old-compat 1.0.5
Vincent Bernat [Sat, 1 Feb 2020 21:15:40 +0000 (22:15 +0100)] 
release: 1.0.5

4 years agoinclude: remove in6.h from linux/bridge.h
Vincent Bernat [Sun, 2 Feb 2020 13:16:27 +0000 (14:16 +0100)] 
include: remove in6.h from linux/bridge.h

Otherwise, we are redefining in6_addr on old distributions.

4 years agotests: provide a Dockerfile to build with wheezy
Vincent Bernat [Sun, 2 Feb 2020 13:11:44 +0000 (14:11 +0100)] 
tests: provide a Dockerfile to build with wheezy

This is for testing with a really old userland.

4 years agoinclude: don't use __kernel_sa_family_t
Vincent Bernat [Sat, 1 Feb 2020 22:45:29 +0000 (23:45 +0100)] 
include: don't use __kernel_sa_family_t

It's not compatible with older kernels.

4 years agoinclude: don't include linux/sysinfo.h
Vincent Bernat [Sat, 1 Feb 2020 22:39:27 +0000 (23:39 +0100)] 
include: don't include linux/sysinfo.h

Older kernels don't have it. It doesn't seem useful.

4 years agointerfaces: include "netinet/in.h" before kernel headers
Vincent Bernat [Sat, 1 Feb 2020 22:21:44 +0000 (23:21 +0100)] 
interfaces: include "netinet/in.h" before kernel headers

This should ensure definition of stuff like in6_addr are done by the
libc, not by the kernel headers. Recent kernel headers know how to
handle that when loaded second.

4 years agointerfaces: fix usage of inet_pton()
Vincent Bernat [Sat, 1 Feb 2020 22:14:29 +0000 (23:14 +0100)] 
interfaces: fix usage of inet_pton()

This would trigger a failure on RHEL 6.

4 years agotravis: remove ARM64
Vincent Bernat [Sat, 1 Feb 2020 18:36:55 +0000 (19:36 +0100)] 
travis: remove ARM64

This seems quite unreliable.

4 years agointerfaces: move bitmaps function to a dedicated file
Vincent Bernat [Sat, 1 Feb 2020 18:35:56 +0000 (19:35 +0100)] 
interfaces: move bitmaps function to a dedicated file

Also add some simple tests.

4 years agosnmp: additional fix around NetSNMP 5.8+ and function pointers
Vincent Bernat [Sat, 1 Feb 2020 17:40:01 +0000 (18:40 +0100)] 
snmp: additional fix around NetSNMP 5.8+ and function pointers

4 years agosnmp: tentative to fix compilation with older versions of NetSNMP
Vincent Bernat [Sat, 1 Feb 2020 16:34:29 +0000 (17:34 +0100)] 
snmp: tentative to fix compilation with older versions of NetSNMP

In fact, gcc doesn't consider the signatures to be compatible when
using a function pointer. Let's use a preprocessor trick to detect the
version and hope gcc is OK with `char*` changed to `void*`.

4 years agointerfaces: correctly handle bridges with VLAN filtering enabled
Vincent Bernat [Sat, 1 Feb 2020 16:17:48 +0000 (17:17 +0100)] 
interfaces: correctly handle bridges with VLAN filtering enabled

With VLAN-aware bridges, bridges are usually configured to filter
VLAN. In this case, we should not propagate VLAN from upper
interfaces.

Fix #377

4 years agodaemon: remove unused interface types
Vincent Bernat [Sat, 1 Feb 2020 15:52:49 +0000 (16:52 +0100)] 
daemon: remove unused interface types

4 years agotests: check we don't mix VLAN among interfaces
Vincent Bernat [Sat, 1 Feb 2020 15:44:41 +0000 (16:44 +0100)] 
tests: check we don't mix VLAN among interfaces

4 years agosnmp: update signature for create_ostring
Vincent Bernat [Sat, 1 Feb 2020 15:30:11 +0000 (16:30 +0100)] 
snmp: update signature for create_ostring

Again, this is backward compatible as an `const u_char*` can be casted
to `const void*`.

4 years agosnmp: update signature of fmtaddr and send functions
Vincent Bernat [Sat, 1 Feb 2020 15:27:42 +0000 (16:27 +0100)] 
snmp: update signature of fmtaddr and send functions

This is backward compatible as a function accepting `const void *`
will also accept `void *`.

4 years agodebian: update watch file
Vincent Bernat [Sat, 1 Feb 2020 15:15:11 +0000 (16:15 +0100)] 
debian: update watch file

4 years agoMerge pull request #376 from stannous/remote-vlan-limitations
Vincent Bernat [Sat, 1 Feb 2020 15:17:16 +0000 (16:17 +0100)] 
Merge pull request #376 from stannous/remote-vlan-limitations

Fix for limitation of 10 VLANs for LLDP .1q feature

4 years agotests: use "-Ln" to avoid logging with snmpd
Vincent Bernat [Sun, 26 Jan 2020 14:22:26 +0000 (15:22 +0100)] 
tests: use "-Ln" to avoid logging with snmpd

This is more efficient than using "-Lf /dev/null". It was a tentative
to fix tests when running snmpd 5.8 but it seems to be related to
parallel run.

4 years agonetlink: fix detection of VLAN 1 376/head
Vincent Bernat [Sun, 26 Jan 2020 14:10:52 +0000 (15:10 +0100)] 
netlink: fix detection of VLAN 1

4 years agonetlink: use an optimized version of num_bits_set
Vincent Bernat [Sun, 26 Jan 2020 14:06:54 +0000 (15:06 +0100)] 
netlink: use an optimized version of num_bits_set

This is a classic problem. See
<https://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer>

4 years agointerfaces: fix for limitation of 10 VLANs for LLDP .1q feature
Radhika Mahankali [Fri, 6 Dec 2019 19:25:48 +0000 (11:25 -0800)] 
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

4 years agolib: don't break ABI by moving new config_tx_interval_ms to end
Vincent Bernat [Thu, 23 Jan 2020 18:33:10 +0000 (19:33 +0100)] 
lib: don't break ABI by moving new config_tx_interval_ms to end

4 years agoMerge pull request #379 from jp-t/master
Vincent Bernat [Thu, 23 Jan 2020 18:32:31 +0000 (19:32 +0100)] 
Merge pull request #379 from jp-t/master

Allow configuring tx-interval in milliseconds

4 years agolldpd: set a 30 seconds lower limit to the safeguard timer 379/head
Jean-Pierre Tosoni [Wed, 22 Jan 2020 11:03:25 +0000 (12:03 +0100)] 
lldpd: set a 30 seconds lower limit to the safeguard timer

This timer is a safeguard to refresh information about all networks
interfaces at regular interval, in case there was something wrong with
the event-based refresh.

When using milliseconds-grained tx-interval, this could happen several
times per second, which is not the intended use of the safeguard.

To quote Vincent Bernat:
"Minimal value of 30 seconds even if we don't have event-based
refresh (so outside the if). Most people have the event-based
refresh, so lowering the pace for the others should be pretty
invisible."

4 years agodoc, tests: milliseconds tx-interval finishing touch
Jean-Pierre Tosoni [Wed, 22 Jan 2020 08:36:30 +0000 (09:36 +0100)] 
doc, tests: milliseconds tx-interval finishing touch

- Added a test in test_lldpcli.py to check that milliseconds delay can
  be read back in either seconds or milliseconds units.
- Updated the manual page for lldpcli; warn about performance issue.
- Added an entry in NEWS

4 years agosnmp agent: fix tests suite for milliseconds units
Jean-Pierre Tosoni [Thu, 16 Jan 2020 09:43:08 +0000 (10:43 +0100)] 
snmp agent: fix tests suite for milliseconds units

4 years agoAllow configuring tx-interval in milliseconds
Jean-Pierre Tosoni [Wed, 15 Jan 2020 17:56:08 +0000 (18:56 +0100)] 
Allow configuring tx-interval in milliseconds

This is a prerequisite for TTDP support.

Usage: add "ms" suffix to the delay value to force interpretation as a
milliseconds value:

 lldpcli configure lldp tx-interval 200ms

When computing a TTL (TTL = tx-interval * tx-hold), the result is rounded
up to the next second, as LLDP frames need a value in seconds.

A new tx-interval-ms item is added to the json output. The old tx-interval
is kept in seconds (rounded up) for compatibility.

4 years agotests: remove hack around libtool on OSX fix/travis-bionic
Vincent Bernat [Sun, 12 Jan 2020 21:15:41 +0000 (22:15 +0100)] 
tests: remove hack around libtool on OSX

4 years agotests: skip tests requiring kernel features not present
Vincent Bernat [Sun, 12 Jan 2020 20:23:43 +0000 (21:23 +0100)] 
tests: skip tests requiring kernel features not present

Notably, "team" is not available in GCP kernels...

4 years agotravis: update to Bionic
Vincent Bernat [Sun, 12 Jan 2020 19:51:23 +0000 (20:51 +0100)] 
travis: update to Bionic

4 years agotravis: also build for arm64
Vincent Bernat [Sun, 12 Jan 2020 07:57:44 +0000 (08:57 +0100)] 
travis: also build for arm64

4 years agoMerge pull request #375 from stannous/master
Vincent Bernat [Mon, 9 Dec 2019 18:44:46 +0000 (19:44 +0100)] 
Merge pull request #375 from stannous/master

Fix for LLDP related netlink error messages

4 years agoFix for LLDP related netlink error messages 375/head
Radhika Mahankali [Mon, 9 Dec 2019 06:59:16 +0000 (22:59 -0800)] 
Fix for LLDP related netlink error messages

Ticket: CM-27243
Reviewed By: CCR-9608
Testing Done: Unit tseting, PTM Smoke

Issue: Error messages "netlink: 8 bytes leftover after parsing attributes
in process `lldpd'"

Root cause: Root Cause: The length of the netlink message was not being set
properly for non-bridge family type messages. Same length was being used for
both type of messages even though bridge family type message has extra
attribute. This causes 8 extra bytes being left over in the non-bridge
family type netlink messages.

Fix: Calculating and setting the length separately for bridge and non-bridge
family type messages.
(cherry picked from commit aac76966539bf932d5923b165762db370990bf94)

4 years agoRevert "client: remove useless variable declaration in zsh completion"
Vincent Bernat [Sun, 8 Dec 2019 06:10:47 +0000 (07:10 +0100)] 
Revert "client: remove useless variable declaration in zsh completion"

This reverts commit e37dd8d0a3f67b345681b46c175249eee286bed0.

4 years agoclient: fix zsh completion to not alter global environment
Vincent Bernat [Sun, 8 Dec 2019 06:02:49 +0000 (07:02 +0100)] 
client: fix zsh completion to not alter global environment

4 years agoclient: remove useless variable declaration in zsh completion
Vincent Bernat [Sun, 8 Dec 2019 05:58:34 +0000 (06:58 +0100)] 
client: remove useless variable declaration in zsh completion

4 years agoLLDPD should document system refresh timer (tx-interval * 20)
Sam Tannous [Thu, 21 Nov 2019 17:27:27 +0000 (09:27 -0800)] 
LLDPD should document system refresh timer (tx-interval * 20)

In LLDPD, each port has its own timer to catch port-related
changes and is modified by changing the tx-interval.

LLDPD also starts another system based refresh timer on each port
for changes like hostname. This is the tx-interval multiplied by
20.  This needs to be documented.

Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
4 years agolldp: don't discard the whole LLDPDU when only one TLV is invalid
Vincent Bernat [Thu, 21 Nov 2019 19:13:38 +0000 (20:13 +0100)] 
lldp: don't discard the whole LLDPDU when only one TLV is invalid

IEEE802.1AB-2005 says:

> If TLV_type_value is in the range of reserved TLV types in Table
> 9-1, the TLV is unrecognized and may be a basic TLV from a later
> LLDP version. The statsTLVsUnrecognizedTotal counter shall be
> incremented, and the TLV shall be assumed to be validated.

Fix #323

4 years agotests: add a test with different MTU interfaces
Vincent Bernat [Wed, 20 Nov 2019 10:33:51 +0000 (11:33 +0100)] 
tests: add a test with different MTU interfaces

See #365.

4 years agoredhat: fix license name in spec file
Vincent Bernat [Wed, 13 Nov 2019 23:29:40 +0000 (00:29 +0100)] 
redhat: fix license name in spec file

4 years agolib: fix memory leak when handling I/O
Vincent Bernat [Mon, 11 Nov 2019 08:54:10 +0000 (09:54 +0100)] 
lib: fix memory leak when handling I/O

The state data is used to ensure we don't interleave requests of the
same kind (eg requesting data for eth0, then for eth1 while eth0 is
running). The data was freed only when reaching `CONN_STATE_IDLE`
again. Otherwise, there was a memory leak.

To avoid the memory leak, we avoid use a static allocation instead.

Fix #362.

4 years agolldpcli: ask for power pairs only when PSE
Vincent Bernat [Sat, 26 Oct 2019 17:40:44 +0000 (19:40 +0200)] 
lldpcli: ask for power pairs only when PSE

4 years agoMerge pull request #350 from patrikdanielssonaxis/8023bt
Vincent Bernat [Sat, 19 Oct 2019 20:25:19 +0000 (22:25 +0200)] 
Merge pull request #350 from patrikdanielssonaxis/8023bt

lldp: Power via MDI TLV: Initial support for 802.3bt

4 years agotest: add tests for 802.3BT additions 350/head
Vincent Bernat [Sat, 19 Oct 2019 20:02:47 +0000 (22:02 +0200)] 
test: add tests for 802.3BT additions

4 years agotest: use scapy when sending pcap files
Vincent Bernat [Sat, 19 Oct 2019 19:52:05 +0000 (21:52 +0200)] 
test: use scapy when sending pcap files

4 years agolldp: Power via MDI TLV: Initial support for 802.3bt
Patrik Danielsson [Tue, 17 Sep 2019 08:39:22 +0000 (10:39 +0200)] 
lldp: Power via MDI TLV: Initial support for 802.3bt

Change-Id: Ie2cb521a2433cee64c91e5146050814276931125

4 years agoMerge branch 'feature/vlan-enabled-bridge'
Vincent Bernat [Tue, 8 Oct 2019 18:36:33 +0000 (20:36 +0200)] 
Merge branch 'feature/vlan-enabled-bridge'

4 years agolldp: when receiving a shutdown LLDPU, don't clear chassis information
Vincent Bernat [Tue, 8 Oct 2019 17:35:41 +0000 (19:35 +0200)] 
lldp: when receiving a shutdown LLDPU, don't clear chassis information

The chassis may be shared with another port. When the MSAP is known
and we receive a shutdown LLDPDU, just leave the original chassis as
is instead of copying information from the new chassis to the old
chassis.

Fix #348.

4 years agolldp: validate a bit more received LLDP frames
Vincent Bernat [Tue, 1 Oct 2019 19:42:42 +0000 (21:42 +0200)] 
lldp: validate a bit more received LLDP frames

Notably, we ensure the order and unicity of Chassis ID, Port ID and
TTL TLV. For Chassis ID and Port ID, we also ensure the maximum size
does not exceed 256.

Fix #351.

4 years agointerfaces: only register protocol handler for LLDP when only LLDP enabled
Vincent Bernat [Tue, 1 Oct 2019 04:18:52 +0000 (06:18 +0200)] 
interfaces: only register protocol handler for LLDP when only LLDP enabled

On Linux, the drop counter is increased on unhandled packets. We are
using a raw socket with ETH_P_ALL, so we get a copy of the packet. The
original packet is ultimately dropped later and this increases the
drop counter associated to the interface on Linux.

When listening only to LLDP, use ETH_P_LLDP instead of ETH_P_ALL to
avoid this.

Fix #296.

4 years agolldpctl: don't reopen control socket each time we want to lock
Vincent Bernat [Sun, 29 Sep 2019 12:09:54 +0000 (14:09 +0200)] 
lldpctl: don't reopen control socket each time we want to lock

4 years agolldpctl: put a lock around some commands to avoid race conditions
Vincent Bernat [Tue, 10 Sep 2019 07:55:54 +0000 (09:55 +0200)] 
lldpctl: put a lock around some commands to avoid race conditions

Fix #343

4 years agolog: don't use black for coloring DBG
Vincent Bernat [Sun, 29 Sep 2019 11:58:23 +0000 (13:58 +0200)] 
log: don't use black for coloring DBG

As foreground, it may be gray, but it could be too dark. Use dark cyan
instead.

4 years agonetlink: support VLAN-aware bridges feature/vlan-enabled-bridge 353/head
Vincent Bernat [Tue, 9 Jul 2019 15:17:42 +0000 (17:17 +0200)] 
netlink: support VLAN-aware bridges

4 years agonetlink: ignore IFLA_LINK if we previously received IFLA_LINK_NETNSID
Vincent Bernat [Mon, 23 Sep 2019 19:35:14 +0000 (21:35 +0200)] 
netlink: ignore IFLA_LINK if we previously received IFLA_LINK_NETNSID

Starting from 5.2 (commit feadc4b6cf42), IFLA_LINK appear after
IFLA_LINK_NETNSID. Handle this case correctly.

4 years agointerfaces: don't log errno when detecting loops
Vincent Bernat [Sun, 15 Sep 2019 18:53:21 +0000 (20:53 +0200)] 
interfaces: don't log errno when detecting loops

4 years agotests: fix skip instruction
Vincent Bernat [Sun, 15 Sep 2019 17:40:03 +0000 (19:40 +0200)] 
tests: fix skip instruction

4 years agotests: don't use pytest.config
Vincent Bernat [Sun, 15 Sep 2019 17:19:06 +0000 (19:19 +0200)] 
tests: don't use pytest.config

It's deprecated in 5.0.

4 years agointerfaces: enable matching on interface name for management address feature/management-device
Vincent Bernat [Sun, 15 Sep 2019 15:45:52 +0000 (17:45 +0200)] 
interfaces: enable matching on interface name for management address

We allow the user to match a management address using the interface
name by specifying the interface name as a pattern. The same rules as
for specifying IP patterns apply but there is no notion of exact match
for an interface.

Fix #349.

4 years agolldpd: fix bitfield
Wataru Ashihara [Wed, 4 Sep 2019 06:52:55 +0000 (15:52 +0900)] 
lldpd: fix bitfield

4 years agoclient: fix parameter order
Wataru Ashihara [Wed, 4 Sep 2019 02:59:33 +0000 (11:59 +0900)] 
client: fix parameter order

4 years agolib: fix memory leak
Wataru Ashihara [Wed, 4 Sep 2019 02:59:03 +0000 (11:59 +0900)] 
lib: fix memory leak

4 years agofix typo
Wataru Ashihara [Wed, 4 Sep 2019 02:52:56 +0000 (11:52 +0900)] 
fix typo

4 years agolib: fix enumeration
Wataru Ashihara [Tue, 6 Feb 2018 12:09:40 +0000 (21:09 +0900)] 
lib: fix enumeration

4 years agobuild: disable warnings on cast alignments
Vincent Bernat [Sat, 27 Jul 2019 17:23:12 +0000 (19:23 +0200)] 
build: disable warnings on cast alignments

clang is often wront about it (it increases alignment requirement, but
the surrounding structure ensure the alignment is correct). Dunno if
gcc is smarter or just ignore most of these problems.

4 years agotests: be verbose when running make on CI when an error happens
Vincent Bernat [Sat, 27 Jul 2019 16:53:22 +0000 (18:53 +0200)] 
tests: be verbose when running make on CI when an error happens

Otherwise, we don't really know why we get errors.

4 years agoclient: don't display management interface index if unknown
Vincent Bernat [Sat, 27 Jul 2019 15:36:35 +0000 (17:36 +0200)] 
client: don't display management interface index if unknown

4 years agointerfaces: compute interface index for fixed management address
Vincent Bernat [Sat, 27 Jul 2019 15:28:01 +0000 (17:28 +0200)] 
interfaces: compute interface index for fixed management address

When management address is provided without a pattern, fetch the
appropriate interface index if the interface is known. Thanks to
@kefins for the actual patch.

Fix #338.

4 years agolib: expose management interface index
Vincent Bernat [Sat, 27 Jul 2019 15:11:40 +0000 (17:11 +0200)] 
lib: expose management interface index

4 years agolib: fix missing words in lldpctl.h
Vincent Bernat [Sat, 27 Jul 2019 15:00:25 +0000 (17:00 +0200)] 
lib: fix missing words in lldpctl.h

4 years agoinclude: update headers to 4.19
Vincent Bernat [Sun, 7 Jul 2019 17:24:21 +0000 (19:24 +0200)] 
include: update headers to 4.19

It makes things compile correctly with Jessie

4 years agoJune 15th 2019 was a Saturday, not a Sunday
eb3095 [Wed, 17 Jul 2019 21:56:46 +0000 (17:56 -0400)] 
June 15th 2019 was a Saturday, not a Sunday

This addresses the following issue,

RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.tUWJAJ (%prep)
    bogus date in %changelog: Sun Jun 15 2019 Vincent Bernat <bernat@luffy.cx> - 1.0.4-1

4 years agoosx: update recipe for HomeBrew
Vincent Bernat [Sat, 15 Jun 2019 09:25:40 +0000 (11:25 +0200)] 
osx: update recipe for HomeBrew

4 years agorelease: 1.0.4 1.0.4
Vincent Bernat [Sat, 15 Jun 2019 09:09:44 +0000 (11:09 +0200)] 
release: 1.0.4

4 years agolldpd: document expectation for LLDP-MED device configuration
Vincent Bernat [Wed, 12 Jun 2019 20:10:56 +0000 (22:10 +0200)] 
lldpd: document expectation for LLDP-MED device configuration

When using class II and class III endpoints, some additional TLVs are
mandatory. This is not enforced by lldpd.

See #335.

4 years agonetlink: make the netlink socket totally non blocking
Vincent Bernat [Mon, 10 Jun 2019 09:17:52 +0000 (11:17 +0200)] 
netlink: make the netlink socket totally non blocking

See #333.

4 years agonetlink: handle blocking read from netlink socket
Vincent Bernat [Sun, 9 Jun 2019 06:13:06 +0000 (08:13 +0200)] 
netlink: handle blocking read from netlink socket

It seems it is possible to run into a condition where the netlink
socket is not available for read. Set the MSG_DONTWAIT flag and fetch
an error if there is any.

Fix #333

4 years agosnmp: implement lldpRemOrgDefInfoTable for remote custom TLVs
Vincent Bernat [Wed, 29 May 2019 16:58:09 +0000 (18:58 +0200)] 
snmp: implement lldpRemOrgDefInfoTable for remote custom TLVs

As a simplification, lldpRemOrgDefInfoIndex is 1 for the first custom
TLV of a given port and is increased by 1 for each new TLV. This is
not what is encouraged in the MIB:

> An agent is encouraged to assign monotonically increasing index
> values to new entries, starting with one, after each reboot. It is
> considered unlikely that the lldpRemOrgDefInfoIndex will wrap
> between reboots.

However, it is simpler to implement it this way as we don't need to
record the index inside the `lldpd_custom` structure. Also, the index
will increase even for a different OUI or subtype as we do not want to
sort the custom TLVs.

Fix #330.

4 years agodebian: depends on lsb-base
Vincent Bernat [Sun, 2 Jun 2019 07:02:42 +0000 (09:02 +0200)] 
debian: depends on lsb-base

This is needed for SysV init script

4 years agodebian: no need to BD on lsb-release anymore
Vincent Bernat [Sun, 2 Jun 2019 07:00:47 +0000 (09:00 +0200)] 
debian: no need to BD on lsb-release anymore

4 years agodoc: update Android instructions for ARM64
Vincent Bernat [Wed, 15 May 2019 04:20:27 +0000 (06:20 +0200)] 
doc: update Android instructions for ARM64

Nowadays, this is a more common platform than ARM.

4 years agoclient: use bold instead of a color for command completions
Vincent Bernat [Sat, 4 May 2019 06:58:38 +0000 (08:58 +0200)] 
client: use bold instead of a color for command completions

The color needs to be readable on both light and dark backgrounds and
should be readable on most themes. 1;35m would be a fit, but let's
stay safe by just using bold.

Fix #326

5 years agoagent: do not increase statsAgeoutsTotal when receiving a shutdown frame
Vincent Bernat [Tue, 9 Apr 2019 05:07:14 +0000 (07:07 +0200)] 
agent: do not increase statsAgeoutsTotal when receiving a shutdown frame

Fix #325

5 years agolldp: increase statsTLVsUnrecognizedTotal on unknown TLV
Vincent Bernat [Sat, 6 Apr 2019 19:17:25 +0000 (21:17 +0200)] 
lldp: increase statsTLVsUnrecognizedTotal on unknown TLV

This was done for organization TLVs, but not for other TLVs.

Fix #323.

5 years agotests: update pytest
Vincent Bernat [Sat, 6 Apr 2019 12:29:13 +0000 (14:29 +0200)] 
tests: update pytest

And also, don't specify too many dependencies, just the essential
ones.

5 years agoclient: rename max-neighbor command
Vincent Bernat [Sat, 6 Apr 2019 11:20:51 +0000 (13:20 +0200)] 
client: rename max-neighbor command

5 years agotests: add test for global configuration settings
Vincent Bernat [Sat, 6 Apr 2019 11:15:38 +0000 (13:15 +0200)] 
tests: add test for global configuration settings

5 years agoclient: ability to set maximum of neighbors from lldpcli
Vincent Bernat [Sat, 6 Apr 2019 10:13:24 +0000 (12:13 +0200)] 
client: ability to set maximum of neighbors from lldpcli

5 years agopriv: include limits.h for PATH_MAX
Sören Tempel [Mon, 25 Mar 2019 17:43:03 +0000 (18:43 +0100)] 
priv: include limits.h for PATH_MAX

5 years agolib: use an unique variable as iterator in foreach macro
Vincent Bernat [Fri, 15 Mar 2019 07:25:09 +0000 (08:25 +0100)] 
lib: use an unique variable as iterator in foreach macro

This lessen the chance of the `iter` variable to shadow a user-defined
variable. This is also a tentative to help #312, even if the scope of
the `iter` variable should ensure we can nest two loops without any
issue.

5 years agobuild: warn on implicit fallthrough for case statements
Vincent Bernat [Wed, 13 Mar 2019 07:54:22 +0000 (08:54 +0100)] 
build: warn on implicit fallthrough for case statements