]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
10 years agoclient: complain if the provided format is not supported
Vincent Bernat [Sat, 9 May 2015 10:50:10 +0000 (12:50 +0200)] 
client: complain if the provided format is not supported

10 years agoclient: fix a trivial typo
Vincent Bernat [Sun, 26 Apr 2015 15:32:58 +0000 (17:32 +0200)] 
client: fix a trivial typo

10 years agoMerge pull request #106 from commodo/make-some-tlvs-optional
Vincent Bernat [Fri, 24 Apr 2015 07:53:08 +0000 (09:53 +0200)] 
Merge pull request #106 from commodo/make-some-tlvs-optional

Make some TLVs optional

10 years agoclient: add some log_debug() messages 106/head
Alexandru Ardelean [Thu, 16 Apr 2015 05:58:12 +0000 (08:58 +0300)] 
client: add some log_debug() messages

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agotests/check_lldp: add global config object for testing
Alexandru Ardelean [Thu, 9 Apr 2015 12:15:55 +0000 (15:15 +0300)] 
tests/check_lldp: add global config object for testing

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolldpd: make management addresses advertisement optional
Alexandru Ardelean [Thu, 2 Apr 2015 10:03:02 +0000 (13:03 +0300)] 
lldpd: make management addresses advertisement optional

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolldpd: make chassis capabilities advertisement optional
Alexandru Ardelean [Thu, 2 Apr 2015 09:26:46 +0000 (12:26 +0300)] 
lldpd: make chassis capabilities advertisement optional

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agodaemon/lldpd.c: free() cfg at end of main function
Alexandru Ardelean [Thu, 2 Apr 2015 07:48:55 +0000 (10:48 +0300)] 
daemon/lldpd.c: free() cfg at end of main function

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agodaemon/protocols/lldp.c: do not send system capabilities if none available
Alexandru Ardelean [Thu, 2 Apr 2015 07:40:13 +0000 (10:40 +0300)] 
daemon/protocols/lldp.c: do not send system capabilities if none available

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolib: don't define __constructor__ twice
Vincent Bernat [Thu, 9 Apr 2015 08:31:45 +0000 (10:31 +0200)] 
lib: don't define __constructor__ twice

10 years agoMerge pull request #105 from commodo/cleanup
Vincent Bernat [Thu, 9 Apr 2015 08:30:59 +0000 (10:30 +0200)] 
Merge pull request #105 from commodo/cleanup

Some Cleanup & prep-work for further updates

10 years agorelease: prepare 0.7.14 0.7.14
Vincent Bernat [Sat, 4 Apr 2015 14:29:39 +0000 (16:29 +0200)] 
release: prepare 0.7.14

10 years agodaemon: move protocol files into subfolder 105/head
Alexandru Ardelean [Thu, 2 Apr 2015 13:20:26 +0000 (16:20 +0300)] 
daemon: move protocol files into subfolder

10 years agolib/atom.c: move here remaining code from atom-private.c
Alexandru Ardelean [Wed, 1 Apr 2015 09:14:04 +0000 (12:14 +0300)] 
lib/atom.c: move here remaining code from atom-private.c

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolib/private.h: rename to atom.h
Alexandru Ardelean [Wed, 1 Apr 2015 09:08:05 +0000 (12:08 +0300)] 
lib/private.h: rename to atom.h

Makes sense to have it named like this now.
Would have been a bit nicer to do it earlier, but now should be fine too.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolib/atom-private.c: break it into smaller modules
Alexandru Ardelean [Tue, 31 Mar 2015 10:40:52 +0000 (13:40 +0300)] 
lib/atom-private.c: break it into smaller modules

This is a huge commit, but 90%+ of it is just splitting
'lib/atom-private.c' into smaller atoms and putting them
into the 'lib/atoms' folder.

Some glue code has been added, for constructing maps and builders.

For the 'struct atom_builder' type a 'nextb' field has been
appended at the end, to help make it a single-linked list of
'struct atom_builders's.
The 'next' field in 'struct atom_builder' is taken (hence 'nextb').

For the maps, a wrapper struct (called 'struct atom_map')
has been added on top of 'lldpctl_map_t' in order to create
single-linked list construct of maps.
The struct looks like:
    struct atom_map {
        int key;             /* lldpctl_key_t equivalent */
        struct atom_map *next; /* next 'struct atom_map' */
        lldpctl_map_t map[]; /* has to be at the end to
                                to be statically init-ed */
    }
The point of this is to register them at load-time so
that 'lldpctl_key_get_map()' can return them.

Each file in 'lib/atoms' registers it's own 'struct atom_builder's
and 'struct atom_map's.

The whole point of this is to be able to add a 'custom' and/or
'custom_list' atom(s) to be able to configure/broadcast other TLVs
in the future.
This mechanism is extensible to add other TLVs defined by
future standards.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolib/atom-private.c: move 'struct atom-builder' to private.h
Alexandru Ardelean [Tue, 31 Mar 2015 09:25:06 +0000 (12:25 +0300)] 
lib/atom-private.c: move 'struct atom-builder' to private.h

Move this here, before splitting lib/atom-private.c.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agoconfigure.ac: add 'subdir-objects' option
Alexandru Ardelean [Wed, 1 Apr 2015 18:08:34 +0000 (21:08 +0300)] 
configure.ac: add 'subdir-objects' option

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agoNEWS: add an entry to NEWS file for previous changes
Vincent Bernat [Sun, 29 Mar 2015 16:45:09 +0000 (18:45 +0200)] 
NEWS: add an entry to NEWS file for previous changes

10 years agolib: update revision info to reflect ABI update of latest changes
Vincent Bernat [Sun, 29 Mar 2015 16:44:06 +0000 (18:44 +0200)] 
lib: update revision info to reflect ABI update of latest changes

10 years agolib: a change to port description is transmitted now
Vincent Bernat [Sun, 29 Mar 2015 16:42:14 +0000 (18:42 +0200)] 
lib: a change to port description is transmitted now

10 years agoclient: when receiving a port update, transmit it now
Vincent Bernat [Sun, 29 Mar 2015 16:41:25 +0000 (18:41 +0200)] 
client: when receiving a port update, transmit it now

10 years agolldpcli: use "description" keyword when setting port description
Vincent Bernat [Sun, 29 Mar 2015 16:38:58 +0000 (18:38 +0200)] 
lldpcli: use "description" keyword when setting port description

10 years agolldpcli: document ability to change port id and description
Vincent Bernat [Sun, 29 Mar 2015 16:37:08 +0000 (18:37 +0200)] 
lldpcli: document ability to change port id and description

10 years agolldpcli: ensure optional local port description cannot be repeated
Vincent Bernat [Sun, 29 Mar 2015 16:31:55 +0000 (18:31 +0200)] 
lldpcli: ensure optional local port description cannot be repeated

Also fix some descriptions (no capitalization).

10 years agoMerge pull request #101 from commodo/port_label2
Vincent Bernat [Sun, 29 Mar 2015 16:23:09 +0000 (18:23 +0200)] 
Merge pull request #101 from commodo/port_label2

lldpd: implement basic support to override port IDs via lldpcli

10 years agointerfaces: management address is set to pattern on exact match
Vincent Bernat [Sat, 28 Mar 2015 08:57:43 +0000 (09:57 +0100)] 
interfaces: management address is set to pattern on exact match

When the management pattern is an exact IP address, use it as is instead
of trying to match an interface. When a user doesn't want this
behavior (keeping the check), they should use something like
`192.168.1.15,0` or `!*,!!192.168.1.15` instead of the exact IP address.

This feature allows a user to advertise an out-of-band management IP
address.

Closes #103

10 years agolldpd: add port description override via lldpcli 101/head
Alexandru Ardelean [Tue, 24 Mar 2015 09:10:49 +0000 (11:10 +0200)] 
lldpd: add port description override via lldpcli

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agolldpd: implement basic support to override port IDs via lldpcli
Alexandru Ardelean [Tue, 24 Mar 2015 07:08:33 +0000 (09:08 +0200)] 
lldpd: implement basic support to override port IDs via lldpcli

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years ago.gitignore: ignore vim swap files
Alexandru Ardelean [Tue, 17 Mar 2015 11:57:05 +0000 (13:57 +0200)] 
.gitignore: ignore vim swap files

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agostyle: remove `if (...) free(...)` pattern
Vincent Bernat [Mon, 23 Mar 2015 20:35:03 +0000 (21:35 +0100)] 
style: remove `if (...) free(...)` pattern

Using the following Coccinelle patch:

    @@
    expression ptr;
    @@

    - if (ptr) {
    -   free(ptr);
    - }
    + free(ptr);

    @@
    expression ptr;
    @@

    - if (ptr) free(ptr);
    + free(ptr);

    @@
    expression ptr;
    @@

    - if (ptr != NULL) {
    -   free(ptr);
    - }
    + free(ptr);

    @@
    expression ptr;
    @@

    - if (ptr != NULL) free(ptr);
    + free(ptr);

10 years agointerfaces: don't test for NULL before `free`
Vincent Bernat [Mon, 23 Mar 2015 19:56:13 +0000 (20:56 +0100)] 
interfaces: don't test for NULL before `free`

This is unneeded.

10 years agopriv: document improvement in crash handling in NEWS file
Vincent Bernat [Wed, 18 Mar 2015 16:10:12 +0000 (17:10 +0100)] 
priv: document improvement in crash handling in NEWS file

10 years agoRevert "priv: on Linux, when monitor dies, kill child"
Vincent Bernat [Wed, 18 Mar 2015 14:42:24 +0000 (15:42 +0100)] 
Revert "priv: on Linux, when monitor dies, kill child"

This reverts commit 4747e964096a1b490de062460608805c46f0cfd2. This
commit is now useless due to the previous (more portable) commits. It is
harmless but also unneeded.

10 years agopriv: use SOCK_STREAM for monitor communication
Vincent Bernat [Wed, 18 Mar 2015 14:35:10 +0000 (15:35 +0100)] 
priv: use SOCK_STREAM for monitor communication

SOCK_SEQPACKET is better but not available everywhere. We can't just
fallback to SOCK_DGRAM since we lose the ability to detect when the
monitor dies. So, we use SOCK_STREAM (now possible with commit
004b5f944539). The code (stolen from OpenBSD) was already ready for
that.

10 years agopriv: don't log anything when handling SIGCHLD
Vincent Bernat [Wed, 18 Mar 2015 14:33:17 +0000 (15:33 +0100)] 
priv: don't log anything when handling SIGCHLD

Logging is not signal-safe. Notably, we use date-functions which are
using locks.

10 years agopriv: ensure we write exactly what will be read
Vincent Bernat [Wed, 18 Mar 2015 14:25:36 +0000 (15:25 +0100)] 
priv: ensure we write exactly what will be read

When using SOCK_DGRAM/SOCK_SEQPACKET, it doesn't matter to write a bit
more since it is truncated. However, if we want to switch to
SOCK_STREAM, we must exactly write the right amount of bytes.

10 years agoctl: create control socket with close-on-exec semantic
Vincent Bernat [Wed, 18 Mar 2015 14:14:41 +0000 (15:14 +0100)] 
ctl: create control socket with close-on-exec semantic

Otherwise, when we spawn lldpcli, it inherits the file descriptor and
doesn't detect if the daemon dies just after because it is listening
itself to the Unix socket.

10 years agopriv: fallback to SOCK_DGRAM if SOCK_SEQPACKET not available
Vincent Bernat [Wed, 18 Mar 2015 13:34:54 +0000 (14:34 +0100)] 
priv: fallback to SOCK_DGRAM if SOCK_SEQPACKET not available

10 years agopriv: use a SOCK_SEQPACKET for communication with monitor
Vincent Bernat [Wed, 18 Mar 2015 13:21:46 +0000 (14:21 +0100)] 
priv: use a SOCK_SEQPACKET for communication with monitor

This has the same semantics than SOCK_DGRAM but it also supports the
ability to notify the other end of end-of-file events. However, it may
not be widely implemented, hence the separate commit.

10 years agopriv: monitor the monitor process
Vincent Bernat [Wed, 18 Mar 2015 13:20:26 +0000 (14:20 +0100)] 
priv: monitor the monitor process

By monitoring the socket connection with the monitor process, we ensure
that we kill ourselves if the monitor disappears and fails to notice us.

This doesn't work yet because there is no "end of file" event for a
SOCK_DGRAM. See the next commit.

10 years agolog: add token to all `fatalx` instances
Vincent Bernat [Wed, 18 Mar 2015 13:12:58 +0000 (14:12 +0100)] 
log: add token to all `fatalx` instances

The inability to use a token is quite artificial.

10 years agopriv: on Linux, when monitor dies, kill child
Vincent Bernat [Wed, 18 Mar 2015 09:00:44 +0000 (10:00 +0100)] 
priv: on Linux, when monitor dies, kill child

When the monitor dies, it sends its child a TERM signal but if it
segfaults or is killed with an uncatchable signal, the child will
continue to run "unharmed". On Linux, it is possible to send a signal to
the child in this case, with `prctl()`. Do that.

10 years agoevent: don't remember (in cfg) control socket event
Vincent Bernat [Wed, 18 Mar 2015 07:35:53 +0000 (08:35 +0100)] 
event: don't remember (in cfg) control socket event

We don't need it outside of event loop initialization.

10 years agoevent: don't ignore SIGHUP twice
Vincent Bernat [Wed, 18 Mar 2015 07:31:00 +0000 (08:31 +0100)] 
event: don't ignore SIGHUP twice

10 years agobuild: don't use `sort -V`
Vincent Bernat [Thu, 19 Feb 2015 21:52:13 +0000 (22:52 +0100)] 
build: don't use `sort -V`

Not portable enough. Use `sort -k ... -k ...` instead.

10 years agocheck: add missing license headers to some files
Vincent Bernat [Thu, 19 Feb 2015 19:19:42 +0000 (20:19 +0100)] 
check: add missing license headers to some files

10 years agocheck: fix SNMP test format error
Vincent Bernat [Thu, 19 Feb 2015 19:17:44 +0000 (20:17 +0100)] 
check: fix SNMP test format error

10 years agocheck: more comparison with `ck_assert_ptr_eq()`
Vincent Bernat [Thu, 19 Feb 2015 18:59:53 +0000 (19:59 +0100)] 
check: more comparison with `ck_assert_ptr_eq()`

10 years agocheck: compare pointers with `ck_assert_ptr_eq()`
Vincent Bernat [Thu, 19 Feb 2015 18:35:57 +0000 (19:35 +0100)] 
check: compare pointers with `ck_assert_ptr_eq()`

10 years agocheck: enforce correct alignment during SNMP tests
Vincent Bernat [Thu, 19 Feb 2015 16:28:00 +0000 (17:28 +0100)] 
check: enforce correct alignment during SNMP tests

This should fix the following clang error, despite the fact that we know
that the alignment was correct:

```
check_snmp.c:900:9: fatal error: cast from 'u_char *' (aka 'unsigned char *') to
      'unsigned long *' increases required alignment from 1 to 8 [-Wcast-align]
                            *(unsigned long int *)result,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/check.h:220:22: note: expanded from macro 'fail_unless'
        _fail_unless(expr, __FILE__, __LINE__,\
                     ^
1 error generated.
```

10 years agotravis: don't configure with CFLAGS=-Werror
Vincent Bernat [Thu, 19 Feb 2015 16:05:18 +0000 (17:05 +0100)] 
travis: don't configure with CFLAGS=-Werror

This is unsupported. Instead, call `make CFLAGS=-Werror`.

10 years agoconfigure: move LDFLAGS to LLDP_LDFLAGS
Vincent Bernat [Thu, 19 Feb 2015 16:01:35 +0000 (17:01 +0100)] 
configure: move LDFLAGS to LLDP_LDFLAGS

10 years agoconfigure: move CFLAGS/CPPFLAGS to LLDP_CFLAGS/LLDP_CPPFLAGS
Vincent Bernat [Thu, 19 Feb 2015 15:52:55 +0000 (16:52 +0100)] 
configure: move CFLAGS/CPPFLAGS to LLDP_CFLAGS/LLDP_CPPFLAGS

The goal is to avoid the user to override those flags when using `make
CFLAGS=somethingelse`. This is to enable a user to use `make
CFLAGS=-Werror` since this flag cannot be used with `./configure`.

10 years agoconfigure: put cpp flags into CPPFLAGS instead of CFLAGS
Vincent Bernat [Thu, 19 Feb 2015 15:47:06 +0000 (16:47 +0100)] 
configure: put cpp flags into CPPFLAGS instead of CFLAGS

10 years agoconfigure: enforce the use of C99
Vincent Bernat [Thu, 19 Feb 2015 15:30:06 +0000 (16:30 +0100)] 
configure: enforce the use of C99

10 years agoMerge pull request #98 from baloo/features/document-lldp.d
Vincent Bernat [Wed, 18 Feb 2015 14:06:07 +0000 (15:06 +0100)] 
Merge pull request #98 from baloo/features/document-lldp.d

client: document lldp.d configuration directory

10 years agoclient: document lldp.d configuration directory 98/head
Arthur Gautier [Wed, 18 Feb 2015 14:03:20 +0000 (15:03 +0100)] 
client: document lldp.d configuration directory

Signed-off-by: Arthur Gautier <baloo@gandi.net>
10 years agointerfaces: fallback to link local addresses for management
Vincent Bernat [Fri, 13 Feb 2015 18:58:32 +0000 (19:58 +0100)] 
interfaces: fallback to link local addresses for management

When no global address is found for a family, we fallback to a link
local address instead. For IPv4, this is 169.254.0.0/16 and for IPv6,
this is fe80::/64.

Closes #96.

10 years agointerfaces: exclude IPv4 link local addresses from management addresses
Vincent Bernat [Fri, 13 Feb 2015 17:06:49 +0000 (18:06 +0100)] 
interfaces: exclude IPv4 link local addresses from management addresses

Link-local IPv4 addresses (169.254.0.0/16) are not an acceptable
management address. Closes #96.

10 years agointerfaces: enforce redefinition of IN_IS_ADDR_* macros
Vincent Bernat [Fri, 13 Feb 2015 17:02:16 +0000 (18:02 +0100)] 
interfaces: enforce redefinition of IN_IS_ADDR_* macros

For IPv4, some definitions may differ from one OS to another. Better
safe than sorry: use the same definition for everyone.

10 years agopriv: don't lookup for _lldpd when privsep is disabled
Vincent Bernat [Thu, 12 Feb 2015 07:07:43 +0000 (08:07 +0100)] 
priv: don't lookup for _lldpd when privsep is disabled

Closes #95

10 years agolib: fix "unknwon" typo
Vincent Bernat [Fri, 6 Feb 2015 18:16:48 +0000 (19:16 +0100)] 
lib: fix "unknwon" typo

10 years agolib: fix compilation error when Dot3 is disabled
Vincent Bernat [Fri, 6 Feb 2015 18:12:16 +0000 (19:12 +0100)] 
lib: fix compilation error when Dot3 is disabled

Some power maps are shared between Dot3 and LLDP-MED. Closes #94.

10 years agopriv: replace the use of `gethostbyname()` by `getaddrinfo()`
Vincent Bernat [Wed, 28 Jan 2015 13:55:31 +0000 (14:55 +0100)] 
priv: replace the use of `gethostbyname()` by `getaddrinfo()`

`gethostbyname()` was uses to get the canonical name. `getaddrinfo()`
should work even if there is no IPv4 at all in the system.

10 years agopriv: rename "gethostbyname" priv function to "gethostname"
Vincent Bernat [Wed, 28 Jan 2015 13:50:12 +0000 (14:50 +0100)] 
priv: rename "gethostbyname" priv function to "gethostname"

Because, it is not a wrapper around `gethostbyname()` but a way to get
local hostname. It currently uses `gethostbyname()` and therefore relies
on the presence of an IPv4 address in the system.

10 years agobuild: use version sort for changelog
Vincent Bernat [Sun, 25 Jan 2015 21:19:07 +0000 (22:19 +0100)] 
build: use version sort for changelog

10 years agoNEWS: add an entry for the two previous commits
Vincent Bernat [Sat, 17 Jan 2015 15:04:18 +0000 (16:04 +0100)] 
NEWS: add an entry for the two previous commits

10 years agolldp: fix boundary checks when decoding LLDP protocol identity
Vincent Bernat [Sat, 17 Jan 2015 14:49:52 +0000 (15:49 +0100)] 
lldp: fix boundary checks when decoding LLDP protocol identity

10 years agolldp: fix boundary checks when decoding LLDP management address
Vincent Bernat [Sat, 17 Jan 2015 14:49:21 +0000 (15:49 +0100)] 
lldp: fix boundary checks when decoding LLDP management address

10 years agolldpcli: add "tagged" keyword to "configure med policy"
Vincent Bernat [Mon, 12 Jan 2015 19:31:47 +0000 (20:31 +0100)] 
lldpcli: add "tagged" keyword to "configure med policy"

This allows a user to set the tagged flag for a network policy for a
given application.

Fix: #88

10 years agotravis: use stable NetSNMP from Homebrew
Vincent Bernat [Mon, 5 Jan 2015 16:55:26 +0000 (17:55 +0100)] 
travis: use stable NetSNMP from Homebrew

The devel version is not here anymore and the stable one has been
upgraded to 5.7.3.

10 years agolibevent: enable silent rules by default
Vincent Bernat [Mon, 5 Jan 2015 16:01:25 +0000 (17:01 +0100)] 
libevent: enable silent rules by default

10 years agolibevent: update embedded copy to 2.0.22-stable
Vincent Bernat [Mon, 5 Jan 2015 15:57:27 +0000 (16:57 +0100)] 
libevent: update embedded copy to 2.0.22-stable

10 years agoNEWS: add an entry for the two previous commits
Vincent Bernat [Sun, 4 Jan 2015 17:25:25 +0000 (18:25 +0100)] 
NEWS: add an entry for the two previous commits

10 years agolldp: send a shutdown LLDPDU on exit
Vincent Bernat [Sun, 4 Jan 2015 17:24:29 +0000 (18:24 +0100)] 
lldp: send a shutdown LLDPDU on exit

With the previous commit, it is now easy to send a shutdown LLPDU when
exiting lldpd. Let's do that.

10 years agolldp: when MSAP changes, send a shutdown LLPDU
Vincent Bernat [Sun, 4 Jan 2015 17:13:23 +0000 (18:13 +0100)] 
lldp: when MSAP changes, send a shutdown LLPDU

Chassis ID and port ID are not supposed to change. However, it is
possible for the port ID to change (for example, if the port name
changes or if the MAC addresses change). Since they should be constant,
we "fix" that by sending a shutdown LLPDU before any broadcasting any
change.

As a provision, this also applies to chassis ID even if it is currently
not possible for it to be changed.

10 years agomarshal: don't marshal previous port value
Vincent Bernat [Sat, 3 Jan 2015 16:31:59 +0000 (17:31 +0100)] 
marshal: don't marshal previous port value

It is only used by the daemon.

10 years agotravis: don't compile embedded libevent + clang on OSX
Vincent Bernat [Tue, 30 Dec 2014 18:37:33 +0000 (19:37 +0100)] 
travis: don't compile embedded libevent + clang on OSX

We already try with Linux, that should be enough.

10 years agotravis: don't fail on unused functions (second try)
Vincent Bernat [Tue, 30 Dec 2014 16:19:33 +0000 (17:19 +0100)] 
travis: don't fail on unused functions (second try)

10 years agotravis: don't fail on unused functions
Vincent Bernat [Tue, 30 Dec 2014 14:59:35 +0000 (15:59 +0100)] 
travis: don't fail on unused functions

There are some of them in embedded libevent.

10 years agotravis: don't allow any warning or error
Vincent Bernat [Tue, 30 Dec 2014 13:34:17 +0000 (14:34 +0100)] 
travis: don't allow any warning or error

10 years agoversion: prepare 0.7.13 release 0.7.13
Vincent Bernat [Tue, 30 Dec 2014 13:11:49 +0000 (14:11 +0100)] 
version: prepare 0.7.13 release

10 years agoconfigure: let define pkg-config directory with `--with-pkgconfigdir`
Vincent Bernat [Mon, 29 Dec 2014 21:42:56 +0000 (22:42 +0100)] 
configure: let define pkg-config directory with `--with-pkgconfigdir`

This needs a recent version of pkg.m4. However, we provide a fallback if
not present.

Closes: #87
10 years agoman: `-I` option and the like also affect sending
Vincent Bernat [Mon, 15 Dec 2014 07:54:25 +0000 (08:54 +0100)] 
man: `-I` option and the like also affect sending

Instead of using `listen` to describe the `-I` option, specify that it
also used to decide which interfaces LLDP will be enabled on, both for
listening and sending.

10 years agolldp: fix display of unknown organizational ID
Vincent Bernat [Wed, 10 Dec 2014 16:09:30 +0000 (17:09 +0100)] 
lldp: fix display of unknown organizational ID

Because it was stored in a signed char array, it was incorrectly
displayed with the "%x" formatter. Store it into an unsigned char array.

10 years agolldpd: don't rely on a checksum to detect a port change
Vincent Bernat [Sat, 6 Dec 2014 23:05:53 +0000 (00:05 +0100)] 
lldpd: don't rely on a checksum to detect a port change

Instead, just compare the serialized copies. This is more reliable than
a checksum and also (a bit) faster.

10 years agolldpd: use a macro to define offset of permanent port info
Vincent Bernat [Sat, 6 Dec 2014 22:48:47 +0000 (23:48 +0100)] 
lldpd: use a macro to define offset of permanent port info

10 years agoNEWS: add an entry for the latest commit
Vincent Bernat [Fri, 5 Dec 2014 06:59:49 +0000 (07:59 +0100)] 
NEWS: add an entry for the latest commit

10 years agolldpd: fix coding style in latest commit
Vincent Bernat [Thu, 4 Dec 2014 22:15:46 +0000 (23:15 +0100)] 
lldpd: fix coding style in latest commit

10 years agoMerge pull request #84 from IcyMetric/master
Vincent Bernat [Thu, 4 Dec 2014 22:13:39 +0000 (23:13 +0100)] 
Merge pull request #84 from IcyMetric/master

Allow setting control socket on CLI

10 years agoAllow setting control socket on CLI 84/head
Robert Long [Thu, 4 Dec 2014 21:35:15 +0000 (13:35 -0800)] 
Allow setting control socket on CLI

10 years agolldpd: decrease probability of collisions on port checksums
Vincent Bernat [Thu, 4 Dec 2014 00:02:29 +0000 (01:02 +0100)] 
lldpd: decrease probability of collisions on port checksums

Instead of a 16-bit checksum, we use two 16-bit checkums, one for each
half of the serialized port. We now need more than 70000 ports to get a
50% chance of collision while we previously needed only 300 ports.

10 years agolldpd: decrease probability of collisions on port checksums
Vincent Bernat [Wed, 3 Dec 2014 23:56:51 +0000 (00:56 +0100)] 
lldpd: decrease probability of collisions on port checksums

Instead of wasting a whole bit (getting 2**15 valid values), just waste
one special value (2**16-1 valid values).

10 years agolldpd: really ensure that port checksum can never be 0
Vincent Bernat [Wed, 3 Dec 2014 21:28:03 +0000 (22:28 +0100)] 
lldpd: really ensure that port checksum can never be 0

10 years agolldpd: fix timer initialization when checksum is 0
Vincent Bernat [Wed, 3 Dec 2014 21:05:34 +0000 (22:05 +0100)] 
lldpd: fix timer initialization when checksum is 0

If the checksum computed over the port happens to be 0, the LLDPDU is
never scheduled for emission on this port. We ensure that a computed
checksum is never 0. If two different ports happen to have the same
checksum, we consider it unlikely enough to bear with the fact that the
timer will not be reset in this case.

10 years agomarshal: ensure we correctly handle signed result from serialization
Vincent Bernat [Wed, 3 Dec 2014 20:55:31 +0000 (21:55 +0100)] 
marshal: ensure we correctly handle signed result from serialization

We must handle correctly `ssize_t`. Try to not cast this to another
type, let alone a non signed type.

10 years agoxml: check that libxml-2 is really usable
Vincent Bernat [Mon, 1 Dec 2014 23:27:03 +0000 (00:27 +0100)] 
xml: check that libxml-2 is really usable

10 years agosnmp: `agent_init()` won't modify AgentX string
Vincent Bernat [Mon, 1 Dec 2014 22:34:44 +0000 (23:34 +0100)] 
snmp: `agent_init()` won't modify AgentX string

This fixes another compiler warning.

10 years agolib: silent a warning about uninitialized value
Vincent Bernat [Mon, 1 Dec 2014 22:32:40 +0000 (23:32 +0100)] 
lib: silent a warning about uninitialized value

This is a false positive as the value was guarded by another
value. Nevertheless, let's please the compiler.