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.
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 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.
Vincent Bernat [Sat, 11 Jul 2015 18:04:12 +0000 (20:04 +0200)]
lib: ability to get and query local chassis
Up until now, to get information about the local chassis, we had to get
one interface and query the associated local port, then get chassis
information out of it.
With this change, a dedicated `lldpctl_get_local_chassis()` function is
provided and returns a chassis atom. All the chassis-related properties
are moved to this kind of atom. We also add a `lldpctl_k_port_chassis`
key to get the chassis associated to a port.
Left for next commits:
- lldpcli hasn't been updated
- compatibility layer to query chassis-related properties from port
Vincent Bernat [Mon, 25 May 2015 17:36:34 +0000 (19:36 +0200)]
osx: ensure pre/postinstall scripts are created correctly
Because we declare the scripts/*install target in `edit.am` and in
`Makefile.am`, only one of them is used. With automake, it doesn't seem
possible to easily extend a target. Instead, do the chmod just before we
need it.
Vincent Bernat [Thu, 21 May 2015 06:45:55 +0000 (08:45 +0200)]
lib: don't use priority with constructor
It is not supported on older versions of gcc. Like the one in RHEL 5. It
should not matter for our case as atoms and builders can be added in any
order. Cc @commodo for confirmation.
Vincent Bernat [Wed, 20 May 2015 21:44:21 +0000 (23:44 +0200)]
build: don't use -Wl,-pie
This flag seems to work when running on i386 on Linux but isn't handled
correctly by libtool and liblldpctl.so ends being without any
symbol. Use -pie only and try an up-to-date libtoolize on OSX to see if
it performs better.
Vincent Bernat [Wed, 20 May 2015 20:35:20 +0000 (22:35 +0200)]
build: require json-c >= 0.10
`json_object_object_get_ex` is only available from this version. json-c
name has been introduced from 0.11, so we can safely assume that with
this name, we have the right version. Do the checks only on old names.