aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 08:45:09 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-06-11 08:45:09 +0000
commit90efcacba6378a4e29275cd6e9914d73d836a4a4 (patch)
treeda032ba71582994f9e1f2ed7162ba14f152cb7d7 /init.c
parentAdded support for building and linking with (diff)
downloadopenvpn-90efcacba6378a4e29275cd6e9914d73d836a4a4.tar.xz
Updated version to 2.1_rc7e.
Added client authentication and packet filtering capability to management interface. Extended packet filtering capability to work on both --dev tun and --dev tap tunnels. Updated valgrind-suppress file. Made "Linux ip addr del failed" error nonfatal. Amplified --client-cert-not-required warning. Added #pragma pack to proto.h. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2991 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r--init.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/init.c b/init.c
index 9d80d1a..97ecf7d 100644
--- a/init.c
+++ b/init.c
@@ -1558,6 +1558,10 @@ do_init_crypto_tls (struct context *c, const unsigned int flags)
to.plugins = c->plugins;
+#ifdef MANAGEMENT_DEF_AUTH
+ to.mda_context = &c->c2.mda_context;
+#endif
+
#if P2MP_SERVER
to.auth_user_pass_verify_script = options->auth_user_pass_verify_script;
to.auth_user_pass_verify_script_via_file = options->auth_user_pass_verify_script_via_file;
@@ -2356,7 +2360,7 @@ open_plugins (struct context *c, const bool import_options, int init_point)
{
unsigned int option_types_found = 0;
if (config.list[i] && config.list[i]->value)
- options_plugin_import (&c->options,
+ options_string_import (&c->options,
config.list[i]->value,
D_IMPORT_ERRORS|M_OPTERR,
OPT_P_DEFAULT & ~OPT_P_PLUGIN,
@@ -2452,21 +2456,19 @@ open_management (struct context *c)
{
if (c->options.management_addr)
{
+ unsigned int flags = c->options.management_flags;
+ if (c->options.mode == MODE_SERVER)
+ flags |= MF_SERVER;
if (management_open (management,
c->options.management_addr,
c->options.management_port,
c->options.management_user_pass,
- c->options.mode == MODE_SERVER,
- c->options.management_query_passwords,
c->options.management_log_history_cache,
c->options.management_echo_buffer_size,
c->options.management_state_buffer_size,
- c->options.management_hold,
- c->options.management_signal,
- c->options.management_forget_disconnect,
- c->options.management_client,
c->options.management_write_peer_info_file,
- c->options.remap_sigusr1))
+ c->options.remap_sigusr1,
+ flags))
{
management_set_state (management,
OPENVPN_STATE_CONNECTING,
@@ -2792,6 +2794,11 @@ close_instance (struct context *c)
/* close TUN/TAP device */
do_close_tun (c, false);
+#ifdef MANAGEMENT_DEF_AUTH
+ if (management)
+ management_notify_client_close (management, &c->c2.mda_context, NULL);
+#endif
+
#ifdef ENABLE_PF
pf_destroy_context (&c->c2.pf);
#endif