summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-16 11:37:11 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-20 13:46:44 -0500
commit78c53eff853deeccf002f6d4f24e824b2286afba (patch)
tree94f149a997d1185c4589fcd888b7c177e4d27ccf /src
parent485fdcf8268173da94f7feba5753956eb2672ca4 (diff)
downloadtor-78c53eff853deeccf002f6d4f24e824b2286afba.tar.gz
tor-78c53eff853deeccf002f6d4f24e824b2286afba.zip
Fix SocksSocket 0. That was easy!
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index edfa6c3e8a..cba902d00d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -5821,7 +5821,10 @@ parse_port_config(smartlist_t *out,
addrport = smartlist_get(elts, 0);
if (is_unix_socket) {
/* leave it as it is. */
- port = 1;
+ if (!strcmp(addrport, "0"))
+ port = 0;
+ else
+ port = 1;
} else if (!strcmp(addrport, "auto")) {
port = CFG_AUTO_PORT;
tor_addr_parse(&addr, defaultaddr);
@@ -6052,7 +6055,7 @@ parse_port_config(smartlist_t *out,
warn_nonlocal_client_ports(out, portname, listener_type);
}
- if (!is_unix_socket && got_zero_port && got_nonzero_port) {
+ if (got_zero_port && got_nonzero_port) {
log_warn(LD_CONFIG, "You specified a nonzero %sPort along with '%sPort 0' "
"in the same configuration. Did you mean to disable %sPort or "
"not?", portname, portname, portname);