diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-08-05 12:14:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-08-05 12:14:48 -0400 |
commit | b9f9110ac77876b0c8c4fda19b6bb138e60da655 (patch) | |
tree | 599f804ac9ee3cc2512c3549d2d0e66f3576f2cb /src/or/config.c | |
parent | 0a0f93d277046a524740ad110060abf8ed137b8f (diff) | |
download | tor-b9f9110ac77876b0c8c4fda19b6bb138e60da655.tar tor-b9f9110ac77876b0c8c4fda19b6bb138e60da655.tar.gz |
Don't allow all ORPort values to be NoAdvertise
Fix for bug #9366
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 72ceea395..ef90f23e6 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -5509,6 +5509,13 @@ check_server_ports(const smartlist_t *ports, "listening on one."); r = -1; } + if (n_orport_listeners && !n_orport_advertised) { + log_warn(LD_CONFIG, "We are listening on an ORPort, but not advertising " + "any ORPorts. This will keep us from building a %s " + "descriptor, and make us impossible to use.", + options->BridgeRelay ? "bridge" : "router"); + r = -1; + } if (n_dirport_advertised && !n_dirport_listeners) { log_warn(LD_CONFIG, "We are advertising a DirPort, but not actually " "listening on one."); |