summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-08 16:10:38 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-30 11:55:44 -0500
commit5f0a8dcd2cfcbafc3deb3a6717808b607a459dac (patch)
treecab98ff453a2116811274dd2118e61290aadd514 /src/or/main.c
parent628b735fe39e13cc37afb567b32d4b006da51c89 (diff)
downloadtor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.tar.gz
tor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.zip
Initial hacking for proposal 186.
This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index da45f5a681..1b5a56f04b 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1511,9 +1511,10 @@ run_scheduled_events(time_t now)
options->PortForwarding &&
is_server) {
#define PORT_FORWARDING_CHECK_INTERVAL 5
+ /* XXXXX this should take a list of ports, not just two! */
tor_check_port_forwarding(options->PortForwardingHelper,
- options->DirPort,
- options->ORPort,
+ get_primary_dir_port(),
+ get_primary_or_port(),
now);
time_to_check_port_forwarding = now+PORT_FORWARDING_CHECK_INTERVAL;
}