]>
git.ipfire.org Git - thirdparty/lldpd.git/log
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>
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.
Vincent Bernat [Thu, 25 Aug 2016 08:19:46 +0000 (10:19 +0200)]
lldpcli: specify that custom TLV bytes are in hex format
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.
Vincent Bernat [Wed, 10 Aug 2016 07:51:00 +0000 (09:51 +0200)]
doc: document the change about ethtool info grabbed without the monitor
Vincent Bernat [Sun, 7 Aug 2016 10:23:28 +0000 (12:23 +0200)]
build: ensure clang won't complain about documentation of linux headers
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.
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.
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.
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).
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.
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
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.
Vincent Bernat [Wed, 3 Aug 2016 05:05:23 +0000 (07:05 +0200)]
NEWS: add an entry for
106aa50d
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.
Vincent Bernat [Fri, 29 Jul 2016 20:10:21 +0000 (22:10 +0200)]
lldp: skip empty LLDP-MED inventory TLV instead
Vincent Bernat [Fri, 29 Jul 2016 05:08:30 +0000 (07:08 +0200)]
travis: fix issue with Travis and libtool
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.
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.
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.
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.
Vincent Bernat [Fri, 17 Jun 2016 17:22:50 +0000 (19:22 +0200)]
release: prepare 0.9.4 for OSX
Vincent Bernat [Fri, 17 Jun 2016 17:19:18 +0000 (19:19 +0200)]
release: prepare 0.9.4 release
Vincent Bernat [Fri, 17 Jun 2016 17:19:10 +0000 (19:19 +0200)]
osx: update lldpd to 0.9.3
Vincent Bernat [Tue, 14 Jun 2016 19:48:02 +0000 (21:48 +0200)]
doc: document latest commit
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
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.
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.
Vincent Bernat [Tue, 14 Jun 2016 09:47:36 +0000 (11:47 +0200)]
interfaces: blacklist cdc_mbim
This exposes a weird interface.
Vincent Bernat [Tue, 14 Jun 2016 09:45:02 +0000 (11:45 +0200)]
lldpcli: add a test for return code
Vincent Bernat [Tue, 14 Jun 2016 09:41:57 +0000 (11:41 +0200)]
lldpcli: ensure we exit with an error on incorrect commands
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.
Vincent Bernat [Tue, 14 Jun 2016 09:07:19 +0000 (11:07 +0200)]
tests: remove useless variable
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.
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.
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
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.
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.
Vincent Bernat [Sun, 12 Jun 2016 21:29:54 +0000 (23:29 +0200)]
build: unsilent silent rules when running with V=1
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.
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
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
Vincent Bernat [Fri, 10 Jun 2016 06:11:31 +0000 (08:11 +0200)]
build: display if instrumentation and code coverage are enabled
Vincent Bernat [Fri, 10 Jun 2016 06:08:23 +0000 (08:08 +0200)]
build: add a configure option to enable gcov
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.
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?
Vincent Bernat [Fri, 27 May 2016 12:25:45 +0000 (14:25 +0200)]
tests: fix SONMP test whose result depends on indexes
Vincent Bernat [Fri, 27 May 2016 12:05:30 +0000 (14:05 +0200)]
lldpcli: display chassis TTL
Fix #180.
Vincent Bernat [Fri, 27 May 2016 12:03:09 +0000 (14:03 +0200)]
lib: allow retrieval of chassis TTL
Vincent Bernat [Fri, 27 May 2016 11:45:26 +0000 (13:45 +0200)]
lldpcli: remove unused variable in display_custom_tlvs()
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.
Vincent Bernat [Wed, 25 May 2016 15:20:17 +0000 (17:20 +0200)]
daemon: add a `-p` option to specify PID file
Fix #181
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.
Vincent Bernat [Mon, 23 May 2016 09:01:16 +0000 (11:01 +0200)]
debian: update debian/copyright
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.
Vincent Bernat [Sat, 21 May 2016 10:25:03 +0000 (12:25 +0200)]
debian/redhat: prepare 0.9.3
Vincent Bernat [Fri, 20 May 2016 18:14:26 +0000 (20:14 +0200)]
tests: fix `lldpcli watch` XML test
Vincent Bernat [Fri, 20 May 2016 18:13:07 +0000 (20:13 +0200)]
tests: add test of `lldpcli 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"
Vincent Bernat [Fri, 20 May 2016 09:04:02 +0000 (11:04 +0200)]
lib: remove unused variable
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.
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".
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.
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.
Vincent Bernat [Thu, 19 May 2016 18:40:01 +0000 (20:40 +0200)]
client: fix memory leak introduced n XML writer
Vincent Bernat [Thu, 19 May 2016 18:37:59 +0000 (20:37 +0200)]
client: remove memory leak introduced in JSON writers
Vincent Bernat [Thu, 19 May 2016 18:27:42 +0000 (20:27 +0200)]
doc: add an entry in NEWS for last two commits
Vincent Bernat [Thu, 19 May 2016 18:26:37 +0000 (20:26 +0200)]
client: flush XML object once we have one
See previous commit. This fixes `lldpcli -f xml watch`.
Fix: #179.
Vincent Bernat [Thu, 19 May 2016 18:15:24 +0000 (20:15 +0200)]
client: flush JSON object once it's done
This enables `lldpcli -f json watch` to work as expected. See #179.
Vincent Bernat [Thu, 19 May 2016 18:09:11 +0000 (20:09 +0200)]
travis: test json-c support in lldpcli as well
Vincent Bernat [Thu, 19 May 2016 18:06:21 +0000 (20:06 +0200)]
travis: no need for --with-{json,xml}
It's automatically enabled.
Vincent Bernat [Mon, 16 May 2016 07:09:37 +0000 (09:09 +0200)]
log: update manual page to reflect the situation
Vincent Bernat [Mon, 16 May 2016 06:56:56 +0000 (08:56 +0200)]
log: make a copy of va when logging to both stderr and syslog
On common platform, the copy is cheap. In case it isn't we note that the
copy doesn't happen if using a log handler and syslog cannot be enabled
with debug messages.
Vincent Bernat [Mon, 16 May 2016 06:55:34 +0000 (08:55 +0200)]
log: don't fallback to stderr for out-of-memory situation
We don't know if "ap" is still valid. Just don't do anything.
Vincent Bernat [Mon, 16 May 2016 06:46:57 +0000 (08:46 +0200)]
log: always log to stderr
Otherwise, error messages are not displayed on startup and this may
confuse users.
Vincent Bernat [Mon, 16 May 2016 06:09:05 +0000 (08:09 +0200)]
daemon: tell user to create user/group when missing
Vincent Bernat [Sun, 15 May 2016 19:14:13 +0000 (21:14 +0200)]
daemon: give the name of the control socket
Otherwise, people have to enable debug to get the information.
Vincent Bernat [Sat, 14 May 2016 17:46:07 +0000 (19:46 +0200)]
interfaces: ensure we don't break strict aliasing rule
Use an union to manipulate IPv4/IPv6 address. Other occurrences are
using memcpy (notably with "struct sockaddr_storage"). This is
preventive since gcc seems to rely more on this strict aliasing rule
since gcc-6.
Vincent Bernat [Fri, 29 Apr 2016 09:37:35 +0000 (11:37 +0200)]
Merge pull request #177 from jonasj76/fix-apparmor-build
Fix AppArmor "no" option in configure script
Jonas Johansson [Fri, 29 Apr 2016 08:36:14 +0000 (10:36 +0200)]
build: fix AppArmor "no" (default) option in configure script
Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Vincent Bernat [Fri, 22 Apr 2016 16:06:11 +0000 (18:06 +0200)]
tests: do not compile tests/decode unless running tests
Fix #175
Vincent Bernat [Thu, 21 Apr 2016 13:00:59 +0000 (15:00 +0200)]
Merge pull request #174 from jonasj76/fix_discard_uint32
Fix size of PEEK_DISCARD_UINT32()
Jonas Johansson [Thu, 21 Apr 2016 09:50:06 +0000 (11:50 +0200)]
Fix size of PEEK_DISCARD_UINT32()
Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Vincent Bernat [Tue, 19 Apr 2016 13:26:32 +0000 (15:26 +0200)]
doc: mention Windows agent "WinLLDPService"
Vincent Bernat [Fri, 15 Apr 2016 18:53:50 +0000 (20:53 +0200)]
lldpcli: remove bogus pasting error from manual page
Vincent Bernat [Fri, 15 Apr 2016 12:12:05 +0000 (14:12 +0200)]
debian: do not remove _lldpd user
While not strictly enforced, it is now considered better to not remove a
user on purge. We have no guarantee that the user is not owning some
files we didn't remove and those files could be attributed to another
user if the current user is removed. Moreover, less code.
Vincent Bernat [Sun, 10 Apr 2016 13:29:18 +0000 (15:29 +0200)]
travis: install libseccomp-dev as well
Vincent Bernat [Sun, 10 Apr 2016 12:45:36 +0000 (14:45 +0200)]
seccomp: fix a compilation warning with respect to uninitialized seccomp
Vincent Bernat [Sat, 9 Apr 2016 12:42:28 +0000 (14:42 +0200)]
travis: also test with seccomp enabled
This functionality has been untested for far too long.
Vincent Bernat [Thu, 7 Apr 2016 05:38:22 +0000 (07:38 +0200)]
build: don't include merges into changelog
Vincent Bernat [Fri, 1 Apr 2016 07:29:56 +0000 (09:29 +0200)]
travis: check we can build static lldpcli
Vincent Bernat [Sun, 27 Mar 2016 08:25:50 +0000 (10:25 +0200)]
build: silence libtool warning about using cru
Use "cr" instead. Snippet stolen from freeciv.
Vincent Bernat [Wed, 23 Mar 2016 21:09:55 +0000 (22:09 +0100)]
lib: use C preprocessor to build list of init functions
Because some features can be disabled, we cannot just parse the C file,
we need to run the C preprocessor on them. Hopefully, the GNU make stuff
(filter) should be portable enough.
Vincent Bernat [Wed, 23 Mar 2016 20:27:54 +0000 (21:27 +0100)]
lib: don't rely on atom-glue.h
This file is useless. Just use atom-glue.c.
Vincent Bernat [Wed, 23 Mar 2016 19:48:35 +0000 (20:48 +0100)]
build: ensure atom-glue.h is built first
Forcing direct dependencies is incompatible with VPATH. Use
BUILT_SOURCES instead.
Vincent Bernat [Wed, 23 Mar 2016 07:33:11 +0000 (08:33 +0100)]
lib: don't rely on constructors
Constructors do not work when compiled as a static libraries. Moreover,
some dynamic linkers have still support for constructors optional (for
example, uclibc). Since this can be tested only at runtime, this is not
possible to detect that during configure when crosscompiling.
Emulate this with our own glue code.
Vincent Bernat [Tue, 22 Mar 2016 20:25:10 +0000 (21:25 +0100)]
lldpd: don't log error string for missing _lldpd user
The additional error message (ENOENT) could just confuse the user.
Vincent Bernat [Mon, 21 Mar 2016 13:26:15 +0000 (14:26 +0100)]
tests/integration: only spawn a receive-only lldpd in first namespace
We don't need it to send anything.
Vincent Bernat [Sun, 20 Mar 2016 14:38:22 +0000 (15:38 +0100)]
osx: update HomeBrew recipe for 0.9.2
Vincent Bernat [Sat, 19 Mar 2016 19:08:34 +0000 (20:08 +0100)]
travis: remove coverity stuff
It's broken. Maybe it would be better to use clang-analyzer instead.