diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-30 16:12:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-30 16:12:53 -0400 |
commit | e035cea0318add5cf8ed8d8f1c518a26434cbeda (patch) | |
tree | 1e7f5a317b4b24c8a23df1dddc2221cda0d4aeac /src/or/router.c | |
parent | d35a555348dfccb19d7534af24d3c364372d515b (diff) | |
parent | 0e1fad648d22923d7455b94734df36585b8f624f (diff) | |
download | tor-e035cea0318add5cf8ed8d8f1c518a26434cbeda.tar.gz tor-e035cea0318add5cf8ed8d8f1c518a26434cbeda.zip |
Merge branch 'bug3216_v2' into 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 874d234ffb..30a340a05f 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -802,6 +802,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 @@ -1136,6 +1138,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(); } @@ -1419,7 +1423,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. */ |