Vincent Bernat [Tue, 8 Jul 2014 19:41:48 +0000 (21:41 +0200)]
log: info messages should be logged on syslog but not on first debug level
Without `-d`, syslog should log info messages. With `-d`, they should
not be displayed. With `-dd`, they should be displayed. This is an
amendment of the previous patch.
Sam Tannous [Tue, 8 Jul 2014 19:15:39 +0000 (15:15 -0400)]
lldpd: fix log_info
Currently none of the log_info msgs are getting
printed into syslog. vlog already does the right checks.
Remove the checks in log_info which is making all default log_info
prints no-ops
Also change severity of "interface reset timer" msg
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
Patrick McLean [Tue, 8 Jul 2014 18:40:15 +0000 (11:40 -0700)]
lldpd: whitelist sendto, poll, recvmsg and readv in seccomp sandbox
With privilege separation and seccomp enabled, the monitor thread was
dying due to seccomp errors, while leaving the child alive. This whitelists
some extra syscalls to allow the monitor process to stay alive.
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.
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 [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 [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 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 [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, 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 [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 [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()`.