commit a5a505cee299effa4f2d6cd51d1c4c6d298a03a8
parent dd7c86b242cdb7e056d632286718d7574b13de57
Author: Roger Dingledine <arma@torproject.org>
Date: Sat, 4 Oct 2025 12:15:01 -0400
refactor: simplify supports_tunnelled_dir_requests handling
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
@@ -1351,8 +1351,6 @@ router_should_be_dirserver(const or_options_t *options)
* advertise the fact that we have begindir support, else
* return 1.
*
- * Where supports_tunnelled_dir_requests is not relevant, it must be 0.
- *
* Log a helpful message if we change our mind about whether to publish.
*/
static int
@@ -1370,8 +1368,7 @@ decide_to_advertise_dir_impl(const or_options_t *options,
return 1;
if (net_is_disabled())
return 0;
- if (supports_tunnelled_dir_requests &&
- !routerconf_find_or_port(options, AF_INET))
+ if (!routerconf_find_or_port(options, AF_INET))
return 0;
/* Part two: consider config options that could make us choose to
@@ -1379,7 +1376,7 @@ decide_to_advertise_dir_impl(const or_options_t *options,
return router_should_be_dirserver(options);
}
-/** Front-end to decide_to_advertise_dir_impl(): return 0 if we don't want to
+/** Return 0 if we don't want to
* advertise the fact that we have a DirPort open, else return the
* DirPort we want to advertise.
*/