Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Smith 1600221949 treewide: remove FSF address
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.

Change-Id: I1f6db5f930fe97ce2336bce416470b807d7a57b7
2021-12-14 12:22:29 +01:00
Pau Espin d7321347b9 openvn: Fix missing break in last commit
Fixes: a3a92ecc5c
Change-Id: I6d5aeea965cc9d2f417be24dbeca0278d2f83567
2019-03-16 18:27:45 +01:00
Pau Espin 778ac848d3 openvpn: Remove useless conditional block in parse_state
tok != NULL is already checked in the for loop conditions.

Change-Id: I86e42e4537060b2ed8c860c0b71a225c5fe026c7
2019-03-15 20:58:13 +01:00
Pau Espin 3d13718ce7 openvpn: Fix garbage printed after remote port
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.

Change-Id: Ie24fed9c64bc482fd5af8bc9d03d37937c6471bf
2019-03-15 20:58:13 +01:00
Pau Espin a3a92ecc5c openvpn: log status description
Useful specially during RECONNECTING and EXITING to show reason of the
disconnect according to openvpn documentation.

Change-Id: I9f47f5d843bb550a4ce7956c89d31f06394201cf
2019-03-15 20:58:13 +01:00
Pau Espin b91013259f openvpn: String returned from openvpn is not null-terminated
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
source.
Probably previous implementation was harmless because we zero-fill msgb
buffers prior to filling them.

Change-Id: I4356dc08324a6d877c9e8112306570aabbf6e777
2019-03-15 20:58:13 +01:00
Pau Espin 0813db372b openvpn: Set reconnect timeout to a much lower value
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.

Change-Id: Ie9638120d1ce5bfa43bc7c15f05cf81de37624c5
2019-03-15 20:58:13 +01:00
Pau Espin 53f507372e openvpn: Improve logging and status information
New strings are far more comprehensive to understand the current status
during (re)connect to openvpn management socket.

Change-Id: Ifd0f821ed2d237740b6d3381a7190ad7058ce889
2019-03-15 20:58:04 +01:00
Max 6cbdcaf5bb OpenVPN: track interface disconnect
Setup disconnection callback and use it to properly track management
interface availability.

Change-Id: I11b8bc71c1e9cbbf992ee3b7c1c9aae6e6f697e0
Requires: libosmo-netif I905adb2d6191216551a3bcdcd1aec1f96f01612a
Related: SYS#2655
2019-02-21 10:29:48 +01:00
Max 9a852f2dd8 Add OpenVPN probe
This adds support for OpenVPN status probe which uses OpenVPN's
management interface (configured via 'management 127.0.0.1 1234' in
OpenVPN's config).

The output looks as follows:
...
  OpenVPN
    127.0.0.1:1234
      status: CONNECTED
      tunnel: 10.8.0.15
      remote: 144.76.43.77:1194
    localhost:4242
      status: management interface incompatible
    127.0.0.1:4444
      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.

Related: SYS#2655
Change-Id: I4493e19b9a09dcebd289457eacd1719f7f8cc31c
2019-02-07 17:38:19 +01:00