From: Nick Mathewson Date: Mon, 5 Aug 2013 16:14:48 +0000 (-0400) Subject: Don't allow all ORPort values to be NoAdvertise X-Git-Tag: tor-0.2.4.17-rc~7^2~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9f9110ac77876b0c8c4fda19b6bb138e60da655;p=thirdparty%2Ftor.git Don't allow all ORPort values to be NoAdvertise Fix for bug #9366 --- diff --git a/changes/bug9366 b/changes/bug9366 new file mode 100644 index 0000000000..acc919e77f --- /dev/null +++ b/changes/bug9366 @@ -0,0 +1,4 @@ + o Minor features (usability): + - Warn and fail if a server is configured not to advertise any + ORPorts at all. (We need *something* to put in our descriptor, or + we just won't work.) diff --git a/src/or/config.c b/src/or/config.c index 72ceea395e..ef90f23e62 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.");