]>
git.ipfire.org Git - thirdparty/lldpd.git/log
Vincent Bernat [Sun, 15 Jun 2014 08:07:30 +0000 (10:07 +0200)]
lldpd: fix how LLDP can be disabled
Commit
46baf62775eaca47075e1d9966a2103fd466e4b3 broke the ability to
disable LLDP. Instead of trying to be smart, just enumerate all the
possible cases.
Vincent Bernat [Sun, 15 Jun 2014 07:47:03 +0000 (09:47 +0200)]
cdp: don't expect and off-by-one checksum
udbxtd2008 [Sun, 15 Jun 2014 07:05:06 +0000 (15:05 +0800)]
frame: fix CDP checksum
The checksum of CDP frame is calculated off-by-one error when the length
of frame is odd, and the highest bit of the last octet is 1, which is as
a known question mentioned in wireshark.
Vincent Bernat [Fri, 30 May 2014 13:26:03 +0000 (15:26 +0200)]
README: document the new promisc interface in README as well
Vincent Bernat [Fri, 30 May 2014 13:25:06 +0000 (15:25 +0200)]
lldpcli: give more details in the manual page about promiscuous mode
Vincent Bernat [Fri, 30 May 2014 13:21:34 +0000 (15:21 +0200)]
lldpcli: add an option to enable promisc mode on managed interfaces
This allows LLDP frames to be received even when they are not in a
configured VLAN, like this may be the case with Cisco 2960.
Vincent Bernat [Fri, 30 May 2014 13:04:36 +0000 (15:04 +0200)]
priv: don't output rc status twice when unable to open socket
Vincent Bernat [Fri, 30 May 2014 10:07:39 +0000 (12:07 +0200)]
README: more about Cisco sending LLDP frames on VLAN 1
Vincent Bernat [Wed, 28 May 2014 10:47:22 +0000 (12:47 +0200)]
osx: update version to 0.7.9
Vincent Bernat [Wed, 28 May 2014 10:08:51 +0000 (12:08 +0200)]
debian: sync a bit with official packaging
Vincent Bernat [Wed, 28 May 2014 10:06:32 +0000 (12:06 +0200)]
version: prepare a new release
Vincent Bernat [Wed, 21 May 2014 16:40:02 +0000 (18:40 +0200)]
lldpd: trigger regular interface refresh when changing port ID
We don't want to call OS-specific methods. Let's just trigger a regular
interface refresh instead.
Vincent Bernat [Wed, 21 May 2014 15:31:34 +0000 (17:31 +0200)]
lldpcli: document `configure lldp portidsubtype` command
Vincent Bernat [Wed, 21 May 2014 15:22:54 +0000 (17:22 +0200)]
NEWS: mention ability to configure port ID
Vincent Bernat [Wed, 21 May 2014 15:21:40 +0000 (17:21 +0200)]
lldpcli: fix a format warning
Vincent Bernat [Wed, 21 May 2014 15:21:03 +0000 (17:21 +0200)]
lldpcli: remove unused variable
Sam Tannous [Wed, 21 May 2014 14:11:24 +0000 (10:11 -0400)]
Support for modifying PortID TLV
This patch adds the ability to change the behavior of what
lldpd sends in the PortID TLV.
By default, lldpd sets the MAC address in the PortID and the ifname
in the PortDescr field. This patch allows the user to
configure lldpd via the CLI (lldpcli or /etc/lldpd.conf)
to send either the interface name
(ifname) or the MAC address in the PortID TLV.
Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
Vincent Bernat [Fri, 16 May 2014 18:45:24 +0000 (20:45 +0200)]
README: point to the website for install instructions
Vincent Bernat [Fri, 16 May 2014 18:41:48 +0000 (20:41 +0200)]
README: update the intro to better match the reality
The inability to handle complex setup has been greatly diminished in 0.7
branch.
Vincent Bernat [Fri, 16 May 2014 09:06:04 +0000 (11:06 +0200)]
travis: don't use regular options when on coverity branch
Vincent Bernat [Fri, 16 May 2014 08:47:14 +0000 (10:47 +0200)]
travis: don't do anything if not on the coverity branch
Vincent Bernat [Fri, 16 May 2014 08:40:11 +0000 (10:40 +0200)]
travis: reduce matrix by not compiling everything with clang
Only compile with all options when using clang.
Vincent Bernat [Fri, 16 May 2014 08:34:16 +0000 (10:34 +0200)]
travis: integrate coverity script in regular run.sh
Vincent Bernat [Fri, 16 May 2014 07:54:05 +0000 (09:54 +0200)]
travis: when running coverity, skip regular build
Vincent Bernat [Fri, 16 May 2014 00:03:46 +0000 (02:03 +0200)]
travis: don't try to install launchd/systemd stuff
This won't work as they are not installed inside prefix.
Vincent Bernat [Thu, 15 May 2014 23:52:52 +0000 (01:52 +0200)]
travis: no need for `make install`
We already do a `make distcheck` for that purpose.
Vincent Bernat [Thu, 15 May 2014 23:43:13 +0000 (01:43 +0200)]
bsd: ensure we also have space for the padding after BPF header
Vincent Bernat [Thu, 15 May 2014 23:39:52 +0000 (01:39 +0200)]
bsd: ensure proper alignment of BPF header
This is required as per bpf(4).
Vincent Bernat [Thu, 15 May 2014 23:18:07 +0000 (01:18 +0200)]
bsd: ensure we also have space for the BPF header
Vincent Bernat [Thu, 15 May 2014 23:08:27 +0000 (01:08 +0200)]
bsd: fix clang warning about alignment problem with sockaddr
While this does not seem to be extensively documented, when casting a
`sockaddr *` to something else, like `sockaddr_dl *`, it is believed
that initially, it was a `sockaddr_dl *`, so there is no alignment
problem in this case. We use a macro to cast to `void *` to avoid the
warning.
Vincent Bernat [Thu, 15 May 2014 23:07:30 +0000 (01:07 +0200)]
travis: run "make distcheck" with the appropriate configure arguments
Otherwise, we just use the default ones...
Vincent Bernat [Thu, 15 May 2014 13:47:42 +0000 (15:47 +0200)]
travis: only run "make distcheck"
We don't need to compile stuff twice.
Vincent Bernat [Thu, 15 May 2014 13:26:14 +0000 (15:26 +0200)]
travis: on OS X, try with/without embedded libevent and with/without SNMP
Vincent Bernat [Thu, 15 May 2014 13:23:05 +0000 (15:23 +0200)]
travis: try to build only with clang on OS X
Vincent Bernat [Thu, 15 May 2014 13:19:54 +0000 (15:19 +0200)]
travis: use devel version of net-snmp on OSX
The current stable version does not work with Mavericks. See:
https://github.com/Homebrew/homebrew/issues/25097
Vincent Bernat [Thu, 15 May 2014 12:46:24 +0000 (14:46 +0200)]
travis: misc change to trigger a rebuild
Vincent Bernat [Sun, 11 May 2014 14:21:33 +0000 (16:21 +0200)]
lldpcli: directive to configure IP management pattern
This closes #54.
Vincent Bernat [Sun, 11 May 2014 14:17:42 +0000 (16:17 +0200)]
lldp: fix handling of LLDPDU expiration
Expiration logic for LLDPDU was totally flawed after the change to
support shutdown LLDPDU. Any LLDPDU would trigger infinite
expiration. Fix that.
Vincent Bernat [Sat, 10 May 2014 16:02:40 +0000 (18:02 +0200)]
NEWS: mention support for shutdown LLDPDU
Vincent Bernat [Sat, 10 May 2014 15:57:08 +0000 (17:57 +0200)]
lldp: support for shutdown LLDPU
We just accept 0 as a valid TTL and let the expiration mechanism do its
work. We ensure that we can handle those 0 TTL and avoid underflow.
Closes #5.
Vincent Bernat [Sat, 10 May 2014 15:32:10 +0000 (17:32 +0200)]
interfaces: default to use of a local administered MAC address for bonds
Since in the default configuration, some swicthes (Cisco on IOS 15.x)
will complain about MAC addresses flapping when using `configure system
bond-slave-src-mac-type fixed`, and some other switches (still Cisco)
will complain when using `configure system bond-slave-src-mac-type
fixed`, we change the default to `local`. This is not the safest option
but the probability of having a collision is quite low.
Usually, locally administered addresses are used for VM but they are
taken from a known prefix and we are unlikely to have a collision with
this prefix. On VM, we will fallback to a fixed address but hopefully,
the switch will be a virtual one which won't have a problem with the
fixed address.
Vincent Bernat [Sat, 10 May 2014 08:29:42 +0000 (10:29 +0200)]
NEWS: mention the fix for local address use
Vincent Bernat [Sat, 10 May 2014 07:13:02 +0000 (09:13 +0200)]
man: more documentation for bond-slave-src-mac-type
We document the MAC address used (to be able to find it through Google
or `git grep`). We also explain why the default is `fixed` and when it
should be changed to `local`.
Vincent Bernat [Sat, 10 May 2014 07:03:03 +0000 (09:03 +0200)]
interfaces: fallback to fixed MAC if already a local MAC
This is what is documented in the manual page.
Vincent Bernat [Sat, 10 May 2014 07:00:37 +0000 (09:00 +0200)]
interfaces: fix use of locally administered use on bond devices
This was broken in a previous commit (
2746d430fbcc7 ).
Vincent Bernat [Wed, 7 May 2014 11:43:21 +0000 (13:43 +0200)]
osx: use /var as a base for socket location
Vincent Bernat [Wed, 7 May 2014 11:31:32 +0000 (13:31 +0200)]
man: use configured path for /var/run/lldpd.socket
Vincent Bernat [Wed, 7 May 2014 11:21:50 +0000 (13:21 +0200)]
configure: make default PID location configurable
Also, document those changes in NEWS as using `localstatedir` may move
stuff from `/var` to `/usr/local/var`.
Closes #64.
Vincent Bernat [Wed, 7 May 2014 11:12:53 +0000 (13:12 +0200)]
configure: make default socket location configurable in configure
This closes #63.
Vincent Bernat [Wed, 7 May 2014 11:06:05 +0000 (13:06 +0200)]
configure: use `runstatedir` instead of /var/run in configure
Vincent Bernat [Wed, 7 May 2014 10:42:46 +0000 (12:42 +0200)]
configure: don't use fallback values in summary
They are not needed anymore, if default values are used, they are expanded.
Vincent Bernat [Wed, 7 May 2014 09:54:16 +0000 (11:54 +0200)]
lldpcli: return success when reading commands from files
When reading commands from files, we chose to not stop on errors (the
main reason is to allow to specify nonexistent configuration files and
allow lldpd to still work after incompatible updates). However, we also
always return a failure status. Fix that.
Thanks to Brian Bidulock for spotting that. Closes #62.
Vincent Bernat [Sun, 27 Apr 2014 10:54:44 +0000 (12:54 +0200)]
osx: update Homebrew formula to match what has been done in Homebrew
Vincent Bernat [Thu, 24 Apr 2014 15:53:34 +0000 (17:53 +0200)]
configure: enable use of colored output for gcc
Vincent Bernat [Thu, 24 Apr 2014 15:50:55 +0000 (17:50 +0200)]
configure: use -fstack-protector-strong if available
Vincent Bernat [Sun, 13 Apr 2014 09:49:52 +0000 (11:49 +0200)]
osx: new release
Vincent Bernat [Sun, 13 Apr 2014 08:55:10 +0000 (10:55 +0200)]
lldpcli: document new "configure system hostname" directive
Vincent Bernat [Sun, 13 Apr 2014 08:34:13 +0000 (10:34 +0200)]
version: prepare new release
Vincent Bernat [Sun, 13 Apr 2014 06:04:12 +0000 (08:04 +0200)]
NEWS: add several items to the changelog
Vincent Bernat [Sat, 12 Apr 2014 10:34:28 +0000 (12:34 +0200)]
configure: make some flags conditional
Use of _XOPEN_SOURCE is quite dangerous.
Vincent Bernat [Sat, 12 Apr 2014 10:11:21 +0000 (12:11 +0200)]
osx: blacklist p2pX interfaces
They are related to AirDrop and transmitting anything on it will broke
the wireless network. This should fix #61.
Vincent Bernat [Wed, 9 Apr 2014 19:06:57 +0000 (21:06 +0200)]
configure: hide errors when systemd is not present
Vincent Bernat [Wed, 9 Apr 2014 19:03:17 +0000 (21:03 +0200)]
compat: fix vsyslog to rely on the result of vasprintf
Vincent Bernat [Wed, 9 Apr 2014 19:03:10 +0000 (21:03 +0200)]
compat: include stdarg to get va_list
Vincent Bernat [Wed, 9 Apr 2014 18:56:32 +0000 (20:56 +0200)]
compat: fix use of vasprintf (previously _vasprintf)
Vincent Bernat [Wed, 9 Apr 2014 18:56:04 +0000 (20:56 +0200)]
lldpcli: use a previously unused variable
Vincent Bernat [Wed, 9 Apr 2014 07:56:38 +0000 (09:56 +0200)]
lldpd: add a note about command-line options
lldpcli should be preferred for new options.
Vincent Bernat [Wed, 9 Apr 2014 07:54:54 +0000 (09:54 +0200)]
Merge pull request #60 from jonasj76/override-hostname
lldp: add option/command to override hostname
Jonas Johansson [Wed, 9 Apr 2014 06:02:48 +0000 (08:02 +0200)]
lldpd: Remove the '-N' command-line flag
Too many flags being added, use of configuration file is prefered.
Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Jonas Johansson [Tue, 8 Apr 2014 11:30:24 +0000 (13:30 +0200)]
lldp: add option/command to override hostname
Allow to override the system name (hostname) by using '-N' as parameter to
lldpd, or by using "configure system hostname <NAME>" to lldpcli.
Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Vincent Bernat [Tue, 8 Apr 2014 07:32:02 +0000 (09:32 +0200)]
coverity: change a bit the annotations
We want coverity to ignore those errors. It doesn't seem to be the case.
Vincent Bernat [Tue, 8 Apr 2014 07:17:29 +0000 (09:17 +0200)]
coverity: fix a false positive in SNMP transport
`remote` is not expected to be a NULL-terminated string. However, just
in case it is used as one somewhere, we alloc the appropriate space for
it.
Vincent Bernat [Tue, 8 Apr 2014 07:14:48 +0000 (09:14 +0200)]
coverity: fix memory leak in lldpd when the same option is repeated
Vincent Bernat [Tue, 8 Apr 2014 07:11:21 +0000 (09:11 +0200)]
coverity: fix memory leak in lldpcli
CID
1198257 (#1 of 1): Resource leak (RESOURCE_LEAK)
Vincent Bernat [Sun, 6 Apr 2014 21:44:17 +0000 (23:44 +0200)]
redhat: enable SNMP support on RHEL 5 and CentOS 5 by default
This is related with the fix in the previous commit (
ae7f4c2 ).
Vincent Bernat [Sun, 6 Apr 2014 21:41:40 +0000 (23:41 +0200)]
snmp: link with Net-SNMP later
Some systems contain static libraries in the output of `net-snmp-config
--agent-libs`. It is not possible to build a convenience library with a
static library. Therefore, we just link with the appropriate libs in the
last step. This should fix #57.
Vincent Bernat [Fri, 4 Apr 2014 08:17:43 +0000 (10:17 +0200)]
priv: use AF_UNIX for socketpair()
This is a synonym of AF_LOCAL but it seems more widely known (for
example, on HP-UX).
Vincent Bernat [Thu, 3 Apr 2014 07:45:24 +0000 (09:45 +0200)]
configure: _XOPEN_SOURCE=500 to be like _GNU_SOURCE=1
Vincent Bernat [Wed, 2 Apr 2014 16:01:24 +0000 (18:01 +0200)]
hpux: provide a replacement for daemon() for HP-UX
Vincent Bernat [Wed, 2 Apr 2014 15:54:20 +0000 (17:54 +0200)]
hpux: provide a replacement for vsyslog() for HP-UX
Vincent Bernat [Wed, 2 Apr 2014 15:38:56 +0000 (17:38 +0200)]
asprintf: we are also using vasprintf, let's define it correctly
Vincent Bernat [Wed, 2 Apr 2014 15:10:08 +0000 (17:10 +0200)]
build: use __EXTENSIONS__ and _XOPEN_SOURCE_EXTENDED everywhere
It is needed for Solaris and HP-UX. It doesn't seem to harm other
platforms. Let's hope that the autoconf test will catch
problems. Otherwise, we can still conditionally use them.
Vincent Bernat [Wed, 2 Apr 2014 13:55:55 +0000 (15:55 +0200)]
bsd: check of SIOCGIFDESCR instead of IFDESCRSIZE
IFDESCRSIZE is defined at the beginning of the file and is therefore
always defined. Just check if SIOCGIFDESCR exists instead.
Vincent Bernat [Wed, 2 Apr 2014 13:33:02 +0000 (15:33 +0200)]
privsep: don't use err.h: not needed
Vincent Bernat [Tue, 1 Apr 2014 17:20:28 +0000 (19:20 +0200)]
asprintf: fix warnings in SNMP tests related to asprintf
Vincent Bernat [Tue, 1 Apr 2014 17:16:56 +0000 (19:16 +0200)]
asprintf: do not redeclare on SNMP tests
Vincent Bernat [Tue, 1 Apr 2014 16:29:07 +0000 (18:29 +0200)]
asprintf: globally define _GNU_SOURCE
And also provide a replacement for asprintf if it is not available. I
would prefer to not use _GNU_SOURCE everywhere but it seems cleaner than
putting it at the top of random files. Ideally, I should wrap every
function in a separate file to just use _GNU_SOURCE for those
functions. There are `asprintf()` and `setres[ug]id()`.
Vincent Bernat [Fri, 21 Mar 2014 14:14:06 +0000 (15:14 +0100)]
debian: fix postinst to create _lldpd user
Previous commit was incorrect and did not create _lldpd user on install.
Vincent Bernat [Thu, 20 Mar 2014 15:55:55 +0000 (16:55 +0100)]
debian: same style for postinst and postrm
Use a case switch in both files. Moreover, `#DEBHELPER#` may want to do
something if we configure or reconfigure. Let it do that.
Vincent Bernat [Tue, 11 Mar 2014 20:43:59 +0000 (21:43 +0100)]
lib: use strlcpy() instead of strcpy()
This reverts back
27faad4fd79399eda8811d4315c96317ed47a151 but we
introduce a variable for the value of strlen()+1 to make it clear we know
what we are doing.
Vincent Bernat [Fri, 7 Mar 2014 09:21:15 +0000 (10:21 +0100)]
interfaces: convert a whitelisted interface to a physical one
The previous change didn't allow to have bonds and VLAN handled in a
sensible way in case of a whitelisted interface.
Vincent Bernat [Thu, 6 Mar 2014 17:28:21 +0000 (18:28 +0100)]
interfaces: circumvent any physical check on exact match
When enabling an interface with `-I eth0`, any physical check will be
circumvented. This allows lldpd to send and receive on VLAN interfaces.
Vincent Bernat [Thu, 6 Mar 2014 17:09:27 +0000 (18:09 +0100)]
interfaces: allow whitelisting an interface
Currently, this means that an interface can be both blacklisted and
whitelisted and in this case, it is accepted as valid.
Vincent Bernat [Thu, 6 Mar 2014 16:55:22 +0000 (17:55 +0100)]
interfaces: document and test pattern matching
Vincent Bernat [Thu, 6 Mar 2014 16:20:09 +0000 (17:20 +0100)]
build: use -fno-omit-frame-pointer for ease of debug
We are not a performance sensitive program and this helps debugging in
many situations.
Vincent Bernat [Sun, 2 Mar 2014 23:48:55 +0000 (00:48 +0100)]
lib: don't use strlcpy() when strcpy() just works
clang complains when we use strlcpy() with strlen() on the source. The
change was made because some other tools complained that we used
strcpy() instead of a more secure version. Since they don't agree, let's
switch to the saner thing to do: use strcpy() when it is safe to do.
Vincent Bernat [Sun, 2 Mar 2014 23:45:17 +0000 (00:45 +0100)]
build: remove duplicate const declaration
clang complains about this. I don't remember why I did this.
Vincent Bernat [Sun, 2 Mar 2014 23:30:17 +0000 (00:30 +0100)]
travis: put installation and test instructions into shell scripts
Vincent Bernat [Sun, 2 Mar 2014 23:24:56 +0000 (00:24 +0100)]
travis: test with OSX and clang
It seems that Travis-CI now supports OSX and clang. Let's try out. See:
https://github.com/pyca/cryptography/blob/master/.travis.yml
Vincent Bernat [Sun, 2 Mar 2014 23:20:20 +0000 (00:20 +0100)]
build: on OSX, use glibtoolize by default