Vincent Bernat [Tue, 15 Dec 2015 08:46:29 +0000 (09:46 +0100)]
client: display numeric PCP
Since the string value for network policy priority can change depending
on the used standard, it seems better to also provide a numeric
value. We name it PCP.
Vincent Bernat [Sun, 13 Dec 2015 08:46:10 +0000 (09:46 +0100)]
build: don't enable PIE by default
PIE needs support from compiler, linker and dynamic linker. Even
when everything seems in place, it can be unreliable. On many ARM
toolchains, compiler and linker support is here but the dynamic
linker doesn't know how to handle that. It is also reported that
NetBSD/ppc or Solaris/x86 doesn't work correctly. Therefore, it is
too difficult to detect proper support at configure time (notably
with cross-compilation). Some OS (like OpenBSD, or Gentoo) come
with automatic PIE support. No need to do anyhing special for
them.
People wanting to enable PIE should now use --enable-pie.
Vincent Bernat [Sat, 12 Dec 2015 20:37:52 +0000 (21:37 +0100)]
build: use libbsd overlay
This enables more portable code. We check for the presence of libbsd and
use it if it is here. All the remaining should work with/without libbsd
on Linux or on other OSes.
Vincent Bernat [Tue, 1 Dec 2015 08:01:17 +0000 (09:01 +0100)]
interfaces: query permanent MAC address through ethtool
This is possible since 2.6.14. No need to parse a file. We still need to
do that as root as this is only allowed for mere mortals since
2.6.19 (and we would like to support 2.6.18). As a side note, it's
possible to query settings since 2.6.36 (so priv_ethtool is still
needed).
Vincent Bernat [Tue, 1 Dec 2015 07:15:04 +0000 (08:15 +0100)]
lldpmed: fix numeric values for L2 priority
"Best effort" is the default priority and is 0. Other priorities are
then ordered from 1 to 7 (from the lowest to the highest). Add a note in
the manual page about the fact that the labels are not enforceable and
more recent standards may change them and their meaning.
Vincent Bernat [Sat, 28 Nov 2015 13:49:45 +0000 (14:49 +0100)]
log: rework the way -d work
Now:
- `-d` means to stay in foreground, log to syslog
- `-dd` means to stay in foreground, log warnings to console
- `-ddd` means to stay in foreground, log warnings and info to console
- `-dddd` means to stay in foreground, log all to console
Vincent Bernat [Tue, 6 Oct 2015 05:55:46 +0000 (07:55 +0200)]
build: check runtime support of constructor/destructor
With some libc, we may have a compile-time support (through GCC), but
not a runtime support. For example, with uclibc, support for
constructors/destructors is optional. They can be enabled with
`CFLAGS=--uclibc-ctors` on some versions. On some others, they need to
be builtin by compiling uclibc with UCLIBC_CTOR_DTOR.
Unfortunately, cannot be tested when cross-compilation is in effect.
Vincent Bernat [Sat, 3 Oct 2015 23:50:38 +0000 (01:50 +0200)]
lldp: fix a buffer overflow when handling management address TLV
When a remote device was advertising a too large management address
while still respecting TLV boundaries, lldpd would crash due to a buffer
overflow. However, the buffer being a static one, this buffer overflow
is not exploitable if hardening was not disabled. This bug exists since
version 0.5.6.
Vincent Bernat [Wed, 16 Sep 2015 20:15:25 +0000 (22:15 +0200)]
build: fool autoreconf to do a recursive reconfiguration
We just redefine AC_CONFIG_SUBDIRS to our own empty version. autoreconf
will see this during the tracing step and will automatically reconfigure
libevent and libnl as well. This may unbreak people relying on tool
trying to regen configure without using the "autogen.sh" script.
Vincent Bernat [Sun, 23 Aug 2015 13:28:58 +0000 (15:28 +0200)]
lldpcli: fix per-port occurrences of "conf lldp"
Some commands were documented as not accepting a per-port setting while
they accepted it (without any effect). On the other hand, some other
commands were accepting and used per-port setting while not
documented. Fix all that.
Now that the peer netns is advertised in rtnl messages, we can set this property
so that IFLA_LINK will advertise the peer ifindex. It allows the userland to get
the full veth configuration.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Vincent Bernat [Sun, 16 Aug 2015 23:19:52 +0000 (01:19 +0200)]
netlink: use libnl3 instead of custom netlink code
The main goal of this change is to implement a caching system for
netlink and avoiding the full scan done when a change was
triggered. Implementing a netlink cache is not as funny as it seems and
therefore, it seems just better to use libnl3.
Licensing issues are explained in README. People concerned with that
should just use dynamic linking. An embedded copy of libnl3 is also
provided, just like libevent.
Vincent Bernat [Sun, 16 Aug 2015 09:49:07 +0000 (11:49 +0200)]
build: replace AC_CONFIG_SUBDIRS with custom version
Modifying `$ac_configure_args` breaks maintainer mode. Moreover,
./configure is run even when not needed. We use a custom version
allowing to pass custom parameters and not delaying ./configure
invocation.