]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Stop parse_client_port_config() from misinterpreting FooListenAddress and FooPort...
authorFabian Keil <fk@fabiankeil.de>
Sat, 10 Sep 2011 10:33:23 +0000 (12:33 +0200)
committerNick Mathewson <nickm@torproject.org>
Sat, 10 Sep 2011 21:48:37 +0000 (17:48 -0400)
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

index 684875d83a8c6c8a4c16997e6c9eff9cf128e4ee..ac7c6fff7ea8e4135162f1b932fd988a7c6f18c0 100644 (file)
@@ -5019,7 +5019,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;