diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-12-26 16:29:28 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-12-26 16:29:28 +0000 |
commit | 60d9e1375aedfa585e997f88b675157581ab736c (patch) | |
tree | 0568e5e431e16ef057c7fa4d9322fec9b4050ad0 | |
parent | Fixed issue where SIGUSR1 restarts would fail if private (diff) | |
download | openvpn-60d9e1375aedfa585e997f88b675157581ab736c.tar.xz |
Added daemon_start_time and daemon_pid environmental variables.
In management interface, added new ">CLIENT:ESTABLISHED" notification.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3763 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r-- | manage.c | 6 | ||||
-rw-r--r-- | manage.h | 3 | ||||
-rw-r--r-- | management/management-notes.txt | 13 | ||||
-rw-r--r-- | multi.c | 2 | ||||
-rw-r--r-- | options.c | 2 | ||||
-rw-r--r-- | version.m4 | 2 |
6 files changed, 22 insertions, 6 deletions
@@ -2115,9 +2115,13 @@ management_notify_client_needing_auth (struct management *management, void management_connection_established (struct management *management, - struct man_def_auth_context *mdac) + struct man_def_auth_context *mdac, + const struct env_set *es) { mdac->flags |= DAF_CONNECTION_ESTABLISHED; + msg (M_CLIENT, ">CLIENT:ESTABLISHED,%lu", mdac->cid); + man_output_extra_env (management); + man_output_env (es, true); } void @@ -355,7 +355,8 @@ void management_notify_client_needing_auth (struct management *management, const struct env_set *es); void management_connection_established (struct management *management, - struct man_def_auth_context *mdac); + struct man_def_auth_context *mdac, + const struct env_set *es); void management_notify_client_close (struct management *management, struct man_def_auth_context *mdac, diff --git a/management/management-notes.txt b/management/management-notes.txt index 6e721de..45bfda4 100644 --- a/management/management-notes.txt +++ b/management/management-notes.txt @@ -770,7 +770,16 @@ CLIENT notification types: >CLIENT:ENV,... >CLIENT:ENV,END -(2) Notify existing client disconnection. The environmental variables passed +(2) Notify successful client authentication and session initiation. + Called after CONNECT. + + >CLIENT:ESTABLISHED,{CID} + >CLIENT:ENV,name1=val1 + >CLIENT:ENV,name2=val2 + >CLIENT:ENV,... + >CLIENT:ENV,END + +(3) Notify existing client disconnection. The environmental variables passed are equivalent to those that would be passed to a --client-disconnect script. @@ -780,7 +789,7 @@ CLIENT notification types: >CLIENT:ENV,... >CLIENT:ENV,END -(3) Notify that a particular virtual address or subnet +(4) Notify that a particular virtual address or subnet is now associated with a specific client. >CLIENT:ADDRESS,{CID},{ADDR},{PRI} @@ -1698,7 +1698,7 @@ multi_connection_established (struct multi_context *m, struct multi_instance *mi #ifdef MANAGEMENT_DEF_AUTH if (management) - management_connection_established (management, &mi->context.c2.mda_context); + management_connection_established (management, &mi->context.c2.mda_context, mi->context.c2.es); #endif gc_free (&gc); @@ -795,6 +795,8 @@ setenv_settings (struct env_set *es, const struct options *o) setenv_int (es, "verb", o->verbosity); setenv_int (es, "daemon", o->daemon); setenv_int (es, "daemon_log_redirect", o->log); + setenv_unsigned (es, "daemon_start_time", time(NULL)); + setenv_int (es, "daemon_pid", openvpn_getpid()); #ifdef ENABLE_CONNECTION if (o->connection_list) @@ -1,5 +1,5 @@ dnl define the OpenVPN version -define(PRODUCT_VERSION,[2.1_rc15c]) +define(PRODUCT_VERSION,[2.1_rc15d]) dnl define the TAP version define(PRODUCT_TAP_ID,[tap0901]) define(PRODUCT_TAP_WIN32_MIN_MAJOR,[9]) |