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.
Vincent Bernat [Wed, 12 Aug 2015 15:01:46 +0000 (17:01 +0200)]
cdp: compute default platform when updating the chassis
Like for other data, collect the default platform name for CDP in
`lldpd_update_localchassis()`. Code in `cdp.c` should be independant of
the environment. Also, fix the unittests.
Vincent Bernat [Sat, 8 Aug 2015 17:02:59 +0000 (19:02 +0200)]
debian: update symbol versioning
Since all the work is now done in the `.map` file, we don't need to say
more here. As the symbols were previously unversioned, we have to start
both generations at 0.7.16.
lldpcli: rename "unconfigure lldp custom-tlvs" to "unconfigure lldp custom-tlv"
There was a bit of confusion regarding this command.
It's documented as 'unconfigure lldp custom-tlv', when in fact it's
'unconfigure lldp custom-tlvs' (plural).
That's also my fault, since I did not update much (or take care about)
documentation.
It seems simpler to rename the command as is in the doc than change
the doc.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Vincent Bernat [Sat, 25 Jul 2015 15:23:01 +0000 (17:23 +0200)]
netlink: use netlink to retrieve bridge/bond/vlan information
On Linux, Netlink is more efficient to get this kind of information. Use
it all the time, unless we are configured to run on old kernels. In this
case, fallback to the previous functions.
An old kernel is now < 2.6.32 (RHEL 6, Ubuntu Lucid, Debian Squeeze).
Vincent Bernat [Sat, 11 Jul 2015 20:39:13 +0000 (22:39 +0200)]
lldpcli: get chassis atom to query chassis-related information
Don't rely on the previously introduced compatibility layer. There is no
plan to deprecate this layer, but as an example, we prefer to show how
stuff should be done.
Vincent Bernat [Sat, 11 Jul 2015 18:41:44 +0000 (20:41 +0200)]
lib: bump ABI
Due to the absence of compatibility layer, all atom-related functions
are considered incompatible since they don't work on ports like they
used too. This is not strictly an ABI incompatibility, but we consider
the change important enough to do like it was.
This commit will be reverted once the compatibility layer is here.