You can subscribe to this list here.
| 2002 | Jan | Feb | Mar | Apr (24) | May (14) | Jun (29) | Jul (33) | Aug (3) | Sep (8) | Oct (18) | Nov (1) | Dec (10) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 | Jan (3) | Feb (33) | Mar (7) | Apr (28) | May (30) | Jun (5) | Jul (10) | Aug (7) | Sep (32) | Oct (41) | Nov (20) | Dec (10) |
| 2004 | Jan (24) | Feb (18) | Mar (57) | Apr (40) | May (55) | Jun (48) | Jul (77) | Aug (15) | Sep (56) | Oct (80) | Nov (74) | Dec (52) |
| 2005 | Jan (38) | Feb (42) | Mar (39) | Apr (56) | May (79) | Jun (73) | Jul (16) | Aug (23) | Sep (68) | Oct (77) | Nov (52) | Dec (27) |
| 2006 | Jan (27) | Feb (18) | Mar (51) | Apr (62) | May (28) | Jun (50) | Jul (36) | Aug (33) | Sep (47) | Oct (50) | Nov (77) | Dec (13) |
| 2007 | Jan (15) | Feb (8) | Mar (14) | Apr (18) | May (25) | Jun (16) | Jul (16) | Aug (19) | Sep (32) | Oct (17) | Nov (5) | Dec (5) |
| 2008 | Jan (64) | Feb (25) | Mar (25) | Apr (6) | May (28) | Jun (20) | Jul (10) | Aug (27) | Sep (28) | Oct (59) | Nov (37) | Dec (43) |
| 2009 | Jan (40) | Feb (25) | Mar (12) | Apr (57) | May (46) | Jun (29) | Jul (39) | Aug (10) | Sep (20) | Oct (42) | Nov (50) | Dec (57) |
| 2010 | Jan (82) | Feb (165) | Mar (256) | Apr (260) | May (36) | Jun (87) | Jul (53) | Aug (89) | Sep (107) | Oct (51) | Nov (88) | Dec (117) |
| 2011 | Jan (69) | Feb (60) | Mar (113) | Apr (71) | May (67) | Jun (90) | Jul (88) | Aug (90) | Sep (48) | Oct (64) | Nov (69) | Dec (118) |
| 2012 | Jan (49) | Feb (528) | Mar (351) | Apr (190) | May (238) | Jun (193) | Jul (104) | Aug (100) | Sep (57) | Oct (41) | Nov (47) | Dec (51) |
| 2013 | Jan (94) | Feb (57) | Mar (96) | Apr (105) | May (77) | Jun (102) | Jul (27) | Aug (81) | Sep (32) | Oct (53) | Nov (127) | Dec (65) |
| 2014 | Jan (113) | Feb (59) | Mar (104) | Apr (259) | May (70) | Jun (70) | Jul (146) | Aug (45) | Sep (58) | Oct (149) | Nov (77) | Dec (83) |
| 2015 | Jan (53) | Feb (66) | Mar (86) | Apr (50) | May (135) | Jun (76) | Jul (151) | Aug (83) | Sep (97) | Oct (262) | Nov (245) | Dec (231) |
| 2016 | Jan (131) | Feb (233) | Mar (97) | Apr (138) | May (221) | Jun (254) | Jul (92) | Aug (248) | Sep (168) | Oct (275) | Nov (477) | Dec (445) |
| 2017 | Jan (218) | Feb (217) | Mar (146) | Apr (172) | May (216) | Jun (252) | Jul (164) | Aug (192) | Sep (190) | Oct (143) | Nov (255) | Dec (182) |
| 2018 | Jan (295) | Feb (164) | Mar (113) | Apr (147) | May (64) | Jun (262) | Jul (184) | Aug (90) | Sep (69) | Oct (364) | Nov (102) | Dec (101) |
| 2019 | Jan (119) | Feb (64) | Mar (64) | Apr (102) | May (57) | Jun (154) | Jul (84) | Aug (81) | Sep (76) | Oct (102) | Nov (233) | Dec (89) |
| 2020 | Jan (38) | Feb (170) | Mar (155) | Apr (172) | May (120) | Jun (223) | Jul (461) | Aug (227) | Sep (268) | Oct (113) | Nov (56) | Dec (124) |
| 2021 | Jan (121) | Feb (48) | Mar (334) | Apr (345) | May (207) | Jun (136) | Jul (71) | Aug (112) | Sep (122) | Oct (173) | Nov (184) | Dec (223) |
| 2022 | Jan (197) | Feb (206) | Mar (156) | Apr (212) | May (192) | Jun (170) | Jul (143) | Aug (380) | Sep (182) | Oct (148) | Nov (128) | Dec (269) |
| 2023 | Jan (248) | Feb (196) | Mar (264) | Apr (36) | May (123) | Jun (66) | Jul (120) | Aug (48) | Sep (157) | Oct (198) | Nov (300) | Dec (273) |
| 2024 | Jan (271) | Feb (147) | Mar (207) | Apr (78) | May (107) | Jun (168) | Jul (151) | Aug (51) | Sep (438) | Oct (221) | Nov (302) | Dec (357) |
| 2025 | Jan (451) | Feb (219) | Mar (326) | Apr (232) | May (306) | Jun (181) | Jul (452) | Aug (282) | Sep (620) | Oct (793) | Nov (682) | Dec |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| | | | 1 | 2 | 3 (4) | 4 (8) |
| 5 (11) | 6 (5) | 7 (12) | 8 (14) | 9 (6) | 10 (5) | 11 (1) |
| 12 (1) | 13 (15) | 14 (10) | 15 | 16 (20) | 17 (18) | 18 (9) |
| 19 (2) | 20 (27) | 21 (74) | 22 (32) | 23 (9) | 24 (15) | 25 (8) |
| 26 (12) | 27 (32) | 28 (47) | 29 (131) | | | |
| From: David S. <ope...@to...> - 2012-02-05 16:14:11 |
On 05/02/12 16:57, Gert Doering wrote: > Hi, > > On Sun, Feb 05, 2012 at 12:51:25PM +0100, Adriaan de Jong wrote: >> Signed-off-by: Adriaan de Jong<de...@fo...> >> --- >> buffer.c | 29 ++++++++++------------------- >> 1 files changed, 10 insertions(+), 19 deletions(-) >> >> diff --git a/buffer.c b/buffer.c >> index 2f8e4b8..c39bbcb 100644 >> --- a/buffer.c >> +++ b/buffer.c >> @@ -310,28 +310,19 @@ gc_malloc (size_t size, bool clear, struct gc_arena *a) >> #endif >> { >> void *ret; >> - if (a) >> - { >> - struct gc_entry *e; > > NACK on that. We discovered that there are use cases where "second-level" > callers pass NULL, seemingly on purpose to allocate global memory instead > of "in the GC". > > main(), in openvpn.c: > > /* initialize environmental variable store */ > c.es = env_set_create (NULL); > > ... which calls into misc.c: > > struct env_set * > env_set_create (struct gc_arena *gc) > { > struct env_set *es; > ALLOC_OBJ_CLEAR_GC (es, struct env_set, gc); > es->list = NULL; > es->gc = gc; > return es; > } > > ... and boom, assert() fail. > > > Adriaan saw the crash ("my nice OpenBSD test run!!!") and promised to work > on this on the way back in the train. But should this actually call gc_malloc() in this case? gc_malloc is for things which are supposed to be tackled by the garbage collector. Things aren't too easy here - but I'd rather see us cleaning up this instead of making gc_malloc() vague in its purpose. $ git grep env_set_create init.c: c->c2.es = env_set_create (NULL); manage.c: struct env_set *es = env_set_create (&gc); misc.c:env_set_create (struct gc_arena *gc) misc.h:struct env_set *env_set_create (struct gc_arena *gc); multi.c: es = env_set_create (&gc); openvpn.c: c.es = env_set_create (NULL); There are two places where env_set_create() is called with NULL. Let's rather see if we can provide a gc_arena pointer those places instead. Or do something which is more clear in regards to memory allocation in env_set_create(). kind regards, David Sommerseth |
| From: Gert D. <ge...@gr...> - 2012-02-05 15:57:39 |
Hi, On Sun, Feb 05, 2012 at 12:51:25PM +0100, Adriaan de Jong wrote: > Signed-off-by: Adriaan de Jong <de...@fo...> > --- > buffer.c | 29 ++++++++++------------------- > 1 files changed, 10 insertions(+), 19 deletions(-) > > diff --git a/buffer.c b/buffer.c > index 2f8e4b8..c39bbcb 100644 > --- a/buffer.c > +++ b/buffer.c > @@ -310,28 +310,19 @@ gc_malloc (size_t size, bool clear, struct gc_arena *a) > #endif > { > void *ret; > - if (a) > - { > - struct gc_entry *e; NACK on that. We discovered that there are use cases where "second-level" callers pass NULL, seemingly on purpose to allocate global memory instead of "in the GC". main(), in openvpn.c: /* initialize environmental variable store */ c.es = env_set_create (NULL); ... which calls into misc.c: struct env_set * env_set_create (struct gc_arena *gc) { struct env_set *es; ALLOC_OBJ_CLEAR_GC (es, struct env_set, gc); es->list = NULL; es->gc = gc; return es; } ... and boom, assert() fail. Adriaan saw the crash ("my nice OpenBSD test run!!!") and promised to work on this on the way back in the train. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany ge...@gr... fax: +49-89-35655025 ge...@ne... |
| From: Gert D. <ge...@gr...> - 2012-02-05 15:54:37 |
Hi, On Sun, Feb 05, 2012 at 04:10:06PM +0100, Paul Bakker wrote: > Hi OpenVPN Devel.. > > As promised ;) I'm now subscribed to the OpenVPN devel list. Cool, welcome! > So if you need me for any questions related to PolarSSL, just mail.. So is the blowfish support already finished? ;-) gert, having too much time at the airport (but not enough to seriously start hacking) -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany ge...@gr... fax: +49-89-35655025 ge...@ne... |
| From: Paul B. <p.j...@po...> - 2012-02-05 15:50:18 |
Hi OpenVPN Devel.. As promised ;) I'm now subscribed to the OpenVPN devel list. So if you need me for any questions related to PolarSSL, just mail.. Regards, Paul Bakker Maintainer PolarSSL (http://polarssl.org) |
| From: Gert D. <ge...@gr...> - 2012-02-05 15:48:59 |
Hi, On Sun, Feb 05, 2012 at 03:02:40PM +0100, David Sommerseth wrote: > >as promised :-) - it now passes all my t_client.rc tests, and smells > >a lot less funny. We now might even throw out all these weird > >#ifdefs from tun.h... > > Maybe an attachment would be nice? ;-) And I thought you could just fetch this from the git repo on my laptop (suspended to disk and turned off, of course!). Well, that's what you get when debugging assert() crashes instead concentrating on your e-mail :-) gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany ge...@gr... fax: +49-89-35655025 ge...@ne... |
| From: David S. <ope...@to...> - 2012-02-05 14:01:01 |
On 04/02/12 18:21, Gert Doering wrote: > Hi, > > as discussed today. Pretty much cut-and-paste from the ipv4 counterparts. > > gert ACK. Applied to master on -stable and -testing. commit 04d66ef064d5ac1ade4b30329b87239aac95d821 Author: Gert Doering <ge...@fb...> Date: Sat Feb 4 18:18:45 2012 +0100 Document IPv6-related environment variables. Signed-off-by: Gert Doering <ge...@gr...> Acked-by: David Sommerseth <da...@re...> Signed-off-by: David Sommerseth <da...@re...> kind regards, David Sommerseth |
| From: Gert D. <ge...@gr...> - 2012-02-05 13:16:12 |
Hi, as promised :-) - it now passes all my t_client.rc tests, and smells a lot less funny. We now might even throw out all these weird #ifdefs from tun.h... gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany ge...@gr... fax: +49-89-35655025 ge...@ne... |
| From: Heiko H. <hei...@so...> - 2012-02-05 13:04:58 |
During discussion on FOSDEM 2012 it was decided that proxy auto detection is best done in the GUI as it's highly platform specific and shouldn't be handled in openvpn itself for every supported platform in openvpn itself. This removes --auto-proxy from openvpn. Signed-off-by: Heiko Hund <hei...@so...> --- init.c | 10 +-- openvpn.8 | 12 --- options.c | 40 +---------- options.h | 4 - proxy.c | 242 +------------------------------------------------------------ proxy.h | 27 +------- socks.c | 15 +---- socks.h | 3 +- 8 files changed, 11 insertions(+), 342 deletions(-) diff --git a/init.c b/init.c index 525f441..c60a2e9 100644 --- a/init.c +++ b/init.c @@ -492,11 +492,10 @@ init_proxy_dowork (struct context *c) uninit_proxy_dowork (c); #ifdef ENABLE_HTTP_PROXY - if (c->options.ce.http_proxy_options || c->options.auto_proxy_info) + if (c->options.ce.http_proxy_options) { /* Possible HTTP proxy user/pass input */ - c->c1.http_proxy = http_proxy_new (c->options.ce.http_proxy_options, - c->options.auto_proxy_info); + c->c1.http_proxy = http_proxy_new (c->options.ce.http_proxy_options); if (c->c1.http_proxy) { did_http = true; @@ -506,13 +505,12 @@ init_proxy_dowork (struct context *c) #endif #ifdef ENABLE_SOCKS - if (!did_http && (c->options.ce.socks_proxy_server || c->options.auto_proxy_info)) + if (!did_http && c->options.ce.socks_proxy_server) { c->c1.socks_proxy = socks_proxy_new (c->options.ce.socks_proxy_server, c->options.ce.socks_proxy_port, c->options.ce.socks_proxy_authfile, - c->options.ce.socks_proxy_retry, - c->options.auto_proxy_info); + c->options.ce.socks_proxy_retry); if (c->c1.socks_proxy) { c->c1.socks_proxy_owned = true; diff --git a/openvpn.8 b/openvpn.8 index 00acd01..26a15e2 100644 --- a/openvpn.8 +++ b/openvpn.8 @@ -482,18 +482,6 @@ as the number of retries of connection attempt (default=infinite). .\"********************************************************* .TP -.B \-\-auto-proxy -Try to sense HTTP or SOCKS proxy settings automatically. -If no settings are present, a direct connection will be attempted. -If both HTTP and SOCKS settings are present, HTTP will be preferred. -If the HTTP proxy server requires a password, it will be queried from -stdin or the management interface. If the underlying OS doesn't support an API for -returning proxy settings, a direct connection will be attempted. -Currently, only Windows clients support this option via the -InternetQueryOption API. -This option exists in OpenVPN 2.1 or higher. -.\"********************************************************* -.TP .B \-\-show-proxy-settings Show sensed HTTP or SOCKS proxy settings. Currently, only Windows clients support this option. diff --git a/options.c b/options.c index 6b8ae22..6f4b3df 100644 --- a/options.c +++ b/options.c @@ -124,10 +124,6 @@ static const char usage_message[] = " between connection retries (default=%d).\n" "--connect-timeout n : For --proto tcp-client, connection timeout (in seconds).\n" "--connect-retry-max n : Maximum connection attempt retries, default infinite.\n" -#ifdef GENERAL_PROXY_SUPPORT - "--auto-proxy : Try to sense proxy settings (or lack thereof) automatically.\n" - "--show-proxy-settings : Show sensed proxy settings.\n" -#endif #ifdef ENABLE_HTTP_PROXY "--http-proxy s p [up] [auth] : Connect to remote host\n" " through an HTTP proxy at address s and port p.\n" @@ -2053,8 +2049,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne msg (M_USAGE, "--remote MUST be used in TCP Client mode"); #ifdef ENABLE_HTTP_PROXY - if ((ce->http_proxy_options || options->auto_proxy_info) && ce->proto != PROTO_TCPv4_CLIENT) - msg (M_USAGE, "--http-proxy or --auto-proxy MUST be used in TCP Client mode (i.e. --proto tcp-client)"); + if ((ce->http_proxy_options) && ce->proto != PROTO_TCPv4_CLIENT) + msg (M_USAGE, "--http-proxy MUST be used in TCP Client mode (i.e. --proto tcp-client)"); #endif #if defined(ENABLE_HTTP_PROXY) && defined(ENABLE_SOCKS) @@ -4890,38 +4886,6 @@ add_option (struct options *options, options->proto_force = proto_force; options->force_connection_list = true; } -#ifdef GENERAL_PROXY_SUPPORT - else if (streq (p[0], "auto-proxy")) - { - char *error = NULL; - - VERIFY_PERMISSION (OPT_P_GENERAL); - options->auto_proxy_info = get_proxy_settings (&error, &options->gc); - if (error) - msg (M_WARN, "PROXY: %s", error); - } - else if (streq (p[0], "show-proxy-settings")) - { - struct auto_proxy_info *pi; - char *error = NULL; - - VERIFY_PERMISSION (OPT_P_GENERAL); - pi = get_proxy_settings (&error, &options->gc); - if (pi) - { - msg (M_INFO|M_NOPREFIX, "HTTP Server: %s", np(pi->http.server)); - msg (M_INFO|M_NOPREFIX, "HTTP Port: %d", pi->http.port); - msg (M_INFO|M_NOPREFIX, "SOCKS Server: %s", np(pi->socks.server)); - msg (M_INFO|M_NOPREFIX, "SOCKS Port: %d", pi->socks.port); - } - if (error) - msg (msglevel, "Proxy error: %s", error); -#ifdef WIN32 - show_win_proxy_settings (M_INFO|M_NOPREFIX); -#endif - openvpn_exit (OPENVPN_EXIT_STATUS_GOOD); /* exit point */ - } -#endif /* GENERAL_PROXY_SUPPORT */ #ifdef ENABLE_HTTP_PROXY else if (streq (p[0], "http-proxy") && p[1]) { diff --git a/options.h b/options.h index 831d4f6..8f22afd 100644 --- a/options.h +++ b/options.h @@ -214,10 +214,6 @@ struct options bool force_connection_list; #endif -#ifdef GENERAL_PROXY_SUPPORT - struct auto_proxy_info *auto_proxy_info; -#endif - #if HTTP_PROXY_FALLBACK bool http_proxy_fallback; struct http_proxy_options *http_proxy_override; diff --git a/proxy.c b/proxy.c index 5e74af2..4bb936f 100644 --- a/proxy.c +++ b/proxy.c @@ -415,47 +415,11 @@ get_pa_var (const char *key, const char *pa, struct gc_arena *gc) } struct http_proxy_info * -http_proxy_new (const struct http_proxy_options *o, - struct auto_proxy_info *auto_proxy_info) +http_proxy_new (const struct http_proxy_options *o) { struct http_proxy_info *p; struct http_proxy_options opt; - if (auto_proxy_info) - { - if (o && o->server) - { - /* if --http-proxy explicitly given, disable auto-proxy */ - auto_proxy_info = NULL; - } - else - { - /* if no --http-proxy explicitly given and no auto settings, fail */ - if (!auto_proxy_info->http.server) - return NULL; - - if (o) - { - opt = *o; - } - else - { - CLEAR (opt); - - /* These settings are only used for --auto-proxy */ - opt.timeout = 5; - opt.http_version = "1.0"; - } - - opt.server = auto_proxy_info->http.server; - opt.port = auto_proxy_info->http.port; - if (!opt.auth_retry) - opt.auth_retry = PAR_ALL; - - o = &opt; - } - } - if (!o || !o->server) msg (M_FATAL, "HTTP_PROXY: server not specified"); @@ -521,7 +485,7 @@ establish_http_proxy_passthru (struct http_proxy_info *p, bool ret = false; bool processed = false; - /* get user/pass if not previously given or if --auto-proxy is being used */ + /* get user/pass if not previously given */ if (p->auth_method == HTTP_AUTH_BASIC || p->auth_method == HTTP_AUTH_DIGEST || p->auth_method == HTTP_AUTH_NTLM) @@ -920,205 +884,3 @@ establish_http_proxy_passthru (struct http_proxy_info *p, static void dummy(void) {} #endif /* ENABLE_HTTP_PROXY */ -#ifdef GENERAL_PROXY_SUPPORT - -#ifdef WIN32 - -#if 0 -char * -get_windows_internet_string (const DWORD dwOption, struct gc_arena *gc) -{ - DWORD size = 0; - char *ret = NULL; - - /* Initially, get size of return buffer */ - InternetQueryOption (NULL, dwOption, NULL, &size); - if (size) - { - /* Now get actual info */ - ret = (INTERNET_PROXY_INFO *) gc_malloc (size, false, gc); - if (!InternetQueryOption (NULL, dwOption, (LPVOID) ret, &size)) - ret = NULL; - } - return ret; -} -#endif - -static INTERNET_PROXY_INFO * -get_windows_proxy_settings (struct gc_arena *gc) -{ - DWORD size = 0; - INTERNET_PROXY_INFO *ret = NULL; - - /* Initially, get size of return buffer */ - InternetQueryOption (NULL, INTERNET_OPTION_PROXY, NULL, &size); - if (size) - { - /* Now get actual info */ - ret = (INTERNET_PROXY_INFO *) gc_malloc (size, false, gc); - if (!InternetQueryOption (NULL, INTERNET_OPTION_PROXY, (LPVOID) ret, &size)) - ret = NULL; - } - return ret; -} - -static const char * -parse_windows_proxy_setting (const char *str, struct auto_proxy_info_entry *e, struct gc_arena *gc) -{ - char buf[128]; - const char *ret = NULL; - struct buffer in; - - CLEAR (*e); - - buf_set_read (&in, (const uint8_t *)str, strlen (str)); - - if (strchr (str, '=') != NULL) - { - if (buf_parse (&in, '=', buf, sizeof (buf))) - ret = string_alloc (buf, gc); - } - - if (buf_parse (&in, ':', buf, sizeof (buf))) - e->server = string_alloc (buf, gc); - - if (e->server && buf_parse (&in, '\0', buf, sizeof (buf))) - e->port = atoi (buf); - - return ret; -} - -static void -parse_windows_proxy_setting_list (const char *str, const char *type, struct auto_proxy_info_entry *e, struct gc_arena *gc) -{ - struct gc_arena gc_local = gc_new (); - struct auto_proxy_info_entry el; - - CLEAR (*e); - if (type) - { - char buf[128]; - struct buffer in; - - buf_set_read (&in, (const uint8_t *)str, strlen (str)); - if (strchr (str, '=') != NULL) - { - while (buf_parse (&in, ' ', buf, sizeof (buf))) - { - const char *t = parse_windows_proxy_setting (buf, &el, &gc_local); - if (t && !strcmp (t, type)) - goto found; - } - } - } - else - { - if (!parse_windows_proxy_setting (str, &el, &gc_local)) - goto found; - } - goto done; - - found: - if (el.server && el.port > 0) - { - e->server = string_alloc (el.server, gc); - e->port = el.port; - } - - done: - gc_free (&gc_local); -} - -static const char * -win_proxy_access_type (const DWORD dwAccessType) -{ - switch (dwAccessType) - { - case INTERNET_OPEN_TYPE_DIRECT: - return "INTERNET_OPEN_TYPE_DIRECT"; - case INTERNET_OPEN_TYPE_PROXY: - return "INTERNET_OPEN_TYPE_PROXY"; - default: - return "[UNKNOWN]"; - } -} - -void -show_win_proxy_settings (const int msglevel) -{ - INTERNET_PROXY_INFO *info; - struct gc_arena gc = gc_new (); - - info = get_windows_proxy_settings (&gc); - msg (msglevel, "PROXY INFO: %s %s", - win_proxy_access_type (info->dwAccessType), - info->lpszProxy ? info->lpszProxy : "[NULL]"); - - gc_free (&gc); -} - -struct auto_proxy_info * -get_proxy_settings (char **err, struct gc_arena *gc) -{ - struct gc_arena gc_local = gc_new (); - INTERNET_PROXY_INFO *info; - struct auto_proxy_info *pi; - - ALLOC_OBJ_CLEAR_GC (pi, struct auto_proxy_info, gc); - - if (err) - *err = NULL; - - info = get_windows_proxy_settings (&gc_local); - - if (!info) - { - if (err) - *err = "PROXY: failed to obtain windows proxy info"; - goto done; - } - - switch (info->dwAccessType) - { - case INTERNET_OPEN_TYPE_DIRECT: - break; - case INTERNET_OPEN_TYPE_PROXY: - if (!info->lpszProxy) - break; - parse_windows_proxy_setting_list (info->lpszProxy, NULL, &pi->http, gc); - if (!pi->http.server) - parse_windows_proxy_setting_list (info->lpszProxy, "http", &pi->http, gc); - parse_windows_proxy_setting_list (info->lpszProxy, "socks", &pi->socks, gc); - break; - default: - if (err) - *err = "PROXY: unknown proxy type"; - break; - } - - done: - gc_free (&gc_local); - return pi; -} - -#else - -struct auto_proxy_info * -get_proxy_settings (char **err, struct gc_arena *gc) -{ -#if 1 - if (err) - *err = string_alloc ("PROXY: automatic detection not supported on this OS", gc); - return NULL; -#else /* test --auto-proxy feature */ - struct auto_proxy_info *pi; - ALLOC_OBJ_CLEAR_GC (pi, struct auto_proxy_info, gc); - pi->http.server = "10.10.0.2"; - pi->http.port = 4000; - return pi; -#endif -} - -#endif - -#endif /* GENERAL_PROXY_SUPPORT */ diff --git a/proxy.h b/proxy.h index d89aa4a..355a4c3 100644 --- a/proxy.h +++ b/proxy.h @@ -28,30 +28,6 @@ #include "buffer.h" #include "misc.h" -#ifdef GENERAL_PROXY_SUPPORT - -/* - * Return value for get_proxy_settings to automatically - * determine proxy information. - */ -struct auto_proxy_info_entry { - char *server; - int port; -}; - -struct auto_proxy_info { - struct auto_proxy_info_entry http; - struct auto_proxy_info_entry socks; -}; - -struct auto_proxy_info *get_proxy_settings (char **err, struct gc_arena *gc); - -#ifdef WIN32 -void show_win_proxy_settings (const int msglevel); -#endif /* WIN32 */ - -#endif /* GENERAL_PROXY_SUPPORT */ - #ifdef ENABLE_HTTP_PROXY /* HTTP CONNECT authentication methods */ @@ -94,8 +70,7 @@ struct http_proxy_info { bool queried_creds; }; -struct http_proxy_info *http_proxy_new (const struct http_proxy_options *o, - struct auto_proxy_info *auto_proxy_info); +struct http_proxy_info *http_proxy_new (const struct http_proxy_options *o); void http_proxy_close (struct http_proxy_info *hp); diff --git a/socks.c b/socks.c index 949d256..ac5bd58 100644 --- a/socks.c +++ b/socks.c @@ -57,23 +57,10 @@ struct socks_proxy_info * socks_proxy_new (const char *server, int port, const char *authfile, - bool retry, - struct auto_proxy_info *auto_proxy_info) + bool retry) { struct socks_proxy_info *p; - if (auto_proxy_info) - { - if (!server) - { - if (!auto_proxy_info->socks.server) - return NULL; - - server = auto_proxy_info->socks.server; - port = auto_proxy_info->socks.port; - } - } - ALLOC_OBJ_CLEAR (p, struct socks_proxy_info); ASSERT (server); diff --git a/socks.h b/socks.h index b748bb3..b55ff6f 100644 --- a/socks.h +++ b/socks.h @@ -51,8 +51,7 @@ void socks_adjust_frame_parameters (struct frame *frame, int proto); struct socks_proxy_info *socks_proxy_new (const char *server, int port, const char *authfile, - bool retry, - struct auto_proxy_info *auto_proxy_info); + bool retry); void socks_proxy_close (struct socks_proxy_info *sp); -- 1.7.5.4 |
| From: David S. <ope...@to...> - 2012-02-05 12:36:36 |
On 05/02/12 12:51, Adriaan de Jong wrote: > Signed-off-by: Adriaan de Jong<de...@fo...> > --- > buffer.h | 4 +--- > error.h | 3 +++ > 2 files changed, 4 insertions(+), 3 deletions(-) ACK to both patches. Applied to master on -testing and -stable. commit bee92b479414d12035b0422f81ac5fcfe14fa645 Author: Adriaan de Jong <de...@fo...> Date: Sun Feb 5 12:51:25 2012 +0100 Removed support for calling gc_malloc with a NULL gc_arena struct commit 2b7deeb6632582fcfb23492e77bb09395d1be4ca Author: Adriaan de Jong <de...@fo...> Date: Sun Feb 5 12:51:24 2012 +0100 Moved out of memory prototype to error.h, as the definition is in error.c Signed-off-by: Adriaan de Jong <de...@fo...> Acked-by: David Sommerseth <da...@re...> Signed-off-by: David Sommerseth <da...@re...> kind regards, David Sommerseth |
| From: Adriaan de J. <de...@fo...> - 2012-02-05 11:51:53 |
Signed-off-by: Adriaan de Jong <de...@fo...> --- buffer.c | 29 ++++++++++------------------- 1 files changed, 10 insertions(+), 19 deletions(-) diff --git a/buffer.c b/buffer.c index 2f8e4b8..c39bbcb 100644 --- a/buffer.c +++ b/buffer.c @@ -310,28 +310,19 @@ gc_malloc (size_t size, bool clear, struct gc_arena *a) #endif { void *ret; - if (a) - { - struct gc_entry *e; -#ifdef DMALLOC - e = (struct gc_entry *) openvpn_dmalloc (file, line, size + sizeof (struct gc_entry)); -#else - 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; - } - else - { + ASSERT (NULL != a); + + struct gc_entry *e; #ifdef DMALLOC - ret = openvpn_dmalloc (file, line, size); + e = (struct gc_entry *) openvpn_dmalloc (file, line, size + sizeof (struct gc_entry)); #else - ret = malloc (size); + e = (struct gc_entry *) malloc (size + sizeof (struct gc_entry)); #endif - check_malloc_return (ret); - } + check_malloc_return (e); + ret = (char *) e + sizeof (struct gc_entry); + e->next = a->list; + a->list = e; + #ifndef ZERO_BUFFER_ON_ALLOC if (clear) #endif -- 1.7.5.4 |
| From: Adriaan de J. <de...@fo...> - 2012-02-05 11:51:47 |
Signed-off-by: Adriaan de Jong <de...@fo...> --- buffer.h | 4 +--- error.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/buffer.h b/buffer.h index e6113f9..6c79007 100644 --- a/buffer.h +++ b/buffer.h @@ -26,6 +26,7 @@ #define BUFFER_H #include "basic.h" +#include "error.h" #define BUF_SIZE_MAX 1000000 @@ -810,8 +811,6 @@ gc_reset (struct gc_arena *a) * Allocate memory to hold a structure */ -void out_of_memory (void); - #define ALLOC_OBJ(dptr, type) \ { \ check_malloc_return ((dptr) = (type *) malloc (sizeof (type))); \ @@ -862,7 +861,6 @@ void out_of_memory (void); static inline void check_malloc_return (void *p) { - void out_of_memory (void); if (!p) out_of_memory (); } diff --git a/error.h b/error.h index 13221bd..aafd055 100644 --- a/error.h +++ b/error.h @@ -244,6 +244,9 @@ HANDLE get_orig_stderr (void); /* exit program */ void openvpn_exit (const int status); +/* exit program on out of memory error */ +void out_of_memory (void); + /* * Check the return status of read/write routines. */ -- 1.7.5.4 |