]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
5 years agotests: request CAP_DAC_OVERRIDE feature/linux-caps 285/head
Vincent Bernat [Sat, 16 Jun 2018 15:59:32 +0000 (17:59 +0200)] 
tests: request CAP_DAC_OVERRIDE

CAP_FOWNER is for being able to use chown/chmod. The permission we
need to ignore permissions is CAP_DAC_OVERRIDE. It is quite a large
permission, unfortunately.

5 years agotests: add SNMP-related tests
Vincent Bernat [Sat, 16 Jun 2018 15:30:06 +0000 (17:30 +0200)] 
tests: add SNMP-related tests

5 years agopriv: always request CAP_FOWNER
Vincent Bernat [Sat, 16 Jun 2018 15:53:33 +0000 (17:53 +0200)] 
priv: always request CAP_FOWNER

While setting ifalias has some additional checks to ensure we can do
that with CAP_NET_ADMIN, we also need CAP_FOWNER to pass the sysfs
owner check. And we have to have both as the other test still needs to
pass.

5 years agopriv: request CAP_FOWNER only if SNMP is enabled on command-line
Vincent Bernat [Sat, 16 Jun 2018 15:47:14 +0000 (17:47 +0200)] 
priv: request CAP_FOWNER only if SNMP is enabled on command-line

5 years agopriv: don't use %m in format string
Vincent Bernat [Sat, 16 Jun 2018 15:36:16 +0000 (17:36 +0200)] 
priv: don't use %m in format string

This is not portable, use %s, even if we are on Linux.

5 years agodebian/redhat: build-depends on libcap-dev/libcap-devel
Vincent Bernat [Fri, 15 Jun 2018 08:57:05 +0000 (10:57 +0200)] 
debian/redhat: build-depends on libcap-dev/libcap-devel

5 years agotests: don't start lldpd twice in a namespace
Vincent Bernat [Fri, 15 Jun 2018 06:11:25 +0000 (08:11 +0200)] 
tests: don't start lldpd twice in a namespace

5 years agotests: add a test for interface alias handling
Vincent Bernat [Fri, 15 Jun 2018 05:27:38 +0000 (07:27 +0200)] 
tests: add a test for interface alias handling

5 years agobuild: also test directly for -lcap when no pkg-config
Vincent Bernat [Wed, 13 Jun 2018 06:06:45 +0000 (08:06 +0200)] 
build: also test directly for -lcap when no pkg-config

5 years agopriv: when SNMP AgentX socket is filesystem-based, acquire CAP_FOWNER
Vincent Bernat [Wed, 13 Jun 2018 05:56:48 +0000 (07:56 +0200)] 
priv: when SNMP AgentX socket is filesystem-based, acquire CAP_FOWNER

5 years agopriv: drop most privileges in monitor, only keep CAP_NET_RAW/ADMIN
Vincent Bernat [Tue, 12 Jun 2018 21:17:21 +0000 (23:17 +0200)] 
priv: drop most privileges in monitor, only keep CAP_NET_RAW/ADMIN

On Linux, we mostly rely on CAP_NET_RAW. Only keep that one. However,
we also write to ifalias, which needs CAP_NET_ADMIN. We could let user
choose at runtime if they want to grant this capability or not.
Currently, a user can turn it on/off at any time.

Access to SNMP socket may also be problematic. We need some solid
solution about that before merging.

Is it safe to use the same UID for the monitored and the unprivileged
process? Signals are mostly harmless. As for ptrace, since the
monitored process as more capabilities, this will not be allowed by
Linux.

5 years agobuild: use lowercase for PKG_CHECK_MODULES
Vincent Bernat [Wed, 13 Jun 2018 05:41:00 +0000 (07:41 +0200)] 
build: use lowercase for PKG_CHECK_MODULES

Otherwise, this is a bit ugly.

6 years agodoc: add more instructions for Android
Vincent Bernat [Wed, 11 Apr 2018 06:45:24 +0000 (08:45 +0200)] 
doc: add more instructions for Android

6 years agobuild: no fatal errors when compiling with embedded libevent on macOS 1.0.1
Vincent Bernat [Mon, 9 Apr 2018 12:45:03 +0000 (14:45 +0200)] 
build: no fatal errors when compiling with embedded libevent on macOS

6 years agobuild: don't override CFLAGS when building libevent
Vincent Bernat [Mon, 9 Apr 2018 12:19:03 +0000 (14:19 +0200)] 
build: don't override CFLAGS when building libevent

We still want for example the minimal macOS version.

6 years agorelease: 1.0.1
Vincent Bernat [Mon, 9 Apr 2018 11:44:08 +0000 (13:44 +0200)] 
release: 1.0.1

6 years agodaemon: use "mkdir -p" instead of "mkdir"
Vincent Bernat [Mon, 9 Apr 2018 11:39:46 +0000 (13:39 +0200)] 
daemon: use "mkdir -p" instead of "mkdir"

We don't use `RuntimeDirectory=` because it needs to be relative to
`/run`. As PRIVSEP_CHROOT can be any value, this is not possible.

6 years agoRevert "daemon: use RuntimeDirectory= instead of mkdir to create chroot"
Vincent Bernat [Mon, 9 Apr 2018 11:39:18 +0000 (13:39 +0200)] 
Revert "daemon: use RuntimeDirectory= instead of mkdir to create chroot"

This reverts commit 478ec07ddc343e68d1691d551dba00919fa79d70.

6 years agodaemon: use RuntimeDirectory= instead of mkdir to create chroot
Vincent Bernat [Mon, 9 Apr 2018 10:53:33 +0000 (12:53 +0200)] 
daemon: use RuntimeDirectory= instead of mkdir to create chroot

This fix a bug introduced in b0ca585f627aa where "mkdir -p" was
replaced by "mkdir" which would fail on restart due to the directory
already existing.

6 years agobuild: try another way to circumvent macOS warning in libevent
Vincent Bernat [Mon, 9 Apr 2018 05:26:18 +0000 (07:26 +0200)] 
build: try another way to circumvent macOS warning in libevent

6 years agobuild: also build with embedded libevent in OSX
Vincent Bernat [Sun, 8 Apr 2018 18:34:35 +0000 (20:34 +0200)] 
build: also build with embedded libevent in OSX

6 years agobuild: don't be picky about deprecated stuff in libevent
Vincent Bernat [Sun, 8 Apr 2018 17:26:43 +0000 (19:26 +0200)] 
build: don't be picky about deprecated stuff in libevent

This should fix:

    evutil_rand.c:177:2: error: 'arc4random_addrandom' is deprecated: first deprecated in macOS 10.12 - use arc4random_stir [-Werror,-Wdeprecated-declarations]

6 years agorelease: prepare 1.0.0 1.0.0
Vincent Bernat [Sun, 8 Apr 2018 16:30:57 +0000 (18:30 +0200)] 
release: prepare 1.0.0

6 years agoMerge pull request #274 from vincentbernat/feature/keep-some-ports
Vincent Bernat [Sun, 18 Mar 2018 11:08:13 +0000 (12:08 +0100)] 
Merge pull request #274 from vincentbernat/feature/keep-some-ports

lldpd: add an option to keep some specified ports

6 years agoMerge pull request #272 from westermo/fix-snmp-remTablesLastChange
Vincent Bernat [Sat, 17 Mar 2018 16:06:38 +0000 (17:06 +0100)] 
Merge pull request #272 from westermo/fix-snmp-remTablesLastChange

handle lldpStatsRemTablesLastChangeTime correctly when items are removed

6 years agolldpd: add an option to keep some specified ports feature/keep-some-ports 274/head
Vincent Bernat [Sat, 17 Mar 2018 15:28:31 +0000 (16:28 +0100)] 
lldpd: add an option to keep some specified ports

A user can specify a pattern of ports to not delete even when they are
removed from the system. If a port is removed from the system and
match the pattern, it will be kept in memory.

6 years agotests: update tests for configuration keeping on port down/removed
Vincent Bernat [Mon, 12 Mar 2018 20:47:48 +0000 (21:47 +0100)] 
tests: update tests for configuration keeping on port down/removed

6 years agoclient: remove previous way to set port description from documentation
Vincent Bernat [Mon, 12 Mar 2018 17:11:09 +0000 (18:11 +0100)] 
client: remove previous way to set port description from documentation

6 years agotest: add test for new portdescription setting
Vincent Bernat [Mon, 12 Mar 2018 16:51:28 +0000 (17:51 +0100)] 
test: add test for new portdescription setting

6 years agointerfaces: fix out-of-bound access when getting permanent MAC address
Vincent Bernat [Mon, 12 Mar 2018 16:29:09 +0000 (17:29 +0100)] 
interfaces: fix out-of-bound access when getting permanent MAC address

Also, use a classic malloc() instead of a weird union. This makes
compilers better to catch this kind of error (at least on runtime with
sanitizers).

6 years agotests: don't crash if lldpd crashed
Vincent Bernat [Mon, 12 Mar 2018 16:21:03 +0000 (17:21 +0100)] 
tests: don't crash if lldpd crashed

Otherwise, we don't get the appropriate information!

6 years agoMerge pull request #273 from westermo/config-portdescr
Vincent Bernat [Mon, 12 Mar 2018 15:56:04 +0000 (16:56 +0100)] 
Merge pull request #273 from westermo/config-portdescr

client: add alternative way to configure port description

6 years agodoc: add entry for portdescription in lldpcli manual page 273/head
Jonas Johansson [Mon, 12 Mar 2018 15:29:47 +0000 (16:29 +0100)] 
doc: add entry for portdescription in lldpcli manual page

Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
6 years agoclient: add alternative way to configure port description
Thomas Eliasson [Thu, 8 Mar 2018 14:34:17 +0000 (15:34 +0100)] 
client: add alternative way to configure port description

The existing port description CLI command only allows user configured
description if setting port id subtype to local. This patch introduces
an subtype independent way to configure port description.

Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
6 years agohandle lldpStatsRemTablesLastChangeTime correctly when items are removed 272/head
Thomas Eliasson [Thu, 8 Mar 2018 14:10:39 +0000 (15:10 +0100)] 
handle lldpStatsRemTablesLastChangeTime correctly when items are removed

When a port is removed, the time has to be updated. The last removal time is
registered per local port, and this timestamp will be used as
lldpStatsRemTablesLastChangeTime if it is the latest timestamp.
Also, the lldpStatsRemTablesDeletes is  always increased when an entry in the
table is deleted.

Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
6 years agonetlink: fix non-updated management address
Vincent Bernat [Thu, 1 Mar 2018 07:02:12 +0000 (08:02 +0100)] 
netlink: fix non-updated management address

6 years agodaemon: ensure interval update is taken into account fast
Vincent Bernat [Thu, 1 Mar 2018 07:01:28 +0000 (08:01 +0100)] 
daemon: ensure interval update is taken into account fast

6 years agoMerge pull request #271 from axjowa/fix/dot3-pd-pse-echo
Vincent Bernat [Mon, 26 Feb 2018 16:16:56 +0000 (17:16 +0100)] 
Merge pull request #271 from axjowa/fix/dot3-pd-pse-echo

Fix NULL pointer dereference in lldpd_dot3_power_pd_pse

6 years agoFix NULL pointer dereference in lldpd_dot3_power_pd_pse 271/head
axjowa [Mon, 26 Feb 2018 16:00:29 +0000 (17:00 +0100)] 
Fix NULL pointer dereference in lldpd_dot3_power_pd_pse

selected_port might be NULL after the loop if, for example,
no PSE was found among the neighbours.

This fixes a crash that occured with a device connected to
a non-PoE, LLDP-enabled switch via a PoE midspan.

6 years agobuild: don't enable sanitizers and safe-stack at the same time
Vincent Bernat [Wed, 21 Feb 2018 20:56:12 +0000 (21:56 +0100)] 
build: don't enable sanitizers and safe-stack at the same time

They are not compatible. At least on clang, they both try to
instrument the same functions.

6 years agointerfaces: explain why we cannot get the permanent MAC address
Vincent Bernat [Wed, 21 Feb 2018 20:42:41 +0000 (21:42 +0100)] 
interfaces: explain why we cannot get the permanent MAC address

6 years agobuild: isolate SNMP-related files during compilation
Vincent Bernat [Wed, 21 Feb 2018 18:19:37 +0000 (19:19 +0100)] 
build: isolate SNMP-related files during compilation

@NETSNMP_CFLAGS@ is likely to contain some extensively damaged
flags. Ensure we use them only to compile SNMP-related files.

This should fix #231.

6 years agolib: lldpctl_k_config_paused is writable
Vincent Bernat [Tue, 20 Feb 2018 22:36:38 +0000 (23:36 +0100)] 
lib: lldpctl_k_config_paused is writable

6 years agodoc: add ./autogen.sh to build instructions
Vincent Bernat [Wed, 7 Feb 2018 07:24:52 +0000 (08:24 +0100)] 
doc: add ./autogen.sh to build instructions

But stress users should look at the website instead.

Fix #268.

6 years agoosx: use "squiggly" heredoc
Vincent Bernat [Fri, 19 Jan 2018 18:26:27 +0000 (19:26 +0100)] 
osx: use "squiggly" heredoc

The least indented line is use as a base. Ruby 2.3.

6 years agoMerge pull request #266 from dennypage/master
Vincent Bernat [Tue, 6 Feb 2018 07:07:21 +0000 (08:07 +0100)] 
Merge pull request #266 from dennypage/master

Add missing options to usage

6 years agoAdd missing options to usage 266/head
Denny Page [Tue, 6 Feb 2018 03:51:30 +0000 (19:51 -0800)] 
Add missing options to usage

6 years agoclient: change description for chassis ID override
Vincent Bernat [Wed, 3 Jan 2018 07:02:26 +0000 (08:02 +0100)] 
client: change description for chassis ID override

6 years agodaemon: move vfork/fork handling directly in lldpd.c
Vincent Bernat [Sun, 31 Dec 2017 11:57:52 +0000 (12:57 +0100)] 
daemon: move vfork/fork handling directly in lldpd.c

This is not needed elsewhere. This way, we ensure redefinition of
vfork() to fork() through a define is working as expected, even when
some system headers may try to rename vfork too.

Fix #264

6 years agoMerge pull request #263 from vic-lin-accton/master
Vincent Bernat [Sat, 30 Dec 2017 12:47:14 +0000 (13:47 +0100)] 
Merge pull request #263 from vic-lin-accton/master

Check if there is user defined string before use chassis name for cha…

6 years agolib: ability to configure a local chassis ID 263/head
Vincent Bernat [Sat, 30 Dec 2017 12:24:46 +0000 (13:24 +0100)] 
lib: ability to configure a local chassis ID

Also, remove the `-c` flag for lldpd that was previously introduced.

6 years agodaemon: ensure chassis-related changes are updated immediately
Vincent Bernat [Sat, 30 Dec 2017 12:21:33 +0000 (13:21 +0100)] 
daemon: ensure chassis-related changes are updated immediately

6 years agolib: move new lldpctl_k_config_cid_string to end of section
Vincent Bernat [Sat, 30 Dec 2017 11:52:03 +0000 (12:52 +0100)] 
lib: move new lldpctl_k_config_cid_string to end of section

Otherwise, ABI would change.

6 years agolldpd: check for defined string before use chassis name for chassis id
vic_lin [Thu, 28 Dec 2017 06:57:29 +0000 (06:57 +0000)] 
lldpd: check for defined string before use chassis name for chassis id

6 years agoosx: update Homebrew formula
Vincent Bernat [Sat, 30 Dec 2017 09:02:37 +0000 (10:02 +0100)] 
osx: update Homebrew formula

6 years agodaemon: don't use @mkdir_p@ substitution for systemd service file
Vincent Bernat [Tue, 19 Dec 2017 13:03:59 +0000 (14:03 +0100)] 
daemon: don't use @mkdir_p@ substitution for systemd service file

It is the path to the host mkdir, not to the target mkdir. Just use
/bin/mkdir.

6 years agoconfigure: remove check on CXX compiler
Damien Riegel [Mon, 18 Dec 2017 19:37:08 +0000 (14:37 -0500)] 
configure: remove check on CXX compiler

lldpd fails to build if the toolchain doesn't have a C++ compiler
because configure fails with the following error:

  checking how to run the C++ preprocessor... /lib/cpp
  configure: error: in `/home/dkc/src/buildroot/build-zii/build/lldpd-0.9.4':
  configure: error: C++ preprocessor "/lib/cpp" fails sanity check

Since "8d92800b: build: cleaner way to not alter CFLAGS/CPPFLAGS/LDFLAGS",
it seems that the dependency on C++ is not required anymore, so there
is no reason to keep this restriction. Dropping AC_PROG_CXX allows to
build with a toolchain that doesn't have C++ just fine.

6 years agodoc: add a word about Intel X710 with embedded LLDP daemon
Vincent Bernat [Sat, 9 Dec 2017 21:09:21 +0000 (22:09 +0100)] 
doc: add a word about Intel X710 with embedded LLDP daemon

6 years agodoc: rename OS X to macOS
Vincent Bernat [Tue, 21 Nov 2017 16:38:25 +0000 (17:38 +0100)] 
doc: rename OS X to macOS

6 years agoLICENSE: add title and copyright notice (#259)
Waldir Pimenta [Thu, 7 Dec 2017 18:51:39 +0000 (18:51 +0000)] 
LICENSE: add title and copyright notice (#259)

* LICENSE: add title and copyright notice

The title is not legally mandated, but it's recommended in the license template text (see http://choosealicense.com/licenses/isc/ and https://opensource.org/licenses/isc-license).

The copyright notice is required, IIRC.

* fix date in copyright notice

* add notice about additional licensing terms

6 years agorelease: force S3 deployment whatever the branch is 0.9.9
Vincent Bernat [Tue, 21 Nov 2017 15:42:46 +0000 (16:42 +0100)] 
release: force S3 deployment whatever the branch is

6 years agorelease: prepare 0.9.9
Vincent Bernat [Tue, 21 Nov 2017 14:15:55 +0000 (15:15 +0100)] 
release: prepare 0.9.9

6 years agodot3: as PD device, echo back PSE allocated value
Vincent Bernat [Sun, 19 Nov 2017 15:38:33 +0000 (16:38 +0100)] 
dot3: as PD device, echo back PSE allocated value

Dot3 power TLV contains an allocated value and a requested value. When
PSE allocates some power and says so in its TLV, PD device is expected
to echo back (within 10 seconds) the received value in its own TLV. We
handle this part automatically.

Fix #243
Fix #249

6 years agotravis: upload OSX build to some S3 bucket
Vincent Bernat [Sun, 19 Nov 2017 19:42:26 +0000 (20:42 +0100)] 
travis: upload OSX build to some S3 bucket

Still a WIP.

6 years agopriv: also allow the use of openat for seccomp
Vincent Bernat [Thu, 16 Nov 2017 15:38:55 +0000 (16:38 +0100)] 
priv: also allow the use of openat for seccomp

6 years agoMerge pull request #253 from gregoryp/document_json0_in_cli
Vincent Bernat [Wed, 8 Nov 2017 18:45:15 +0000 (19:45 +0100)] 
Merge pull request #253 from gregoryp/document_json0_in_cli

lldpcli: document json0 output format

6 years agolldpcli: document json0 output format 253/head
Gregory Potamianos [Wed, 8 Nov 2017 17:30:07 +0000 (19:30 +0200)] 
lldpcli: document json0 output format

6 years agoMerge pull request #251 from vincentbernat/fix/reap-children
Vincent Bernat [Tue, 24 Oct 2017 17:35:31 +0000 (19:35 +0200)] 
Merge pull request #251 from vincentbernat/fix/reap-children

priv: correctly handle lldpcli exit

6 years agopriv: provide a simpler sig_chld when priv sep is disabled fix/reap-children 251/head
Vincent Bernat [Sun, 22 Oct 2017 19:04:29 +0000 (21:04 +0200)] 
priv: provide a simpler sig_chld when priv sep is disabled

We restore the original sig_chld() helper function when privilege
separation is enabled but we use a very simple one when not. This
should still fix the zombie issue.

6 years agopriv: correctly handle lldpcli exit
Vincent Bernat [Fri, 20 Oct 2017 06:42:01 +0000 (08:42 +0200)] 
priv: correctly handle lldpcli exit

When lldpcli exits, we must acknowledge its death with
`waitpid()`. There were two missing cases:

 - when lldpcli exits before setting the SIG_CHLD signal
 - when privilege separation was not configured

For the first case, we call the function associated to the signal
ourselves after the signal is configured. This function is idempotent.

For the second case, we setup the SIG_CHLD signal even when privilege
separation is disabled.

Fix #250

6 years agodaemon: don't fork at all when using upstart
Vincent Bernat [Mon, 2 Oct 2017 19:52:33 +0000 (21:52 +0200)] 
daemon: don't fork at all when using upstart

It seems there is a bug in Upstart state machine. If the process fail
before daemonizing, Upstart says the process will be respawned but that's
not the case. Moreover, Upstart has difficulty to correctly track
daemonization of lldpd (it is confused by the additional process
spawning after initial daemonization, for some reason?).

Fix #245 (for real)

6 years agodaemon: don't use SIGSTOP when using Upstart
Vincent Bernat [Sat, 30 Sep 2017 10:48:33 +0000 (12:48 +0200)] 
daemon: don't use SIGSTOP when using Upstart

This is buggy because if lldpd happens to stop before sending SIGSTOP,
Upstart won't respawn it. See:
 https://bugs.launchpad.net/upstart/+bug/712351

Instead, let Upstart detects the double fork. This should work just
fine as there is no "trap" before daemonizing.

Fix #245

6 years agoMerge pull request #246 from vincentbernat/feature/safestack
Vincent Bernat [Thu, 28 Sep 2017 13:13:16 +0000 (15:13 +0200)] 
Merge pull request #246 from vincentbernat/feature/safestack

build: enable clang safe-stack feature if available

6 years agobuild: only enable safe-stack if linker supports it feature/safestack 246/head
Vincent Bernat [Thu, 28 Sep 2017 11:11:32 +0000 (13:11 +0200)] 
build: only enable safe-stack if linker supports it

6 years agobuild: enable clang safe-stack feature if available
Vincent Bernat [Thu, 28 Sep 2017 08:33:02 +0000 (10:33 +0200)] 
build: enable clang safe-stack feature if available

6 years agonetlink: be more precise in how we handle link deletion of bridged interface
Vincent Bernat [Wed, 20 Sep 2017 22:25:01 +0000 (00:25 +0200)] 
netlink: be more precise in how we handle link deletion of bridged interface

If link family is AF_BRIDGE, transform deletion into update of
interface. Otherwise, skip the update.

6 years agotests: fix previous testcase to fail without previous commit
Vincent Bernat [Fri, 15 Sep 2017 21:20:28 +0000 (23:20 +0200)] 
tests: fix previous testcase to fail without previous commit

Only the bridge ioctl can trigger this bug.

6 years agonetlink: don't remove interfaces when they are released from a bridge
Vincent Bernat [Fri, 15 Sep 2017 20:38:52 +0000 (22:38 +0200)] 
netlink: don't remove interfaces when they are released from a bridge

When released from a bridge, a RTM_DELLINK is sent. We detect there is
an upper device and turn thay into a RTM_NEWLINK. If the interface was
really removed, we would get two RTM_DELLINK (one with master, one
without).

On most setups, another RTM_NEWLINK was sent due to change of promisc
status.

6 years agotravis: fix broken build due to incomplete python install
Vincent Bernat [Wed, 13 Sep 2017 20:50:57 +0000 (22:50 +0200)] 
travis: fix broken build due to incomplete python install

Unsure of the root cause. See this build log:
 https://travis-ci.org/vincentbernat/lldpd/jobs/275129851

6 years agopriv: add getpid() to seccomp filter
Vincent Bernat [Wed, 13 Sep 2017 17:07:43 +0000 (19:07 +0200)] 
priv: add getpid() to seccomp filter

6 years agosrc: #include <limits.h> when using strtonum()
Vincent Bernat [Thu, 7 Sep 2017 17:52:01 +0000 (19:52 +0200)] 
src: #include <limits.h> when using strtonum()

`strtonum()` seems to work without it, but there is a hint in issue #242
that there is something fishy around that.

6 years agoosx: sync homebrew formula
Vincent Bernat [Mon, 4 Sep 2017 05:03:39 +0000 (07:03 +0200)] 
osx: sync homebrew formula

6 years agoclient: add NEWS entry for before-last commit
Vincent Bernat [Wed, 30 Aug 2017 05:47:34 +0000 (07:47 +0200)] 
client: add NEWS entry for before-last commit

6 years agoclient/tests: remove standalone "return" at the end of functions
Vincent Bernat [Wed, 30 Aug 2017 05:46:03 +0000 (07:46 +0200)] 
client/tests: remove standalone "return" at the end of functions

6 years agoclient: add show interfaces command (#240)
Steven Webster [Wed, 30 Aug 2017 05:43:54 +0000 (01:43 -0400)] 
client: add show interfaces command (#240)

There are several lldpcli configure commands that take port name(s)
as an optional parameter.

Currently, it is not possible to verify interface specific configuration
for lldpd without access to a neighbour switch/host or packet capture.

It would be useful to have a show interfaces command, similar to the
show neighbors command that allows a user/agent to query the local
TLV information.

This commit leverages the existing port display infrastructure to
enable display of local interfaces.  There are a few differences:

- Do not display the chassis RID, as the local index is always 0
- Show TTL as a seperate TLV based on tx_hold, tx_interval config,
  as internally the port TTL atom info is 0, and the chassis TTL
  atom info has been depreciated.

6 years agoclient: fix typos in manual page (#239)
Steven Webster [Tue, 29 Aug 2017 14:12:05 +0000 (10:12 -0400)] 
client: fix typos in manual page (#239)

6 years agolldpd: add option to override default lldpcli config file locations (#238)
Thomas Tannhäuser [Sun, 27 Aug 2017 19:56:30 +0000 (21:56 +0200)] 
lldpd: add option to override default lldpcli config file locations (#238)

6 years agoosx: update Homebrew recipe
Vincent Bernat [Sun, 20 Aug 2017 18:37:24 +0000 (20:37 +0200)] 
osx: update Homebrew recipe

6 years agorelease: prepare 0.9.8 0.9.8
Vincent Bernat [Sun, 20 Aug 2017 18:25:57 +0000 (20:25 +0200)] 
release: prepare 0.9.8

6 years agoclient: fix JSON output when a special character is in string
Vincent Bernat [Tue, 15 Aug 2017 18:27:52 +0000 (20:27 +0200)] 
client: fix JSON output when a special character is in string

6 years agoclient: add "json0" to the list of available formats
Vincent Bernat [Tue, 15 Aug 2017 17:22:00 +0000 (19:22 +0200)] 
client: add "json0" to the list of available formats

This enables a more verbose JSON output whose structure is kept
the same with one or several neighbors. It's easier to parse than the
current structure.

Fix #236

6 years agotests: upgrade pyroute2 version
Vincent Bernat [Mon, 14 Aug 2017 12:37:05 +0000 (14:37 +0200)] 
tests: upgrade pyroute2 version

6 years agotests: replace depcreated pyroute2 functions
Vincent Bernat [Mon, 14 Aug 2017 11:42:50 +0000 (13:42 +0200)] 
tests: replace depcreated pyroute2 functions

6 years agotests: enable test for team device
Vincent Bernat [Mon, 14 Aug 2017 11:37:40 +0000 (13:37 +0200)] 
tests: enable test for team device

6 years agolldpcli: add "configure system hostname ." to use node name
Vincent Bernat [Sun, 13 Aug 2017 13:13:07 +0000 (15:13 +0200)] 
lldpcli: add "configure system hostname ." to use node name

This is a shortcut to "configure system hostname nodename". By default,
lldpd will use the FQDN (resolving the node name using the local
resolver). We let lldpcli interpret "." as a special request to override
this value with the node name (output of "uname -n").

Fix #154

6 years agoMerge pull request #235 from vincentbernat/feature/ethtool-no-root
Vincent Bernat [Sun, 13 Aug 2017 12:46:03 +0000 (14:46 +0200)] 
Merge pull request #235 from vincentbernat/feature/ethtool-no-root

priv: don't run ethtool as root

6 years agointerfaces: show a warning if we don't have permissions for ethtool ioctls feature/ethtool-no-root 235/head
Vincent Bernat [Sun, 13 Aug 2017 04:52:24 +0000 (06:52 +0200)] 
interfaces: show a warning if we don't have permissions for ethtool ioctls

6 years agointerfaces: fix compilation without Dot3 feature
Vincent Bernat [Sun, 13 Aug 2017 04:19:37 +0000 (06:19 +0200)] 
interfaces: fix compilation without Dot3 feature

6 years agointerfaces: don't retry GLINKSETTINGS probing if it failed
Vincent Bernat [Sat, 12 Aug 2017 21:22:23 +0000 (23:22 +0200)] 
interfaces: don't retry GLINKSETTINGS probing if it failed

6 years agopriv: don't run ethtool as root
Vincent Bernat [Sat, 12 Aug 2017 21:15:56 +0000 (23:15 +0200)] 
priv: don't run ethtool as root

Kernels older than 2.6.19 won't get any link information. Kernels 4.6,
4.7 and 4.8 won't get information from GLINKSETTINGS (higher speeds)
but they are not LTS kernels so we should be fine. This removes a
bunch of code.