summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-13 09:16:40 -0400
committerNick Mathewson <nickm@torproject.org>2016-10-13 09:19:37 -0400
commit1fc3e291083493bd7517901f467a7341d5c6f650 (patch)
treecc3cf770302fe58571a758a0d72d3d2b20b6ffee /src/or/router.c
parent0e1b228aa6b5ed7665ba5167a2b88924e58fb9b5 (diff)
downloadtor-1fc3e291083493bd7517901f467a7341d5c6f650.tar.gz
tor-1fc3e291083493bd7517901f467a7341d5c6f650.zip
Remove duplicate code that checks for default authorities
Patch from ericho. Fixes 18529. Simple refactoring.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index b93b7c1a13..287bc1691e 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2093,8 +2093,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e)
tor_addr_family(&p->addr) == AF_INET6) {
/* Like IPv4, if the relay is configured using the default
* authorities, disallow internal IPs. Otherwise, allow them. */
- const int default_auth = (!options->DirAuthorities &&
- !options->AlternateDirAuthority);
+ const int default_auth = is_default_dir_authorities(options);
if (! tor_addr_is_internal(&p->addr, 0) || ! default_auth) {
ipv6_orport = p;
break;