From: Christian Hesse <m...@eworm.de> In non-TLS configuration we wait for the remote peer to connect before issuing "Initialization Sequence Completed". So prevent to time out by telling systemd service manager we are ready for now. Status will be "Non-TLS mode, ready for now. Waiting for peer..." and changes once the remote peer connects.
This fixes #801 (static key tunnels impossible to start via systemd) v2: Rebase on "move systemd specific code to platform.c" (commit 46e647933030da848774656029c4c4a1f204e2f1). Tested-by: Mantas Mikulėnas <graw...@gmail.com> Signed-off-by: Christian Hesse <m...@eworm.de> --- src/openvpn/openvpn.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openvpn/openvpn.c b/src/openvpn/openvpn.c index 888acda..ddcb9ed 100644 --- a/src/openvpn/openvpn.c +++ b/src/openvpn/openvpn.c @@ -73,6 +73,18 @@ tunnel_point_to_point(struct context *c) return; } + /* In non-TLS configuration we wait for the remote peer to connect + * before issuing "Initialization Sequence Completed". So prevent to + * time out by telling systemd service manager we are ready for now. + * Status will be "Non-TLS mode, ready for now. Waiting for peer..." + * and changes once the remote peer connects. */ + if (c->options.tls_client == false + && c->options.tls_server == false) + { + platform_notify("READY=1", + "STATUS=Non-TLS mode, ready for now. Waiting for peer..."); + } + /* main event loop */ while (true) { -- 2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel