]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
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.

6 years agointerfaces: use ethtool to get permanent MAC for bonds/teams
Vincent Bernat [Sat, 12 Aug 2017 19:30:17 +0000 (21:30 +0200)] 
interfaces: use ethtool to get permanent MAC for bonds/teams

As this doesn't work for all devices (like dummy and veth), we still
fallback to old code using /proc/net/bonding for bonds. No fallback
available for team devices.

6 years agointerfaces: enable team interfaces like a bond interface
Vincent Bernat [Sat, 12 Aug 2017 18:09:22 +0000 (20:09 +0200)] 
interfaces: enable team interfaces like a bond interface

Unfortunately, we are not able to retrieve the real MAC address as the
kernel doesn't know it. Only the teamd daemon knows it. We could ask for
it through ethtool but it would be the permenant MAC address which may
be incorrect.

Fix #234

6 years agodaemon: enable recent systemd directive by default
Vincent Bernat [Thu, 13 Jul 2017 06:51:13 +0000 (08:51 +0200)] 
daemon: enable recent systemd directive by default

This will generate a warning for some users, but that should be
sustainable.

6 years agodaemon: don't try to restrict address families
Vincent Bernat [Thu, 13 Jul 2017 06:50:15 +0000 (08:50 +0200)] 
daemon: don't try to restrict address families

lldpd needs access to the most invasive address family. It's pointless
to restrict something like that.

6 years agodaemon: systemd unit cannot use ProtectSystem=strict
Vincent Bernat [Thu, 13 Jul 2017 06:47:57 +0000 (08:47 +0200)] 
daemon: systemd unit cannot use ProtectSystem=strict

lldpd needs to create its socket in `/run`. It's put outside the chroot
on purpose but it's not on a directory on its own.

6 years agodoc: add a NEWS entry for the last change
Vincent Bernat [Tue, 11 Jul 2017 17:17:53 +0000 (19:17 +0200)] 
doc: add a NEWS entry for the last change

6 years agolldp: clear station bit if any other capability is enabled
Steven Webster [Tue, 20 Jun 2017 20:04:38 +0000 (16:04 -0400)] 
lldp: clear station bit if any other capability is enabled

The 801.1AB spec states that the station only capability should
not be set in conjunction with any other (capability) bits.

It is possible for the lldpd interface update routine to set the
station bit, while the lldpd chassis update routine may, at a later
time, set the router capability bit. In this case the station bit
is not cleared.

This commit clears the station bit if any other capability is set.

6 years agoclient: install ZSH completions in $(datadir)/zsh/site-functions
Vincent Bernat [Sat, 24 Jun 2017 13:36:04 +0000 (15:36 +0200)] 
client: install ZSH completions in $(datadir)/zsh/site-functions

Instead of Debian-specific location.

Fix #232.

6 years agointerface-linux: fix this statement may fall through [-Wimplicit-fallthrough=] with...
Alexis La Goutte [Fri, 19 May 2017 15:32:27 +0000 (17:32 +0200)] 
interface-linux: fix this statement may fall through [-Wimplicit-fallthrough=] with gcc7

6 years agointerface: fix this statement may fall through [-Wimplicit-fallthrough=] with gcc7
Alexis La Goutte [Fri, 19 May 2017 15:32:06 +0000 (17:32 +0200)] 
interface: fix this statement may fall through [-Wimplicit-fallthrough=] with gcc7

6 years agoprivsep_io: fix this statement may fall through [-Wimplicit-fallthrough=] with gcc7
Alexis La Goutte [Fri, 19 May 2017 15:26:42 +0000 (17:26 +0200)] 
privsep_io: fix this statement may fall through [-Wimplicit-fallthrough=] with gcc7

6 years agodoc: update link to Homebrew
Vincent Bernat [Mon, 8 May 2017 13:24:03 +0000 (15:24 +0200)] 
doc: update link to Homebrew

7 years agobuild: fix get-version script when no git and no dist version
Vincent Bernat [Wed, 5 Apr 2017 15:59:07 +0000 (17:59 +0200)] 
build: fix get-version script when no git and no dist version

7 years agoosx: update Homebrew recipe
Vincent Bernat [Sun, 19 Mar 2017 14:34:41 +0000 (15:34 +0100)] 
osx: update Homebrew recipe

7 years agorelease: prepare 0.9.7 0.9.7
Vincent Bernat [Sun, 19 Mar 2017 14:23:04 +0000 (15:23 +0100)] 
release: prepare 0.9.7

7 years agoci: don't install jansson
Vincent Bernat [Sun, 19 Mar 2017 14:20:13 +0000 (15:20 +0100)] 
ci: don't install jansson

7 years agodoc: document previous commit in NEWS
Vincent Bernat [Fri, 17 Mar 2017 14:27:04 +0000 (15:27 +0100)] 
doc: document previous commit in NEWS

7 years agoIncrease number of lldp neighbors to 32.
Sander Vermin [Fri, 17 Mar 2017 09:03:37 +0000 (10:03 +0100)] 
Increase number of lldp neighbors to 32.

7 years agoredhat: ensure /etc/sysconfig/lldpd is correctly populated
Vincent Bernat [Tue, 7 Mar 2017 10:19:08 +0000 (11:19 +0100)] 
redhat: ensure /etc/sysconfig/lldpd is correctly populated

Patch courtesy of Martin Hauke. See: https://build.opensuse.org/request/show/477422

7 years agodaemon: don't log when going to background
Vincent Bernat [Mon, 20 Feb 2017 14:14:37 +0000 (15:14 +0100)] 
daemon: don't log when going to background

Most daemons do not log such information.

7 years agointerfaces: vxlan interfaces should be ignored
Vincent Bernat [Mon, 20 Feb 2017 14:09:16 +0000 (15:09 +0100)] 
interfaces: vxlan interfaces should be ignored

7 years agointerfaces: include <errno.h> to use errno
Vincent Bernat [Sun, 19 Feb 2017 13:40:24 +0000 (14:40 +0100)] 
interfaces: include <errno.h> to use errno

This fix previous commit. See:
 https://travis-ci.org/vincentbernat/lldpd/jobs/203148213

7 years agointerfaces: don't log an hard error when interface is down
Vincent Bernat [Sun, 19 Feb 2017 13:03:18 +0000 (14:03 +0100)] 
interfaces: don't log an hard error when interface is down

When an interface transitions to the down state, we may be woken up. We
don't want to pollute the logs with errors in this case.

7 years agolldp: don't use chassis TTL anymore
Vincent Bernat [Tue, 14 Feb 2017 15:50:54 +0000 (16:50 +0100)] 
lldp: don't use chassis TTL anymore

Move it to global configuration instead. This is less confusing than
having it at two different places.

7 years agolldp: attach remote TTL to port instead of chassis
Vincent Bernat [Mon, 13 Feb 2017 08:15:13 +0000 (09:15 +0100)] 
lldp: attach remote TTL to port instead of chassis

When receiving a 0 TTL, we should trigger expiry of the remote port, not
the remote chassis. Therefore, TTL is moved to port, except for the
local chassis (we need it even when we don't have a port). So, for
remote ports, TTL is on the port. For local ports, it is on the
chassis. This fixes two cases:

 - a shutdown LLDPU should only expire one local port
 - when a port is refreshed, another port of the same chassis shouldn't
   be refreshed

7 years agolldpd: correctly increase discarded count
Vincent Bernat [Sat, 18 Feb 2017 19:11:47 +0000 (20:11 +0100)] 
lldpd: correctly increase discarded count

When a frame cannot be decoded but has been guessed, increase the
discarded count.

Fix #223.

7 years agotravis: don't install libevent and net-snmp on OSX fix/osx-ci
Vincent Bernat [Wed, 15 Feb 2017 07:12:18 +0000 (08:12 +0100)] 
travis: don't install libevent and net-snmp on OSX

They seem to be already present in Travis environment.

7 years agoclient: built-in JSON support
Vincent Bernat [Mon, 23 Jan 2017 16:28:33 +0000 (17:28 +0100)] 
client: built-in JSON support

Instead of relying on two different libs to serialize JSON, we provide
our own built-in serializer. This reduces the amount of build-related
code (detection of the correct library), as well as the amount of C code
with the exception of UTF-8 handling which was stolen from CCAN.

This will also make the life of some users easier.

The JSON format stays the same: quite verbose with --enable-json0
flag. And inconsistent without it.

Fix #188.
Fix #220.

7 years agoosx: update Homebrew recipe
Vincent Bernat [Sat, 21 Jan 2017 18:41:17 +0000 (19:41 +0100)] 
osx: update Homebrew recipe

7 years agodoc: keyword harmonization for NEWS file
Vincent Bernat [Sat, 21 Jan 2017 18:40:03 +0000 (19:40 +0100)] 
doc: keyword harmonization for NEWS file

7 years agodaemon: when daemonizing, close stdout/stderr
Vincent Bernat [Sat, 21 Jan 2017 12:48:09 +0000 (13:48 +0100)] 
daemon: when daemonizing, close stdout/stderr

Otherwise, when used with systemd/upstart, we write logs in two
different places.

7 years agorelease: prepare 0.9.6 0.9.6
Vincent Bernat [Sat, 21 Jan 2017 12:01:32 +0000 (13:01 +0100)] 
release: prepare 0.9.6

7 years agoredhat: add support for JSON in CentOS >= 6
Vincent Bernat [Sat, 21 Jan 2017 11:59:09 +0000 (12:59 +0100)] 
redhat: add support for JSON in CentOS >= 6

This seems supported in RHEL now, but doesn't work on OSC:
 https://rhn.redhat.com/errata/RHEA-2014-1530.html

Fix #220

7 years agonetlink: clear IFF_SLAVE when no information on upper interface
Vincent Bernat [Sat, 21 Jan 2017 11:40:51 +0000 (12:40 +0100)] 
netlink: clear IFF_SLAVE when no information on upper interface

This means that we have just been enslaved, but don't know the
master. On Linux, enslaved device are handled differently of regular
device. When we are half-enslaved (no upper interface yet), we are still
a regular interface. When we are fully enslaved, we may do nothing
because there is no local change (since flags are the same). Therefore,
clear the flag to avoid this issue.

7 years agoMerge pull request #218 from vincentbernat/feature/netlink-autoadapt
Vincent Bernat [Sat, 21 Jan 2017 11:34:36 +0000 (12:34 +0100)] 
Merge pull request #218 from vincentbernat/feature/netlink-autoadapt

Auto-adapt Netlink socket size

7 years agoMerge pull request #216 from vincentbernat/fix/epollerrr
Vincent Bernat [Sat, 21 Jan 2017 11:32:30 +0000 (12:32 +0100)] 
Merge pull request #216 from vincentbernat/fix/epollerrr

interfaces: on Linux, clear socket error queue on error

7 years agoclient: fix typo in manual page
Vincent Bernat [Fri, 20 Jan 2017 06:55:49 +0000 (07:55 +0100)] 
client: fix typo in manual page

7 years agoMerge pull request #219 from alagoutte/fix
Vincent Bernat [Mon, 16 Jan 2017 07:23:28 +0000 (08:23 +0100)] 
Merge pull request #219 from alagoutte/fix

Fix Expression '!iface' is always true