diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-30 16:14:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-30 16:14:45 -0400 |
commit | d0e7c545bacb45921569bf2236cc49d510530af4 (patch) | |
tree | 2acd00b46ce356f901661ad7bd07fdb430741c49 /src/or/router.c | |
parent | d274f539e5ae8ffe50f2bb364c3a3b64e3920e9c (diff) | |
parent | e035cea0318add5cf8ed8d8f1c518a26434cbeda (diff) | |
download | tor-d0e7c545bacb45921569bf2236cc49d510530af4.tar.gz tor-d0e7c545bacb45921569bf2236cc49d510530af4.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c index 73fabefb33..a7879635c4 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -805,6 +805,8 @@ decide_to_advertise_dirport(or_options_t *options, uint16_t dir_port) return 0; if (!check_whether_dirport_reachable()) return 0; + if (!router_get_advertised_dir_port(options)) + return 0; /* Section two: reasons to publish or not publish that the user * might find surprising. These are generally config options that @@ -1142,6 +1144,8 @@ decide_if_publishable_server(void) return 0; if (authdir_mode(options)) return 1; + if (!router_get_advertised_or_port(options)) + return 0; return check_whether_orport_reachable(); } @@ -1421,7 +1425,8 @@ router_rebuild_descriptor(int force) if (desc_clean_since && !force) return 0; - if (router_pick_published_address(options, &addr) < 0) { + if (router_pick_published_address(options, &addr) < 0 || + router_get_advertised_or_port(options) == 0) { /* Stop trying to rebuild our descriptor every second. We'll * learn that it's time to try again when ip_address_changed() * marks it dirty. */ |