diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-11-21 21:46:53 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-11-21 21:46:53 +0100 |
commit | 0163093730b49291cd4c6353cee05f4ca780e948 (patch) | |
tree | e3b62ce803cab33eb738bdeda2be14e668955b5b /openvpn/src | |
parent | 1eedf7186d1667f06c4d21c0a84a05bd693a8e15 (diff) |
Update openvpn source code
Diffstat (limited to 'openvpn/src')
-rw-r--r-- | openvpn/src/openvpn/buffer.c | 29 | ||||
-rw-r--r-- | openvpn/src/openvpn/error.c | 9 | ||||
-rw-r--r-- | openvpn/src/openvpn/init.c | 2 | ||||
-rw-r--r-- | openvpn/src/openvpn/manage.h | 2 | ||||
-rw-r--r-- | openvpn/src/openvpn/openvpn.c | 2 | ||||
-rw-r--r-- | openvpn/src/openvpn/options.c | 8 | ||||
-rw-r--r-- | openvpn/src/openvpn/options.h | 2 | ||||
-rw-r--r-- | openvpn/src/openvpn/ssl.c | 4 |
8 files changed, 31 insertions, 27 deletions
diff --git a/openvpn/src/openvpn/buffer.c b/openvpn/src/openvpn/buffer.c index 56d14b1a..fb3b52d1 100644 --- a/openvpn/src/openvpn/buffer.c +++ b/openvpn/src/openvpn/buffer.c @@ -327,19 +327,28 @@ gc_malloc (size_t size, bool clear, struct gc_arena *a) #endif { void *ret; - struct gc_entry *e; - ASSERT (NULL != a); - + if (a) + { + struct gc_entry *e; #ifdef DMALLOC - e = (struct gc_entry *) openvpn_dmalloc (file, line, size + sizeof (struct gc_entry)); + e = (struct gc_entry *) openvpn_dmalloc (file, line, size + sizeof (struct gc_entry)); #else - e = (struct gc_entry *) malloc (size + sizeof (struct gc_entry)); + e = (struct gc_entry *) malloc (size + sizeof (struct gc_entry)); #endif - check_malloc_return (e); - ret = (char *) e + sizeof (struct gc_entry); - e->next = a->list; - a->list = e; - + check_malloc_return (e); + ret = (char *) e + sizeof (struct gc_entry); + e->next = a->list; + a->list = e; + } + else + { +#ifdef DMALLOC + ret = openvpn_dmalloc (file, line, size); +#else + ret = malloc (size); +#endif + check_malloc_return (ret); + } #ifndef ZERO_BUFFER_ON_ALLOC if (clear) #endif diff --git a/openvpn/src/openvpn/error.c b/openvpn/src/openvpn/error.c index 106213db..9fdd78b2 100644 --- a/openvpn/src/openvpn/error.c +++ b/openvpn/src/openvpn/error.c @@ -163,18 +163,17 @@ set_suppress_timestamps (bool suppressed) } void -set_parsable_output (bool parsable) +set_machine_readable_output (bool parsable) { - parsable_output = parsable; + machine_readable_output = parsable; } - void error_reset () { use_syslog = std_redir = false; suppress_timestamps = false; - parsable_output = false; + machine_readable_output = false; x_debug_level = 1; mute_cutoff = 0; mute_count = 0; @@ -346,7 +345,7 @@ void x_msg_va (const unsigned int flags, const char *format, va_list arglist) FILE *fp = msg_fp(flags); const bool show_usec = check_debug_level (DEBUG_LEVEL_USEC_TIME); - if (parsable_output) + if (machine_readable_output) { struct timeval tv; gettimeofday (&tv, NULL); diff --git a/openvpn/src/openvpn/init.c b/openvpn/src/openvpn/init.c index 7c9bf048..1beca959 100644 --- a/openvpn/src/openvpn/init.c +++ b/openvpn/src/openvpn/init.c @@ -3054,7 +3054,7 @@ do_close_ifconfig_pool_persist (struct context *c) static void do_inherit_env (struct context *c, const struct env_set *src) { - c->c2.es = env_set_create (&c->c2.gc); + c->c2.es = env_set_create (NULL); c->c2.es_owned = true; env_set_inherit (c->c2.es, src); } diff --git a/openvpn/src/openvpn/manage.h b/openvpn/src/openvpn/manage.h index f5a621b7..1c8dda69 100644 --- a/openvpn/src/openvpn/manage.h +++ b/openvpn/src/openvpn/manage.h @@ -34,7 +34,7 @@ #define MANAGEMENT_VERSION 1 #define MANAGEMENT_N_PASSWORD_RETRIES 3 -#define MANAGEMENT_LOG_HISTORY_INITIAL_SIZE 200 +#define MANAGEMENT_LOG_HISTORY_INITIAL_SIZE 100 #define MANAGEMENT_ECHO_BUFFER_SIZE 100 #define MANAGEMENT_STATE_BUFFER_SIZE 100 diff --git a/openvpn/src/openvpn/openvpn.c b/openvpn/src/openvpn/openvpn.c index a177d9e8..c0f2a9a2 100644 --- a/openvpn/src/openvpn/openvpn.c +++ b/openvpn/src/openvpn/openvpn.c @@ -175,7 +175,7 @@ openvpn_main (int argc, char *argv[]) gc_init (&c.gc); /* initialize environmental variable store */ - c.es = env_set_create (&c.gc); + c.es = env_set_create (NULL); #ifdef WIN32 set_win_sys_path_via_env (c.es); #endif diff --git a/openvpn/src/openvpn/options.c b/openvpn/src/openvpn/options.c index 89a5888d..77ccf107 100644 --- a/openvpn/src/openvpn/options.c +++ b/openvpn/src/openvpn/options.c @@ -342,7 +342,7 @@ static const char usage_message[] = "--log file : Output log to file which is created/truncated on open.\n" "--log-append file : Append log to file, or create file if nonexistent.\n" "--suppress-timestamps : Don't log timestamps to stdout/stderr.\n" - "--parsable-output : Always log timestamp, message flags to stdout/stderr.\n" + "--machine-readable-output : Always log timestamp, message flags to stdout/stderr.\n" "--writepid file : Write main process ID to file.\n" "--nice n : Change process priority (>0 = lower, <0 = higher).\n" "--echo [parms ...] : Echo parameters to log output.\n" @@ -4665,11 +4665,11 @@ add_option (struct options *options, options->suppress_timestamps = true; set_suppress_timestamps(true); } - else if (streq (p[0], "parsable-output")) + else if (streq (p[0], "machine-readable-output")) { VERIFY_PERMISSION (OPT_P_GENERAL); - options->parsable_output = true; - set_parsable_output(true); + options->machine_readable_output = true; + set_machine_readable_output(true); } else if (streq (p[0], "log-append") && p[1]) { diff --git a/openvpn/src/openvpn/options.h b/openvpn/src/openvpn/options.h index 4e97a192..dda9658a 100644 --- a/openvpn/src/openvpn/options.h +++ b/openvpn/src/openvpn/options.h @@ -305,7 +305,7 @@ struct options bool log; bool suppress_timestamps; - bool parsable_output; + bool machine_readable_output; int nice; int verbosity; int mute; diff --git a/openvpn/src/openvpn/ssl.c b/openvpn/src/openvpn/ssl.c index 58ba2384..4203fc5c 100644 --- a/openvpn/src/openvpn/ssl.c +++ b/openvpn/src/openvpn/ssl.c @@ -138,8 +138,6 @@ static const tls_cipher_name_pair tls_cipher_name_translation_table[] = { {"DHE-DSS-CAMELLIA128-SHA", "TLS-DHE-DSS-WITH-CAMELLIA-128-CBC-SHA"}, {"DHE-DSS-CAMELLIA256-SHA256", "TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA256"}, {"DHE-DSS-CAMELLIA256-SHA", "TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA"}, - {"DHE-DSS-DES-CBC3-SHA", "TLS-DHE-DSS-WITH-3DES-EDE-CBC-SHA"}, - {"DHE-DSS-DES-CBC-SHA", "TLS-DHE-DSS-WITH-DES-CBC-SHA"}, {"DHE-DSS-SEED-SHA", "TLS-DHE-DSS-WITH-SEED-CBC-SHA"}, {"DHE-RSA-AES128-GCM-SHA256", "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256"}, {"DHE-RSA-AES128-SHA256", "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256"}, @@ -151,8 +149,6 @@ static const tls_cipher_name_pair tls_cipher_name_translation_table[] = { {"DHE-RSA-CAMELLIA128-SHA", "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA"}, {"DHE-RSA-CAMELLIA256-SHA256", "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256"}, {"DHE-RSA-CAMELLIA256-SHA", "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA"}, - {"DHE-RSA-DES-CBC3-SHA", "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA"}, - {"DHE-RSA-DES-CBC-SHA", "TLS-DHE-RSA-WITH-DES-CBC-SHA"}, {"DHE-RSA-SEED-SHA", "TLS-DHE-RSA-WITH-SEED-CBC-SHA"}, {"DH-RSA-SEED-SHA", "TLS-DH-RSA-WITH-SEED-CBC-SHA"}, {"ECDH-ECDSA-AES128-GCM-SHA256", "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256"}, |