]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
11 years agoversion: prepare new release 0.7.8
Vincent Bernat [Sun, 13 Apr 2014 08:34:13 +0000 (10:34 +0200)] 
version: prepare new release

11 years agoNEWS: add several items to the changelog
Vincent Bernat [Sun, 13 Apr 2014 06:04:12 +0000 (08:04 +0200)] 
NEWS: add several items to the changelog

11 years agoconfigure: make some flags conditional
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.

11 years agoosx: blacklist p2pX interfaces
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.

11 years agoconfigure: hide errors when systemd is not present
Vincent Bernat [Wed, 9 Apr 2014 19:06:57 +0000 (21:06 +0200)] 
configure: hide errors when systemd is not present

11 years agocompat: fix vsyslog to rely on the result of vasprintf
Vincent Bernat [Wed, 9 Apr 2014 19:03:17 +0000 (21:03 +0200)] 
compat: fix vsyslog to rely on the result of vasprintf

11 years agocompat: include stdarg to get va_list
Vincent Bernat [Wed, 9 Apr 2014 19:03:10 +0000 (21:03 +0200)] 
compat: include stdarg to get va_list

11 years agocompat: fix use of vasprintf (previously _vasprintf)
Vincent Bernat [Wed, 9 Apr 2014 18:56:32 +0000 (20:56 +0200)] 
compat: fix use of vasprintf (previously _vasprintf)

11 years agolldpcli: use a previously unused variable
Vincent Bernat [Wed, 9 Apr 2014 18:56:04 +0000 (20:56 +0200)] 
lldpcli: use a previously unused variable

11 years agolldpd: add a note about command-line options
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.

11 years agoMerge pull request #60 from jonasj76/override-hostname
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

11 years agolldpd: Remove the '-N' command-line flag 60/head
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>
11 years agolldp: add option/command to override hostname
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>
11 years agocoverity: change a bit the annotations
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.

11 years agocoverity: fix a false positive in SNMP transport
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.

11 years agocoverity: fix memory leak in lldpd when the same option is repeated
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

11 years agocoverity: fix memory leak in lldpcli
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)

11 years agoredhat: enable SNMP support on RHEL 5 and CentOS 5 by default
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).

11 years agosnmp: link with Net-SNMP later
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.

11 years agopriv: use AF_UNIX for socketpair()
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).

11 years agoconfigure: _XOPEN_SOURCE=500 to be like _GNU_SOURCE=1
Vincent Bernat [Thu, 3 Apr 2014 07:45:24 +0000 (09:45 +0200)] 
configure: _XOPEN_SOURCE=500 to be like _GNU_SOURCE=1

11 years agohpux: provide a replacement for daemon() for HP-UX
Vincent Bernat [Wed, 2 Apr 2014 16:01:24 +0000 (18:01 +0200)] 
hpux: provide a replacement for daemon() for HP-UX

11 years agohpux: provide a replacement for vsyslog() 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

11 years agoasprintf: we are also using vasprintf, let's define it correctly
Vincent Bernat [Wed, 2 Apr 2014 15:38:56 +0000 (17:38 +0200)] 
asprintf: we are also using vasprintf, let's define it correctly

11 years agobuild: use __EXTENSIONS__ and _XOPEN_SOURCE_EXTENDED everywhere
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.

11 years agobsd: check of SIOCGIFDESCR instead of IFDESCRSIZE
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.

11 years agoprivsep: don't use err.h: not needed
Vincent Bernat [Wed, 2 Apr 2014 13:33:02 +0000 (15:33 +0200)] 
privsep: don't use err.h: not needed

11 years agoasprintf: fix warnings in SNMP tests related to asprintf
Vincent Bernat [Tue, 1 Apr 2014 17:20:28 +0000 (19:20 +0200)] 
asprintf: fix warnings in SNMP tests related to asprintf

11 years agoasprintf: do not redeclare on SNMP tests
Vincent Bernat [Tue, 1 Apr 2014 17:16:56 +0000 (19:16 +0200)] 
asprintf: do not redeclare on SNMP tests

11 years agoasprintf: globally define _GNU_SOURCE
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()`.

11 years agodebian: fix postinst to create _lldpd user
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.

11 years agodebian: same style for postinst and postrm
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.

11 years agolib: use strlcpy() instead of strcpy()
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.

11 years agointerfaces: convert a whitelisted interface to a physical one
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.

11 years agointerfaces: circumvent any physical check on exact match
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.

11 years agointerfaces: allow whitelisting an interface
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.

11 years agointerfaces: document and test pattern matching
Vincent Bernat [Thu, 6 Mar 2014 16:55:22 +0000 (17:55 +0100)] 
interfaces: document and test pattern matching

11 years agobuild: use -fno-omit-frame-pointer for ease of debug
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.

11 years agolib: don't use strlcpy() when strcpy() just works
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.

11 years agobuild: remove duplicate const declaration
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.

11 years agotravis: put installation and test instructions into shell scripts
Vincent Bernat [Sun, 2 Mar 2014 23:30:17 +0000 (00:30 +0100)] 
travis: put installation and test instructions into shell scripts

11 years agotravis: test with OSX and clang
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

11 years agobuild: on OSX, use glibtoolize by default
Vincent Bernat [Sun, 2 Mar 2014 23:20:20 +0000 (00:20 +0100)] 
build: on OSX, use glibtoolize by default

11 years agolldpcli: fix readline() wrapper to take prompt as argument
Vincent Bernat [Thu, 20 Feb 2014 20:57:29 +0000 (21:57 +0100)] 
lldpcli: fix readline() wrapper to take prompt as argument

`readline()` is expecting the prompt as argument. We fix the wrapper to
have the same requirement.

11 years agolldpcli: check for privileges by checking access to control socket
Vincent Bernat [Thu, 20 Feb 2014 20:52:46 +0000 (21:52 +0100)] 
lldpcli: check for privileges by checking access to control socket

Instead of relying on having used the suid bit to run the program, we
check if the real UID/GID could have opened the control socket. This
really fix #56.

11 years agolldpcli: root is privileged
Vincent Bernat [Thu, 20 Feb 2014 20:37:22 +0000 (21:37 +0100)] 
lldpcli: root is privileged

For some reason, this bug was not catched before. It was expected that
`lldpcli` can be installed as suid `_lldpd` to give user read access to
the neighbor information. However, to avoid write access, we checked if
the user was privileged by checking equality of effective and real user
uid. However, even for root, they don't have to match. Maybe they
matched in the past?

Therefore, directly check for UID == 0 too.

This should fix #56

11 years agointerfaces: reset router and wlan capability bits
Vincent Bernat [Wed, 19 Feb 2014 14:50:41 +0000 (15:50 +0100)] 
interfaces: reset router and wlan capability bits

When adding capability for new interfaces, reset them if the interfaces
providing the capability are not present anymore. Also, add stationOnly
capability if no capability is currently present.

11 years agolldpd: enable "stationOnly" capability if we don't have anything else
Vincent Bernat [Wed, 19 Feb 2014 14:48:37 +0000 (15:48 +0100)] 
lldpd: enable "stationOnly" capability if we don't have anything else

This should fix #55.

11 years agolib: add URL in lldpctl.pc
Vincent Bernat [Wed, 12 Feb 2014 23:01:23 +0000 (00:01 +0100)] 
lib: add URL in lldpctl.pc

11 years agolib: fix includedir in lldpctl.pc
Vincent Bernat [Wed, 12 Feb 2014 23:00:39 +0000 (00:00 +0100)] 
lib: fix includedir in lldpctl.pc

11 years agofgetln: provide a version not relying on getline()
Vincent Bernat [Sun, 19 Jan 2014 10:24:45 +0000 (11:24 +0100)] 
fgetln: provide a version not relying on getline()

`getline()` is not POSIX and is a GNU extension.

11 years agodaemon: unset UPSTART_JOB and NOTIFY_SOCKET once used
Vincent Bernat [Wed, 1 Jan 2014 13:00:33 +0000 (14:00 +0100)] 
daemon: unset UPSTART_JOB and NOTIFY_SOCKET once used

While we shouldn't have children that use those environment variables,
better safe than sorry.

11 years agolldpd: use vfork+exec instead of fork+exec feature/noprivsep
Vincent Bernat [Sun, 15 Dec 2013 12:07:19 +0000 (13:07 +0100)] 
lldpd: use vfork+exec instead of fork+exec

This will help compatibility with systems not having a working `fork()`
implementation. For those who do, we will still use `fork()`.

11 years agopriv: add compilation without privilege separation to Travis
Vincent Bernat [Fri, 13 Dec 2013 22:26:33 +0000 (23:26 +0100)] 
priv: add compilation without privilege separation to Travis

11 years agopriv: add the ability to disable privilege separation
Vincent Bernat [Fri, 13 Dec 2013 22:25:04 +0000 (23:25 +0100)] 
priv: add the ability to disable privilege separation

This is a compile time switch in ./configure. It should only be used for
debugging purposes or when memory and number of processes matter or for
running on platforms without a real `fork()` syscall. We add it to the
NEWS but we make no further mention in the documentation.

11 years agoprivsep: IO should specify the context
Vincent Bernat [Fri, 13 Dec 2013 21:48:41 +0000 (22:48 +0100)] 
privsep: IO should specify the context

Currently, the context is not needed because IO is always done to the
"remote" process. If we remove privilege separation, the remote process
is ourselves and we need to know which file descriptor to use.

11 years agoREADME: add build instructions for Android
Vincent Bernat [Tue, 31 Dec 2013 14:03:12 +0000 (15:03 +0100)] 
README: add build instructions for Android

11 years agoinclude: don't ship `linux/socket.h`
Vincent Bernat [Tue, 31 Dec 2013 14:00:23 +0000 (15:00 +0100)] 
include: don't ship `linux/socket.h`

It needs to be paired with `sys/socket.h` (and we don't want to ship it
as it is bound to userland interface). On older libc, like Android's
bionic, `sys/socket.h` is almost empty and all the definitions,
including non-kernel related ones, are in `linux/socket.h`. If we ship
our version of `linux/socket.h`, we have an empty `linux/socket.h` and
an empty `sys/socket.h` and almost no definitions.

Since `linux/netlink.h` extract `__kernel_sa_family_t` from
`linux/socket.h` and we don't have it anymore, we just replace its
definition by `unsigned short`. Being a Linux kernel interface, it is
quite unlikely to change anytime soon.

11 years agopriv: declare `res_init()` for builds against Android's Bionic
Vincent Bernat [Tue, 31 Dec 2013 13:40:41 +0000 (14:40 +0100)] 
priv: declare `res_init()` for builds against Android's Bionic

`res_init()` is present in the C library (as detected by configure) but
no declared in any header.

11 years agolldpcli: replace safe use of `strcpy` by `strlcpy`
Vincent Bernat [Wed, 25 Dec 2013 11:12:10 +0000 (12:12 +0100)] 
lldpcli: replace safe use of `strcpy` by `strlcpy`

The idea is to ease automated testing by removing all use of
`strcpy`. See:
 http://marc.info/?l=openbsd-tech&m=138733933417096&w=2

11 years agobuild: hide generation of syscall-names.h
Vincent Bernat [Fri, 13 Dec 2013 22:27:18 +0000 (23:27 +0100)] 
build: hide generation of syscall-names.h

11 years agocdp: fix regression in CDP packet building
Vincent Bernat [Wed, 11 Dec 2013 10:55:12 +0000 (11:55 +0100)] 
cdp: fix regression in CDP packet building

The associativity of the ternary operator was not as expected. Put a
bunch of parentheses to fix that.

11 years agolldp: don't hard-code sysname, sysdescr and portdescr
Vincent Bernat [Mon, 9 Dec 2013 21:42:52 +0000 (22:42 +0100)] 
lldp: don't hard-code sysname, sysdescr and portdescr

Instead of using "Not received" when we don't have them, just keep a
pointer to NULL. However, we need to handle that gracefully everywhere:
don't send them over SNMP, don't display them in lldpcli, be ready for
the fact that it should not be sent (even if this is not possible for
the local chassis), don't use it on places were we display the neighbor
and update tests.

11 years agointerfaces: remove useless return
Vincent Bernat [Thu, 5 Dec 2013 21:28:55 +0000 (22:28 +0100)] 
interfaces: remove useless return

11 years agolldp: do not send system description TLV if empty
Vincent Bernat [Thu, 5 Dec 2013 20:37:04 +0000 (21:37 +0100)] 
lldp: do not send system description TLV if empty

This makes this TLV optional to send (as authorized in 802.1AB). The
user just has to provide an empty TLV, with, for example `-S ""`.

11 years agoconfigure: provide GitHub address for issues
Vincent Bernat [Sat, 23 Nov 2013 12:18:56 +0000 (13:18 +0100)] 
configure: provide GitHub address for issues

Also provide the appropriate homepage.

11 years agoclang: use ETHER_ADDR_LEN instead of sizeof()
Vincent Bernat [Sat, 23 Nov 2013 09:16:38 +0000 (10:16 +0100)] 
clang: use ETHER_ADDR_LEN instead of sizeof()

This allows clang to not choke on inappropriate types.

11 years agomarshal: use __alignof__ operator if available
Vincent Bernat [Sat, 23 Nov 2013 09:03:42 +0000 (10:03 +0100)] 
marshal: use __alignof__ operator if available

11 years agoclang: fix an obvious use after free
Vincent Bernat [Sat, 23 Nov 2013 08:39:08 +0000 (09:39 +0100)] 
clang: fix an obvious use after free

11 years agoalignof: handle sizeof(t) == 1 case
Vincent Bernat [Sat, 23 Nov 2013 08:30:35 +0000 (09:30 +0100)] 
alignof: handle sizeof(t) == 1 case

11 years agocoverity: really fix popt issue
Vincent Bernat [Fri, 22 Nov 2013 23:38:47 +0000 (00:38 +0100)] 
coverity: really fix popt issue

11 years agocoverity: add code annotation to remove false positives
Vincent Bernat [Fri, 22 Nov 2013 23:48:54 +0000 (00:48 +0100)] 
coverity: add code annotation to remove false positives

11 years agocoverity: if we cannot read /etc/localtime, don't go further
Vincent Bernat [Fri, 22 Nov 2013 23:44:08 +0000 (00:44 +0100)] 
coverity: if we cannot read /etc/localtime, don't go further

11 years agocoverity: don't fallback to next case for clarity
Vincent Bernat [Fri, 22 Nov 2013 22:40:57 +0000 (23:40 +0100)] 
coverity: don't fallback to next case for clarity

Even if the code was correct, add an `_exit(0)` to the first branch and
do not rely on the next case for that.

11 years agocoverity: replace unsafe uses of strncpy by strlcpy
Vincent Bernat [Fri, 22 Nov 2013 22:37:56 +0000 (23:37 +0100)] 
coverity: replace unsafe uses of strncpy by strlcpy

11 years agocoverity: remove always false comparison
Vincent Bernat [Fri, 22 Nov 2013 22:34:06 +0000 (23:34 +0100)] 
coverity: remove always false comparison

Also ensure that we use unsigned integers since we are reading unsigned
chars.

11 years agocoverity: remove dead code
Vincent Bernat [Fri, 22 Nov 2013 22:31:10 +0000 (23:31 +0100)] 
coverity: remove dead code

Possible values for `tlv_subtype` were already checked. The default case
is not possible.

11 years agocoverity: don't make `-L` flag switch off version advertisement
Vincent Bernat [Fri, 22 Nov 2013 22:27:53 +0000 (23:27 +0100)] 
coverity: don't make `-L` flag switch off version advertisement

A missing `break` was disabling version advertisement when using the
`-L` flag. Since the use of this flag is quite unlikely, don't tell
anyone...

11 years agocoverity: handle case where we didn't get enough place in getopt string
Vincent Bernat [Fri, 22 Nov 2013 22:24:42 +0000 (23:24 +0100)] 
coverity: handle case where we didn't get enough place in getopt string

While not currently possible, it may become possible in the future to
forget to allocate enough place in getopt specification string to add
protocols.

11 years agocoverity: remove a theoritical memory leak
Vincent Bernat [Fri, 22 Nov 2013 22:20:30 +0000 (23:20 +0100)] 
coverity: remove a theoritical memory leak

If cargc is 0, cargv should not have been allocated. However, to be more
robust, let's say this is possible and handle this case correctly.

11 years agocoverity: fix a memory leak
Vincent Bernat [Fri, 22 Nov 2013 22:12:02 +0000 (23:12 +0100)] 
coverity: fix a memory leak

A memory leak was happening when setting the description of an interface.

11 years agocoverity: fix a resource leak
Vincent Bernat [Fri, 22 Nov 2013 22:09:33 +0000 (23:09 +0100)] 
coverity: fix a resource leak

In `netlink.c`, ensure we free the socket if we have a memory allocation
problem.

11 years agocoverity: fix TOCTOU problem when creating chroot
Vincent Bernat [Fri, 22 Nov 2013 22:03:51 +0000 (23:03 +0100)] 
coverity: fix TOCTOU problem when creating chroot

It is believed that checking for existence of a directory or a file
before an action is useless since it could be created after the check
and before the action. Therefore, it is better to just try to do the
action and handle any failure gracefully.

When setting up the chroot, instead of checking if it already exists, we
create it and don't display an error if it is already set up.

11 years agocoverity: remove dead code
Vincent Bernat [Fri, 22 Nov 2013 21:45:49 +0000 (22:45 +0100)] 
coverity: remove dead code

A spurious return was added at the end of a function.

11 years agocoverity: remove unused pointer value
Vincent Bernat [Fri, 22 Nov 2013 21:43:54 +0000 (22:43 +0100)] 
coverity: remove unused pointer value

Also clarify how we use a similar pointer nearby.

11 years agogitignore: add GNU global files
Vincent Bernat [Sun, 17 Nov 2013 18:15:31 +0000 (19:15 +0100)] 
gitignore: add GNU global files

11 years agodebian: fix debian/lldpd.install to use provided lldpd.service
Vincent Bernat [Sun, 17 Nov 2013 08:55:39 +0000 (09:55 +0100)] 
debian: fix debian/lldpd.install to use provided lldpd.service

11 years agoredhat: don't try to install systemd stuff
Vincent Bernat [Sun, 10 Nov 2013 15:40:58 +0000 (16:40 +0100)] 
redhat: don't try to install systemd stuff

I don't know how I should handle this. Let somebody with better
knowledge tell me how to install systemd in the .spec file.

11 years agoredhat: fix version in lldpd.spec
Vincent Bernat [Sun, 10 Nov 2013 15:29:03 +0000 (16:29 +0100)] 
redhat: fix version in lldpd.spec

11 years agoosx: update homebrew recipe
Vincent Bernat [Sun, 10 Nov 2013 15:10:34 +0000 (16:10 +0100)] 
osx: update homebrew recipe

The patch is not needed anymore. We replace it with the appropriate
`./configure` option. We could use the shipped launchd file but it
does not contain provision to specify options to enable SNMP support.

11 years agorelease: prepare for release of 0.7.7 0.7.7
Vincent Bernat [Sun, 10 Nov 2013 14:42:52 +0000 (15:42 +0100)] 
release: prepare for release of 0.7.7

11 years agolldpd: tell `lldpcli` to use the appropriate control socket
Vincent Bernat [Fri, 8 Nov 2013 13:26:34 +0000 (14:26 +0100)] 
lldpd: tell `lldpcli` to use the appropriate control socket

When using a non-default control socket, lldpd was not providing the
appropriate name to lldpcli which was then not able to configure lldpd
during startup.

This fixes #48.

11 years agolldpcli: accepts `-u` option to specify control socket
Vincent Bernat [Fri, 8 Nov 2013 13:23:39 +0000 (14:23 +0100)] 
lldpcli: accepts `-u` option to specify control socket

Fix: #48.

11 years agoprivsep: put /etc/localtime in chroot
Vincent Bernat [Wed, 23 Oct 2013 08:01:12 +0000 (10:01 +0200)] 
privsep: put /etc/localtime in chroot

The chroot directory was created by lldpd if missing. We also copy
`/etc/localtime` in it if not already present. This allows us to
remove duplicate code in many init scripts. Since this file is not
essential, we don't make a fuzz for some edge cases.

11 years agosystemd: also read /etc/sysconfig/lldpd
Vincent Bernat [Tue, 22 Oct 2013 19:24:19 +0000 (21:24 +0200)] 
systemd: also read /etc/sysconfig/lldpd

While systemd's author says that we should get rid of those
pseudo-configuration files, keeping compatibility with previous ways
to configure daemons seem a valid reason to keep them. `/etc/default`
is Debian specific. We also read the equivalent one for RedHat to
ensure that everything will also continue to work here.

 http://0pointer.de/blog/projects/on-etc-sysinit.html

11 years agosystemd: require mount points to have chroot possible
Vincent Bernat [Tue, 22 Oct 2013 19:10:15 +0000 (21:10 +0200)] 
systemd: require mount points to have chroot possible

11 years agosystemd: starts lldpd after network
Vincent Bernat [Tue, 22 Oct 2013 19:08:57 +0000 (21:08 +0200)] 
systemd: starts lldpd after network

While lldpd can detect new interface, it does not make sense to make
it starts before network is ready. Let other more important programs
run.

11 years agotests: only test if we have `check` installed
Vincent Bernat [Sun, 13 Oct 2013 10:19:01 +0000 (12:19 +0200)] 
tests: only test if we have `check` installed

There should have been a good reason to put `TESTS` outside the
conditional but I don't remember it. It works by putting `TESTS`
inside the conditional and avoid an odd error message when trying to
execute tests without check installed.

11 years agoseccomp: do not ship `syscall-names.h`
Vincent Bernat [Sat, 12 Oct 2013 16:05:06 +0000 (18:05 +0200)] 
seccomp: do not ship `syscall-names.h`

`syscall-names.h` is generated at build-time. Since automake will put
anything in `*_SOURCES` in the dist tarball, we tell it to not do
that.

11 years agotravis: don't limit tests to master branch.
Vincent Bernat [Sat, 12 Oct 2013 15:52:21 +0000 (17:52 +0200)] 
travis: don't limit tests to master branch.