summaryrefslogtreecommitdiffstats
path: root/forward.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-24 23:26:11 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-24 23:26:11 +0000
commit344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 (patch)
tree8a4c3724971a0c81debc97d3bba62138aab3a247 /forward.c
parent4da783f3a502174ea31918171d2e530295f85f52 (diff)
downloadopenvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.gz
openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.xz
openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.zip
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
Diffstat (limited to 'forward.c')
-rw-r--r--forward.c12
1 files changed, 9 insertions, 3 deletions
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);
}