From 995262303fcb127856fda15183bcf56147e8bab6 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 5 Sep 2011 21:35:15 +0200 Subject: [PATCH 1/2] Fix whitespace in parse_client_port_config() --- src/or/config.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index dbc355d..5a28e73 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4979,7 +4979,7 @@ parse_client_port_config(smartlist_t *out, /* FooListenAddress is deprecated; let's make it work like it used to work, * though. */ if (listenaddrs) { - int mainport = defaultport; + int mainport = defaultport; if (ports && ports->next) { log_warn(LD_CONFIG, "%sListenAddress can't be used when there are " -- 1.7.6 From a22ea3f0144cfff65389a73609544e8dd9aadc32 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 10 Sep 2011 12:33:23 +0200 Subject: [PATCH 2/2] Stop parse_client_port_config() from misinterpreting FooListenAddress and FooPort in legacy syntax Previously the FooPort was ignored and the default used instead, causing Tor to bind to the wrong port if FooPort and the default port don't match or the CONN_TYPE_FOO_LISTENER has no default port. Fixes #3936. --- src/or/config.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index 5a28e73..7489894 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -5018,7 +5018,7 @@ parse_client_port_config(smartlist_t *out, if (out) { port_cfg_t *cfg = tor_malloc_zero(sizeof(port_cfg_t)); cfg->type = listener_type; - cfg->port = port ? port : defaultport; + cfg->port = port ? port : mainport; tor_addr_copy(&cfg->addr, &addr); cfg->session_group = SESSION_GROUP_UNSET; cfg->isolation_flags = ISO_DEFAULT; -- 1.7.6