summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-17 11:30:44 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-22 08:52:15 -0500
commit9541ed63a1af9e7d4632aa261976f053bad12438 (patch)
tree25a0b5c84440cb8690dc633237d820bc09409286 /src/feature
parent38649b4f9522d5fc2b186d2a02cefb9abaefc519 (diff)
downloadtor-9541ed63a1af9e7d4632aa261976f053bad12438.tar.gz
tor-9541ed63a1af9e7d4632aa261976f053bad12438.zip
relay: Only authorities publish a DirPort
Relay will always publish 0 as DirPort value in their descriptor from now on except authorities. Related to #40282 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/relay/router.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index cd3790856b..73e8393761 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -1357,8 +1357,8 @@ decide_to_advertise_dir_impl(const or_options_t *options,
int
router_should_advertise_dirport(const or_options_t *options, uint16_t dir_port)
{
- /* supports_tunnelled_dir_requests is not relevant, pass 0 */
- return decide_to_advertise_dir_impl(options, dir_port, 0) ? dir_port : 0;
+ /* Only authorities should advertise a DirPort now. */
+ return authdir_mode(options) ? dir_port : 0;
}
/** Front-end to decide_to_advertise_dir_impl(): return 0 if we don't want to