]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
7 years agolinux: add support for ethtool GLINKSETTINGS
Vincent Bernat [Wed, 30 Nov 2016 20:37:36 +0000 (21:37 +0100)] 
linux: add support for ethtool GLINKSETTINGS

With a recent enough kernel, one can use GLINKSETTINGS instead of
GSET. This is needed to overcome the limitation on the number of
supported/advertising modes supported by GSET (which is a fixed-length
bitset). We use the same kind of compatibility structure than for
ethtool.

Also, update the list of supported MAU types to support higher speed
interfaces. Unfortunately, while Linux reports the exact
advertised/supported modes, the operational mode of the interface is
only reported with its speed and its kind (copper, fiber, ...). When
this is fiber, we don't know if this is MMF or SMF or the supported
distance. Therefore, we use our best guess (this was already the case,
nothing new here).

7 years agoseccomp: add more syscall (sendmmsg and recvfrom)
Vincent Bernat [Wed, 7 Dec 2016 19:55:18 +0000 (20:55 +0100)] 
seccomp: add more syscall (sendmmsg and recvfrom)

7 years agoMerge pull request #213 from chutz/add-mprotect-to-seccomp-whitelist
Vincent Bernat [Sat, 3 Dec 2016 07:25:07 +0000 (08:25 +0100)] 
Merge pull request #213 from chutz/add-mprotect-to-seccomp-whitelist

seccomp: add mprotect to seccomp whitelist

7 years agoseccomp: add mprotect to seccomp whitelist 213/head
Patrick McLean [Sat, 3 Dec 2016 00:16:42 +0000 (16:16 -0800)] 
seccomp: add mprotect to seccomp whitelist

7 years agotests: more fix for pcap test
Vincent Bernat [Fri, 25 Nov 2016 23:21:52 +0000 (00:21 +0100)] 
tests: more fix for pcap test

7 years agotests: fix previous commit by making LLDP-MED part optional
Vincent Bernat [Fri, 25 Nov 2016 22:44:06 +0000 (23:44 +0100)] 
tests: fix previous commit by making LLDP-MED part optional

7 years agotests: use a PCAP file to do some integration tests
Vincent Bernat [Fri, 25 Nov 2016 20:09:15 +0000 (21:09 +0100)] 
tests: use a PCAP file to do some integration tests

7 years agomed: fix parsing of LLDP-MED LCI when TLV size exceeds addr size
Vincent Bernat [Fri, 25 Nov 2016 19:17:58 +0000 (20:17 +0100)] 
med: fix parsing of LLDP-MED LCI when TLV size exceeds addr size

Some equipments are sending an address whose size is less than the
declared TLV size. The TLV is padded with 0. We rejected this because of
a size mismatch.

Fix #210.

7 years agolinux: comment out part of ethtool.h
Vincent Bernat [Thu, 24 Nov 2016 16:54:51 +0000 (17:54 +0100)] 
linux: comment out part of ethtool.h

It relies too much on kernel.h.

7 years agogithub: shows a tcpdump output
Vincent Bernat [Thu, 24 Nov 2016 15:48:23 +0000 (16:48 +0100)] 
github: shows a tcpdump output

7 years agolinux: pull up-to-date ethtool.h
Vincent Bernat [Sun, 20 Nov 2016 18:32:32 +0000 (19:32 +0100)] 
linux: pull up-to-date ethtool.h

7 years agoclient: fix extra warning about misleading identation
Vincent Bernat [Sun, 20 Nov 2016 18:31:59 +0000 (19:31 +0100)] 
client: fix extra warning about misleading identation

Use a code block instead.

7 years agogithub: provide an issue template
Vincent Bernat [Thu, 10 Nov 2016 10:08:30 +0000 (11:08 +0100)] 
github: provide an issue template

7 years agoclient: add an option to use pre-0.9.2 json-c format
Vincent Bernat [Thu, 6 Oct 2016 06:38:10 +0000 (08:38 +0200)] 
client: add an option to use pre-0.9.2 json-c format

The format has been changed in c8b8b858bbba to match the JSON format
used when compiled with Jansson. Some users may want to revert this
change. Add `--enable-json0` option for that.

7 years agotravis: enable gold linker when NOT on OSX
Vincent Bernat [Thu, 6 Oct 2016 08:56:12 +0000 (10:56 +0200)] 
travis: enable gold linker when NOT on OSX

7 years agotravis: disable gold linker with OSX
Vincent Bernat [Thu, 6 Oct 2016 08:15:37 +0000 (10:15 +0200)] 
travis: disable gold linker with OSX

It seems it is not compiled anymore. See:
 https://travis-ci.org/vincentbernat/lldpd/jobs/165445935

7 years agotravis: display config.log when configure fails
Vincent Bernat [Thu, 6 Oct 2016 07:18:14 +0000 (09:18 +0200)] 
travis: display config.log when configure fails

7 years agorelease: prepare 0.9.5 for OSX
Vincent Bernat [Fri, 30 Sep 2016 18:30:06 +0000 (20:30 +0200)] 
release: prepare 0.9.5 for OSX

7 years agoredhat: add LICENSE file to manifest
Vincent Bernat [Fri, 30 Sep 2016 18:28:11 +0000 (20:28 +0200)] 
redhat: add LICENSE file to manifest

7 years agorelease: prepare 0.9.5 release 0.9.5
Vincent Bernat [Fri, 30 Sep 2016 18:17:08 +0000 (20:17 +0200)] 
release: prepare 0.9.5 release

7 years agoevent: correctly free event base
Vincent Bernat [Fri, 30 Sep 2016 18:00:02 +0000 (20:00 +0200)] 
event: correctly free event base

This removes a bunch a false positive in valgrind memcheck where some
allocations where done on the base and not freed when only the
associated events where freed. Related to #192.

7 years agodaemon: don't invoke lldpcli after dropping privileges
Vincent Bernat [Thu, 29 Sep 2016 05:12:33 +0000 (07:12 +0200)] 
daemon: don't invoke lldpcli after dropping privileges

Otherwise, we don't have access to the Unix socket anymore...

7 years agovalgrind: more suppressions for lldpd
Vincent Bernat [Wed, 28 Sep 2016 21:27:46 +0000 (23:27 +0200)] 
valgrind: more suppressions for lldpd

7 years agodaemon: make the message about going into background more apparent
Vincent Bernat [Wed, 28 Sep 2016 21:02:12 +0000 (23:02 +0200)] 
daemon: make the message about going into background more apparent

Otherwise, people may think that lldpd just crashed.

7 years agodaemon: better drop privileges earlier
Vincent Bernat [Wed, 28 Sep 2016 20:59:34 +0000 (22:59 +0200)] 
daemon: better drop privileges earlier

Commit 06d83d0fb35c delayed privilege dropping because we delayed
daemonization. This may made sense to be able to display errors to user
when attached to the console, but this makes little sense from a
security perspective. So, put everything back to the earlier possible
location (just after setting up the socket).

7 years agodaemon: invoke lldpcli after dropping privileges
Vincent Bernat [Wed, 28 Sep 2016 20:43:48 +0000 (22:43 +0200)] 
daemon: invoke lldpcli after dropping privileges

We don't need to run it as root. Moreover, it will happen after
daemonization and won't clutter the screen in case lldpd dies too
early. On the other hand, if we fail to spawn it, the error message may
be hidden in the logs. Though choice.

7 years agodaemon: wait a bit later to daemonize
Vincent Bernat [Wed, 28 Sep 2016 20:29:49 +0000 (22:29 +0200)] 
daemon: wait a bit later to daemonize

This way, some additional errors may be advertised in a better way.

7 years agotests: add an __init__.py file to turn fixtures into a proper module
Vincent Bernat [Sat, 24 Sep 2016 14:08:46 +0000 (16:08 +0200)] 
tests: add an __init__.py file to turn fixtures into a proper module

Dunno why this was not needed before.

7 years agoevent: remove some one-time memory leaks
Vincent Bernat [Sat, 24 Sep 2016 14:03:03 +0000 (16:03 +0200)] 
event: remove some one-time memory leaks

Also provide a suppression file for valgrind for memory leaks that are
too difficult to remove.

7 years agodoc: add a license file
Vincent Bernat [Tue, 13 Sep 2016 08:23:45 +0000 (10:23 +0200)] 
doc: add a license file

This help audit software to automatically detect the license.

7 years agotravis: try to workaround "unrecognized option '--push-state'"
Vincent Bernat [Tue, 13 Sep 2016 06:10:47 +0000 (08:10 +0200)] 
travis: try to workaround "unrecognized option '--push-state'"

See: https://travis-ci.org/vincentbernat/lldpd/jobs/159419045

7 years agolldp: only enable LLDP-MED capibility TLV if we have that capability
Vincent Bernat [Mon, 12 Sep 2016 20:28:50 +0000 (22:28 +0200)] 
lldp: only enable LLDP-MED capibility TLV if we have that capability

In fact, we are not quite coherent. With LLDP-MED disabled (lldpd with
"-M" option), we can still set some TLV. We should either disallow that
or at least not send the capability TLV since we cannot build a complete
one (we miss the device type). We chose the later.

7 years agoMerge pull request #198 from The-42/fix-segfaults
Vincent Bernat [Tue, 30 Aug 2016 15:08:43 +0000 (17:08 +0200)] 
Merge pull request #198 from The-42/fix-segfaults

lib/atoms/port: fix segfaults with minimal information

7 years agolib/atoms/port: fix segfaults with minimal information 198/head
Bert van Hall [Tue, 30 Aug 2016 13:39:48 +0000 (15:39 +0200)] 
lib/atoms/port: fix segfaults with minimal information

When no packet has yet been received, querying LLDP information leads to
segfaults. Fix those by adding a couple pointer checks.

Signed-off-by: Bert van Hall <bert.vanhall@avionic-design.de>
7 years agolldpd: fix kernel version check
Vincent Bernat [Sat, 27 Aug 2016 22:46:04 +0000 (00:46 +0200)] 
lldpd: fix kernel version check

An erronous warning was displayed about kernel being too old while this
wasn't the case.

7 years agolldpcli: specify that custom TLV bytes are in hex format
Vincent Bernat [Thu, 25 Aug 2016 08:19:46 +0000 (10:19 +0200)] 
lldpcli: specify that custom TLV bytes are in hex format

7 years agobuild: test if libbsd is really usable
Vincent Bernat [Sat, 13 Aug 2016 22:21:00 +0000 (00:21 +0200)] 
build: test if libbsd is really usable

It is possible for libbsd to not be usable due to the use of
"-isystem". See for example:
 http://autobuild.buildroot.net/results/c8a/c8a6001f437701ecc75f6c9252935645bda8a8c8/lldpd-0.9.4/config.log

In this case, just don't use it.

7 years agodoc: document the change about ethtool info grabbed without the monitor
Vincent Bernat [Wed, 10 Aug 2016 07:51:00 +0000 (09:51 +0200)] 
doc: document the change about ethtool info grabbed without the monitor

7 years agobuild: ensure clang won't complain about documentation of linux headers
Vincent Bernat [Sun, 7 Aug 2016 10:23:28 +0000 (12:23 +0200)] 
build: ensure clang won't complain about documentation of linux headers

7 years agopriv: don't use monitor for ethtool except for old kernels
Vincent Bernat [Sun, 7 Aug 2016 09:47:03 +0000 (11:47 +0200)] 
priv: don't use monitor for ethtool except for old kernels

Since 2.6.37, we don't need any privilege for ethtool GSET. Not using
the monitor will increase performance.

7 years agointerface: use 10GBASE-CX4 for copper
Vincent Bernat [Sun, 7 Aug 2016 08:22:27 +0000 (10:22 +0200)] 
interface: use 10GBASE-CX4 for copper

That's the best approximation available in RFC4836.

7 years agointerface: more media for *BSD
Vincent Bernat [Sun, 7 Aug 2016 08:19:14 +0000 (10:19 +0200)] 
interface: more media for *BSD

OpenBSD and FreeBSD didn't agree on symbol names. Use #ifdef everywhere.

7 years agolldp: update RFC3636 to RFC4836
Vincent Bernat [Sun, 7 Aug 2016 06:14:43 +0000 (08:14 +0200)] 
lldp: update RFC3636 to RFC4836

Unfortunately, RFC4836 still lags behind. For example, no more than 10G
for speeds, no 10GBASE-T. For advertised modes, we try to be more
future-proof by using "other" for any unknown mode. Moreover, document
the fact that we advertise 10GBASE_T as 10GBASE-R and on Linux, we have
to guess when the port is fiber (and we guesss 10GBASE-X).

7 years agoinclude: update linux/ethtool.h to 4.7
Vincent Bernat [Sat, 6 Aug 2016 22:03:16 +0000 (00:03 +0200)] 
include: update linux/ethtool.h to 4.7

This is needed to support ETHTOOL_GLINKSETTINGS.

7 years agopriv: don't use ethtool to get real MAC
Vincent Bernat [Sat, 6 Aug 2016 21:55:32 +0000 (23:55 +0200)] 
priv: don't use ethtool to get real MAC

It was used if /proc/net/bonding was not available but:

 1. it shouldn't happen
 2. some drivers don't have a permanent MAC
 3. we may override a user setting
 4. more code to maintaing

7 years agopriv: document functions that should not use the monitor process
Vincent Bernat [Sat, 6 Aug 2016 21:46:06 +0000 (23:46 +0200)] 
priv: document functions that should not use the monitor process

We should use them only if "oldies" are enabled.

7 years agoNEWS: add an entry for 106aa50d
Vincent Bernat [Wed, 3 Aug 2016 05:05:23 +0000 (07:05 +0200)] 
NEWS: add an entry for 106aa50d

7 years agoRevert "lldp: skip empty LLDP-MED inventory TLV instead"
Vincent Bernat [Fri, 29 Jul 2016 20:31:02 +0000 (22:31 +0200)] 
Revert "lldp: skip empty LLDP-MED inventory TLV instead"

This reverts commit aa357d2b6b54c966353bcee4d7f14640540a8cf2. The
previous behaviour was equivalent. Let's stick to that for now.

7 years agolldp: skip empty LLDP-MED inventory TLV instead
Vincent Bernat [Fri, 29 Jul 2016 20:10:21 +0000 (22:10 +0200)] 
lldp: skip empty LLDP-MED inventory TLV instead

7 years agotravis: fix issue with Travis and libtool
Vincent Bernat [Fri, 29 Jul 2016 05:08:30 +0000 (07:08 +0200)] 
travis: fix issue with Travis and libtool

7 years agobuild: provide a better date format when using SOURCE_DATE_EPOCH
Vincent Bernat [Fri, 15 Jul 2016 22:42:10 +0000 (00:42 +0200)] 
build: provide a better date format when using SOURCE_DATE_EPOCH

And define the appropriate date at configure time.

7 years agoclient: flush output after each block
Vincent Bernat [Wed, 22 Jun 2016 16:06:08 +0000 (18:06 +0200)] 
client: flush output after each block

This enables to get realtime output from "lldpcli watch".

See #187.

7 years agobuild: ensure typeof is correctly defined
Vincent Bernat [Sun, 19 Jun 2016 06:43:06 +0000 (08:43 +0200)] 
build: ensure typeof is correctly defined

This could be typeof/__typeof/__typeof__.

Fix #186.

7 years agobuild: make generation of atom-glue compatible with older gcc versions
Vincent Bernat [Sat, 18 Jun 2016 20:18:41 +0000 (22:18 +0200)] 
build: make generation of atom-glue compatible with older gcc versions

With old versions, cpp doesn't accept several files as input. See #186.

7 years agorelease: prepare 0.9.4 for OSX
Vincent Bernat [Fri, 17 Jun 2016 17:22:50 +0000 (19:22 +0200)] 
release: prepare 0.9.4 for OSX

7 years agorelease: prepare 0.9.4 release 0.9.4
Vincent Bernat [Fri, 17 Jun 2016 17:19:18 +0000 (19:19 +0200)] 
release: prepare 0.9.4 release

7 years agoosx: update lldpd to 0.9.3
Vincent Bernat [Fri, 17 Jun 2016 17:19:10 +0000 (19:19 +0200)] 
osx: update lldpd to 0.9.3

7 years agodoc: document latest commit
Vincent Bernat [Tue, 14 Jun 2016 19:48:02 +0000 (21:48 +0200)] 
doc: document latest commit

7 years agolldp: add ability to control propagation of LLDPDU
Vincent Bernat [Tue, 14 Jun 2016 19:44:42 +0000 (21:44 +0200)] 
lldp: add ability to control propagation of LLDPDU

In 802.1AB-2009, two additional target addresses were added to allow an
LLDPDU to not be stopped by some equipments. Expose this ability as a
configure command.

Fix #171

7 years agolldpcli: fix watch return code
Vincent Bernat [Tue, 14 Jun 2016 10:12:25 +0000 (12:12 +0200)] 
lldpcli: fix watch return code

When watch terminates normally (after hitting a limit), ensure lldpcli
exits with status code 0.

7 years agolldpcli: fix memory leak with use of readline
Vincent Bernat [Tue, 14 Jun 2016 09:58:21 +0000 (11:58 +0200)] 
lldpcli: fix memory leak with use of readline

The lines returned by readline() should be freed.

7 years agointerfaces: blacklist cdc_mbim
Vincent Bernat [Tue, 14 Jun 2016 09:47:36 +0000 (11:47 +0200)] 
interfaces: blacklist cdc_mbim

This exposes a weird interface.

7 years agolldpcli: add a test for return code
Vincent Bernat [Tue, 14 Jun 2016 09:45:02 +0000 (11:45 +0200)] 
lldpcli: add a test for return code

7 years agolldpcli: ensure we exit with an error on incorrect commands
Vincent Bernat [Tue, 14 Jun 2016 09:41:57 +0000 (11:41 +0200)] 
lldpcli: ensure we exit with an error on incorrect commands

7 years agolldpcli: fix manual page for port status
Vincent Bernat [Tue, 14 Jun 2016 09:19:26 +0000 (11:19 +0200)] 
lldpcli: fix manual page for port status

Use rx-only, tx-only, rx-and-tx instead of rxOnly, txOnly, rxAndTx. Also
add some tests.

7 years agotests: remove useless variable
Vincent Bernat [Tue, 14 Jun 2016 09:07:19 +0000 (11:07 +0200)] 
tests: remove useless variable

7 years agobuild: fix build issue introduced in previous commit
Vincent Bernat [Mon, 13 Jun 2016 07:54:57 +0000 (09:54 +0200)] 
build: fix build issue introduced in previous commit

$^ was used for a reason: automake would fix the paths used in
dependencies using VPATH or something similar. For some reason, this
even break with GNU make when not using OOT build. Long story short, we
use a pattern substitution to ensure that the atom files are looked up
in the correct directory.

This use of substitutions is mandated by POSIX (the 2013 version I
think). See:
 http://austingroupbugs.net/view.php?id=519

It is however believed that most make implementation had support for
this since a long time.

7 years agobuild: don't rely on GNU make $^ automatic variable
Vincent Bernat [Mon, 13 Jun 2016 06:46:57 +0000 (08:46 +0200)] 
build: don't rely on GNU make $^ automatic variable

Not supported by BSD make. And not really needed either.

Fix #185.

7 years agobsd: fix use of ifmediareq for OpenBSD
Vincent Bernat [Mon, 13 Jun 2016 06:43:11 +0000 (08:43 +0200)] 
bsd: fix use of ifmediareq for OpenBSD

They changed the struct. Other BSD didn't. Use of "typeof()" to
circumvent this.

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/if.h#rev1.167

7 years agocdp: don't use comma expression and ternary operator
Vincent Bernat [Mon, 13 Jun 2016 06:29:45 +0000 (08:29 +0200)] 
cdp: don't use comma expression and ternary operator

This seems to confuse some versions of gcc.

7 years agoevent: fix formating of time_t
Vincent Bernat [Mon, 13 Jun 2016 06:18:42 +0000 (08:18 +0200)] 
event: fix formating of time_t

On OpenBSD, this is now a long long. Just cast to long long to be safe.

7 years agobuild: unsilent silent rules when running with V=1
Vincent Bernat [Sun, 12 Jun 2016 21:29:54 +0000 (23:29 +0200)] 
build: unsilent silent rules when running with V=1

7 years agolldp: accept LLDP frames sent through S-VLAN/C-VLAN bridges
Vincent Bernat [Sat, 11 Jun 2016 16:46:59 +0000 (18:46 +0200)] 
lldp: accept LLDP frames sent through S-VLAN/C-VLAN bridges

See #171.

7 years agoMerge pull request #184 from chutz/add-fcntl-and-getsockname-to-seccomp-whitelist
Vincent Bernat [Fri, 10 Jun 2016 17:35:05 +0000 (19:35 +0200)] 
Merge pull request #184 from chutz/add-fcntl-and-getsockname-to-seccomp-whitelist

seccomp: add fcntl and getsockname to seccomp whitelist

7 years agoseccomp: add fcntl and getsockname to seccomp whitelist 184/head
Patrick McLean [Fri, 10 Jun 2016 17:09:01 +0000 (10:09 -0700)] 
seccomp: add fcntl and getsockname to seccomp whitelist

Recent versions of lldpd make calls to fcntl and getsockname, but they
are not in the seccomp whitelist. This patch adds them. Reported by Gentoo
users in these bugs:

https://bugs.gentoo.org/577576
https://bugs.gentoo.org/564566

7 years agobuild: display if instrumentation and code coverage are enabled
Vincent Bernat [Fri, 10 Jun 2016 06:11:31 +0000 (08:11 +0200)] 
build: display if instrumentation and code coverage are enabled

7 years agobuild: add a configure option to enable gcov
Vincent Bernat [Fri, 10 Jun 2016 06:08:23 +0000 (08:08 +0200)] 
build: add a configure option to enable gcov

7 years agointerfaces: fix setting of local value for port ID
Vincent Bernat [Thu, 9 Jun 2016 16:07:00 +0000 (18:07 +0200)] 
interfaces: fix setting of local value for port ID

This was broken in a403df6662cd506fbf7fee8a46ebbf209142ffd7 (0.9.1). Add
some integration tests to ensure it works as expected.

Fix #183.

7 years agodoc: explain how to get coverage reports
Vincent Bernat [Thu, 9 Jun 2016 13:28:52 +0000 (15:28 +0200)] 
doc: explain how to get coverage reports

The base-directory option seems a bit off?

7 years agotests: fix SONMP test whose result depends on indexes
Vincent Bernat [Fri, 27 May 2016 12:25:45 +0000 (14:25 +0200)] 
tests: fix SONMP test whose result depends on indexes

7 years agolldpcli: display chassis TTL
Vincent Bernat [Fri, 27 May 2016 12:05:30 +0000 (14:05 +0200)] 
lldpcli: display chassis TTL

Fix #180.

7 years agolib: allow retrieval of chassis TTL
Vincent Bernat [Fri, 27 May 2016 12:03:09 +0000 (14:03 +0200)] 
lib: allow retrieval of chassis TTL

7 years agolldpcli: remove unused variable in display_custom_tlvs()
Vincent Bernat [Fri, 27 May 2016 11:45:26 +0000 (13:45 +0200)] 
lldpcli: remove unused variable in display_custom_tlvs()

7 years agolldpcli: display "Unknown TLVs" with a space
Vincent Bernat [Fri, 27 May 2016 11:43:28 +0000 (13:43 +0200)] 
lldpcli: display "Unknown TLVs" with a space

This should be an human readable string.

7 years agodaemon: add a `-p` option to specify PID file
Vincent Bernat [Wed, 25 May 2016 15:20:17 +0000 (17:20 +0200)] 
daemon: add a `-p` option to specify PID file

Fix #181

7 years agoprivsep: split privsep_io.c in 3 files
Vincent Bernat [Mon, 23 May 2016 09:04:55 +0000 (11:04 +0200)] 
privsep: split privsep_io.c in 3 files

This enables us to express correct information about copyright.

7 years agodebian: update debian/copyright
Vincent Bernat [Mon, 23 May 2016 09:01:16 +0000 (11:01 +0200)] 
debian: update debian/copyright

7 years agocompat: ensure ranlib is happy on OSX by providing one symbol
Vincent Bernat [Sat, 21 May 2016 10:52:00 +0000 (12:52 +0200)] 
compat: ensure ranlib is happy on OSX by providing one symbol

We were already doing that but recent versions of ranlib became smarter
and don't fall in the trap of a static variable. Provide a non-static
version instead.

7 years agodebian/redhat: prepare 0.9.3 0.9.3
Vincent Bernat [Sat, 21 May 2016 10:25:03 +0000 (12:25 +0200)] 
debian/redhat: prepare 0.9.3

7 years agotests: fix `lldpcli watch` XML test
Vincent Bernat [Fri, 20 May 2016 18:14:26 +0000 (20:14 +0200)] 
tests: fix `lldpcli watch` XML test

7 years agotests: add test of `lldpcli watch`
Vincent Bernat [Fri, 20 May 2016 18:13:07 +0000 (20:13 +0200)] 
tests: add test of `lldpcli watch`

7 years agoclient: add a way to limit the number of events received by "watch"
Vincent Bernat [Fri, 20 May 2016 09:10:55 +0000 (11:10 +0200)] 
client: add a way to limit the number of events received by "watch"

7 years agolib: remove unused variable
Vincent Bernat [Fri, 20 May 2016 09:04:02 +0000 (11:04 +0200)] 
lib: remove unused variable

7 years agocompat: use strtonum instead of atoi
Vincent Bernat [Fri, 20 May 2016 08:45:12 +0000 (10:45 +0200)] 
compat: use strtonum instead of atoi

When possible, use strtonum as it is more robust than atoi(). Also
replace some strtol() call when possible.

7 years agointerfaces/linux: make veth special
Vincent Bernat [Thu, 19 May 2016 21:36:24 +0000 (23:36 +0200)] 
interfaces/linux: make veth special

veth is always a physical interface. However, it may be hard to detect
because when they are created, lower interface for the first one is none
and lower interface for the second one is the first one. Hence, no loop
detected, hence the second one is not considered as a physical
interface.

This is madness, just whitelist "veth".

7 years agonetlink: don't complain of removal of inexistant IPv6 addresses
Vincent Bernat [Thu, 19 May 2016 21:22:17 +0000 (23:22 +0200)] 
netlink: don't complain of removal of inexistant IPv6 addresses

This happens with link-local addresses.

7 years agoclient: fix spurious warning in XML writer
Vincent Bernat [Thu, 19 May 2016 18:51:07 +0000 (20:51 +0200)] 
client: fix spurious warning in XML writer

It seems that libxml doesn't like generating an empty
document. Therefore, we initialize the writer only when we are sure we
will get content.

7 years agoclient: fix memory leak introduced n XML writer
Vincent Bernat [Thu, 19 May 2016 18:40:01 +0000 (20:40 +0200)] 
client: fix memory leak introduced n XML writer

7 years agoclient: remove memory leak introduced in JSON writers
Vincent Bernat [Thu, 19 May 2016 18:37:59 +0000 (20:37 +0200)] 
client: remove memory leak introduced in JSON writers

7 years agodoc: add an entry in NEWS for last two commits
Vincent Bernat [Thu, 19 May 2016 18:27:42 +0000 (20:27 +0200)] 
doc: add an entry in NEWS for last two commits