diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-09-08 14:03:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-09-08 14:03:04 -0400 |
commit | fcec1f338110d17dd23668558a87f0f5ea8a8ee1 (patch) | |
tree | 82420fa5887d8042d3b5f2bf311f20e6a0a4c04d /src/or/config.c | |
parent | 4c6fd7106fdf1a31c1e50a992c03dac69cd25a47 (diff) | |
parent | 54510d4d1a66d2dd9a618699bd2e51bf4ade4dea (diff) | |
download | tor-fcec1f338110d17dd23668558a87f0f5ea8a8ee1.tar.gz tor-fcec1f338110d17dd23668558a87f0f5ea8a8ee1.zip |
Merge branch 'feature15482_squashed'
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 262eeeb153..db78d52971 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -6037,6 +6037,7 @@ parse_port_config(smartlist_t *out, int sessiongroup = SESSION_GROUP_UNSET; unsigned isolation = ISO_DEFAULT; int prefer_no_auth = 0; + int socks_iso_keep_alive = 0; char *addrport; uint16_t ptmp=0; @@ -6261,6 +6262,8 @@ parse_port_config(smartlist_t *out, isoflag = ISO_CLIENTPROTO; } else if (!strcasecmp(elt, "IsolateClientAddr")) { isoflag = ISO_CLIENTADDR; + } else if (!strcasecmp(elt, "KeepAliveIsolateSOCKSAuth")) { + socks_iso_keep_alive = 1; } else { log_warn(LD_CONFIG, "Unrecognized %sPort option '%s'", portname, escaped(elt_orig)); @@ -6291,6 +6294,13 @@ parse_port_config(smartlist_t *out, goto err; } + if (!(isolation & ISO_SOCKSAUTH) && socks_iso_keep_alive) { + log_warn(LD_CONFIG, "You have a %sPort entry with both " + "NoIsolateSOCKSAuth and KeepAliveIsolateSOCKSAuth set.", + portname); + goto err; + } + if (out && port) { size_t namelen = unix_socket_path ? strlen(unix_socket_path) : 0; port_cfg_t *cfg = port_cfg_new(namelen); @@ -6324,6 +6334,7 @@ parse_port_config(smartlist_t *out, cfg->entry_cfg.socks_prefer_no_auth = prefer_no_auth; if (! (isolation & ISO_SOCKSAUTH)) cfg->entry_cfg.socks_prefer_no_auth = 1; + cfg->entry_cfg.socks_iso_keep_alive = socks_iso_keep_alive; smartlist_add(out, cfg); } |