aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-03-20Bump version: 0.0.1.66-d4c3-dirty → 0.1.00.1.0Pau Espin Pedrol1-0/+80
Change-Id: Ie98bb286d9333158985ddb80edf7208d69702d73
2019-03-20Add debian packaging contentPau Espin Pedrol7-0/+183
Change-Id: I2bcacca040364f77aa6b17edf53acf53c820c17b
2019-03-19Makefile.am: Add missing bits to have make release workingPau Espin Pedrol1-0/+2
Change-Id: I2758561ff2b08e33042161253a3bd36ce73bf259
2019-03-19Add vty option to print output of shell cmd on every poll stepPau Espin Pedrol5-1/+185
Change-Id: I005773b75f81fa5f6c90f53af508fc6debea208b
2019-03-16openvn: Fix missing break in last commitPau Espin Pedrol1-0/+1
Fixes: a3a92ecc5c6208e495a45b0061ae7ef1b0477622 Change-Id: I6d5aeea965cc9d2f417be24dbeca0278d2f83567
2019-03-15openvpn: Remove useless conditional block in parse_statePau Espin Pedrol1-19/+18
tok != NULL is already checked in the for loop conditions. Change-Id: I86e42e4537060b2ed8c860c0b71a225c5fe026c7
2019-03-15openvpn: Fix garbage printed after remote portPau Espin Pedrol1-3/+18
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-15openvpn: log status descriptionPau Espin Pedrol1-1/+5
Useful specially during RECONNECTING and EXITING to show reason of the disconnect according to openvpn documentation. Change-Id: I9f47f5d843bb550a4ce7956c89d31f06394201cf
2019-03-15openvpn: String returned from openvpn is not null-terminatedPau Espin Pedrol1-3/+5
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-15openvpn: Set reconnect timeout to a much lower valuePau Espin Pedrol1-1/+1
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-15openvpn: Improve logging and status informationPau Espin Pedrol1-5/+5
New strings are far more comprehensive to understand the current status during (re)connect to openvpn management socket. Change-Id: Ifd0f821ed2d237740b6d3381a7190ad7058ce889
2019-03-15Integrate sleeping/printing loop into osmo main loopPau Espin Pedrol1-19/+27
Among other possibles issue, it should avoid sporadic print loop hanging if no events are fired in osmocom main loop. Change-Id: Ie2f0983eaf75826483b5b70f58b4d4acb842d6ea
2019-02-22Update config exampleMax1-0/+2
Add OpenVPN and ping probe entries to example config. Change-Id: I78025027d48a1213b2a23252c8261d9cb4564027 Related: SYS#2655
2019-02-22osmo-sysmon -h: s/OsmoHLR/osmo-sysmon/Oliver Smith1-1/+1
Fix program name in help output. Change-Id: I45d4e43b92833a22ae31d1cdc2b4d397f572ca34
2019-02-21OpenVPN: track interface disconnectMax2-3/+17
Setup disconnection callback and use it to properly track management interface availability. Change-Id: I11b8bc71c1e9cbbf992ee3b7c1c9aae6e6f697e0 Requires: libosmo-netif I905adb2d6191216551a3bcdcd1aec1f96f01612a Related: SYS#2655
2019-02-07Add OpenVPN probeMax8-1/+342
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-07Introduce generic host config and related helpersMax6-38/+133
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. Change-Id: Ie321655a92cdbefbfaa056ac0d583397c83beccb
2019-02-06ctrl: log host/port on errorsMax1-16/+24
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 the error. Change-Id: I788d51359965a66c54075a3971aa7824c3bfb0bf Related: SYS#2655
2019-02-06Install signal handlers before processing configMax1-4/+4
It's easier to troubleshoot vty-related issues when we can send signals to obtain talloc report. Change-Id: I6dd1ad55a227db08595d844008be86f648fa92c1
2019-01-31jenkins.sh: remove obsolete commentsMax1-3/+2
Change-Id: Ia2b3769811e9409d99f3698c490f6e3abe6a3c12
2019-01-31Add ping probe supportMax5-2/+281
Use liboping (new dependency) to add 'ping XXX' entries support in .cfg file, where XXX can be either IP address or FQDN. Sample output: ... ping ya.ru IP: 2a02:6b8::2:242 dropped: 3/3 8.8.8.8 IP: 8.8.8.8 dropped: 0/3 latency: 20.4 ms TTL: 120 ... N. B: to gather actual ping statistic we have to be able to send ICMP requests (have enough privileges to work with RAW sockets). Related: SYS#2655 Change-Id: Ife32540b532fb54368f63c78fb7837b84d4e8c76
2019-01-30Update Makefile.amMax2-9/+8
The simple_ctrl.c is used by 2 independent binaries. Let's build it as a convenience libtool library [1] to make it easier to add further external dependencies in future. While at it, also move osmo-sysmon dependencies to program-specific _CFLAGS from generic one. [1] https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html Change-Id: Idfaba17b54983709278e1c24bf55edbbb4abd961
2019-01-28ctrl: separate config structureMax2-8/+11
Moving configuration data from anonymous struct into shared header as a preparation for ctrl logging improvements in follow-up patches. Change-Id: I3520e14ca6e1b8e270dbd4b1bf2378fe486991ce Related: SYS#2655
2019-01-27Drop unused parameterMax7-21/+21
value_node_add() ignores it's first argument - let's drop it to make code more compact. Change-Id: I17c2fed4049e1c83307feda001aefc006dfbe6a3
2018-12-20Move shared libs into common LDADDMax1-8/+3
Change-Id: I8b2f2cd60426cf3b52dd463959a48fd7619cfcce
2018-12-13Merge "Add cmdline option parsing support"Pau Espin Pedrol1-4/+95
2018-12-13Merge "Move source code to src subdir"Harald Welte14-56/+56
2018-12-12Add cmdline option parsing supportPau Espin Pedrol1-4/+95
Change-Id: I742974bd1440b09b49d26703c13361dd1c41008b
2018-12-12Move source code to src subdirPau Espin Pedrol14-56/+56
Change-Id: I1aa2893e2b274f8d087a0d2f126486cd4afcbdfe
2018-12-12Add m4 missing files to fix buildPau Espin Pedrol3-0/+79
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.". Change-Id: Iabe3207fff8f076a3f4ddc81720bb7fdc671a46c
2018-12-08Merge "Add OpenVPN status helper example from corresponding ticket"Harald Welte1-0/+124
2018-11-27fix file descriptor leak in osysmon_file_readStefan Sperling1-2/+4
Don't forget to close the file which was opened at the beginning of this function's scope. Found by Coverity. Change-Id: Ie1b5734748438c6d785cd96dfa9af6303cd102da Related: CID#189756
2018-11-22Add OpenVPN status helper example from corresponding ticketMax1-0/+124
Change-Id: I912d943cdc7024e3ddd92e0a122ac2dd4fbf0a18 Related: SYS#2655
2018-11-22Expand default configMax1-1/+10
* add file watcher example * add more ctrl variables Change-Id: I25ed3936ddaae8452ba9dde325cb3e822b739def Related: SYS#2655
2018-11-22Update default configMax6-1/+18
Rename default config to match the binary name and add config exampe. Change-Id: Iabfc78c95e904af7372f10c195b2b979675d34f3 Related: SYS#2655
2018-11-22Report config file name on errorMax1-1/+1
Change-Id: If3f97452e4defb5c8dd540dd75045d37824fb305
2018-11-22Update gitignoreMax1-0/+1
Change-Id: I2e63890653240b641b3c8b4b92b76b3833667ff3
2018-11-22Add git-review configMax1-0/+3
Change-Id: Ie49cfcf38cc28a42c97eb4119231d8d885443a26
2018-07-24git-version-gen: Don't check for .git directoryDaniel Willmann1-2/+2
This check is not in all our repos that use git-version-gen. Indeed it seems to be a leftover of openbsc where I think it wanted to ensure being called in the openbsc subfolder or something? libosmocore e.g. doesn't have it. In any case .git being a directory is not always true (if using git worktree) so remove this check. Change-Id: I414111b27db9951314e6bc7eff8bc1f10775b3ff
2018-06-05Makefile.am: Fix typoMartin Hauke1-1/+1
Change-Id: I392cf453087230d848bafe959544646e68df8070
2018-06-05Disconnect properly on errors so we can reconnectDaniel Willmann1-0/+9
Change-Id: Id134be34a24e91a4c0b8a8d11cf4df9593dae687
2018-06-05Add zero termination char to received ctrl cmd messageDaniel Willmann1-4/+7
The terminating NULL byte is not part of the ctrl message, so add it afterwards. Change-Id: Ieaa9b3e2516d301ba45b6f3ec61870e928ed0cc6
2018-06-05Remove unused last_value handling codeDaniel Willmann1-16/+1
Change-Id: I14cc5883af8ae73bc462ed714ef38c8ee1444cc6
2018-06-05add contrib/jenkins.sh for build verificationHarald Welte1-0/+47
Change-Id: Ic037ad0bdeab7140e53ed35da7e20eab84ecb429
2018-06-05simple_ctrl: Check for NULL return of simple_ctrl_xceiveHarald Welte1-0/+2
Change-Id: Ice1e0b9819d8e24770bc57295dd1455f38c37bd5
2018-06-05Merge "Remove unused function"Harald Welte1-9/+0
2018-06-05Fix compilation issue on my machine, remove unused includeDaniel Willmann1-1/+0
Change-Id: Id4042804e3c490daa61bf6ec06c13838d68d2f68
2018-06-05Remove unused functionDaniel Willmann1-9/+0
Change-Id: I0b5d59bf3c98d1199e710eec310d041fa15994b9
2018-06-04rename to osmo-sysmonHarald Welte2-4/+4
2018-06-04add .gitignore file0.1.1Harald Welte1-0/+60