Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.
Do not turn some compiler warnings into errors by default. This part was
copied from openbsc.git 34f012 ("Turn some compiler warnings into
errors"), where it was added before --enable-werror was available.
We build with --enable-werror during development and in CI. If the code
is built with a different compiler that throws additional warnings, it
should not stop the build.
Even with a completely empty config we still get the following output:
uptime: 1d 22:18:19
With this patch the sections are skipped if there are no entries and the
command no sysinfo can be used to skip displaying the system
Last strtok() returns chunk from last "," until end of strig. Since
openvpn sends a trailing new line + "END" string, that was being copied
into the remote port.
wireshark shows strings returned by OpenVPN management interface as an
aswer to "state" cmd contain no null character at the end. As a
consequence, osmo_strlcpy cannot be used since it calls strlen() on the
Probably previous implementation was harmless because we zero-fill msgb
buffers prior to filling them.
It's a connection towards localhost, so it doesn't hurt reconnecting in
a timely fashion, otherwise upon openvpn restart user needed to wait for
1 minute to see changes.
Setup disconnection callback and use it to properly track management
Requires: libosmo-netif I905adb2d6191216551a3bcdcd1aec1f96f01612a
This adds support for OpenVPN status probe which uses OpenVPN's
management interface (configured via 'management 127.0.0.1 1234' in
The output looks as follows:
status: management interface incompatible
status: management interface unavailable
We show tunnel's IP (if available) as well as remote (OpenVPN server
itself) address/port in addition to general connection status. If
management interface is unavailable it's reported as such. If we've
managed to establish connection with a given management interface but
are unable to obtain expected information than we report this
incompatibility as well.
Add generic host config struct and related helpers for TCP-based probes
and use them for ctrl probe.
This will be used in follow-up patch for OpenVPN probe as well.
In case of multiple ctrl-client entries in .cfg file it's impossible to
see which one is causing particular ctrl error. Fix this by introducing
macro wrapper for stderr logging which always show host:port relevant to
Use liboping (new dependency) to add 'ping XXX' entries support in .cfg
file, where XXX can be either IP address or FQDN.
latency: 20.4 ms
N. B: to gather actual ping statistic we have to be able to send ICMP
requests (have enough privileges to work with RAW sockets).
Moving configuration data from anonymous struct into shared header as a
preparation for ctrl logging improvements in follow-up patches.
Same files are available in other osmocom projects, otherwise configure
fails with "Please install autoconf-archive; re-run 'autoreconf -fi' for
it to take effect.".