summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-09-05 20:17:25 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2012-09-05 20:17:25 +0300
commit4edc57caa5c4a7d4d46d30bf0150a7f70e8dcccb (patch)
tree745d76f7c53824f744546bd5f2ee77ef02769a9e /src
parentb9551fd0741434e9d0917355d67164775eb25fbe (diff)
downloadtor-4edc57caa5c4a7d4d46d30bf0150a7f70e8dcccb.tar.gz
tor-4edc57caa5c4a7d4d46d30bf0150a7f70e8dcccb.zip
Figure out ORPort and DirPort even when 'auto' is used.
Use router_get_advertised_{dir,or}_port() functions instead of get_primary_{dir,or}_port().
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index a4af22a377..02afa1e275 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -7266,11 +7266,11 @@ get_list_of_ports_to_forward(void)
/** XXX TODO tor-fw-helper does not support forwarding ports to
other hosts than the local one. If the user is binding to a
different IP address, tor-fw-helper won't work. */
- port = get_primary_or_port(); /* Get ORPort */
+ port = router_get_advertised_or_port(get_options()); /* Get ORPort */
if (port)
smartlist_add_asprintf(ports_to_forward, "%d:%d", port, port);
- port = get_primary_dir_port(); /* Get DirPort */
+ port = router_get_advertised_dir_port(get_options(), 0); /* Get DirPort */
if (port)
smartlist_add_asprintf(ports_to_forward, "%d:%d", port, port);