From 344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 24 May 2008 23:26:11 +0000 Subject: Support asynchronous/deferred authentication in OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY plugin handler. See documentation in openvpn-plugin.h and example usage in plugin/defer/simple.c. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2969 e7ae566f-a301-0410-adde-c780ea21d3b5 --- forward.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'forward.c') diff --git a/forward.c b/forward.c index a38dd14..3e09c7f 100644 --- a/forward.c +++ b/forward.c @@ -83,13 +83,19 @@ check_tls_dowork (struct context *c) if (interval_test (&c->c2.tmp_int)) { - if (tls_multi_process - (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr, - get_link_socket_info (c), &wakeup)) + const int tmp_status = tls_multi_process + (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr, + get_link_socket_info (c), &wakeup); + if (tmp_status == TLSMP_ACTIVE) { update_time (); interval_action (&c->c2.tmp_int); } + else if (tmp_status == TLSMP_KILL) + { + c->sig->signal_received = SIGTERM; + c->sig->signal_text = "auth-control-exit"; + } interval_future_trigger (&c->c2.tmp_int, wakeup); } -- cgit