diff options
author | teor <teor@torproject.org> | 2020-04-30 15:11:50 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-30 15:58:37 +1000 |
commit | c5ee3d7eb8c337703498b8c41b0c286ddd3cf9b4 (patch) | |
tree | ce7c835c3b1a26dc272f709896eba92e4288722f /src/feature/relay/selftest.c | |
parent | a202f03c64c7655fcc8d3fa72bc39deeac198687 (diff) | |
download | tor-c5ee3d7eb8c337703498b8c41b0c286ddd3cf9b4.tar.gz tor-c5ee3d7eb8c337703498b8c41b0c286ddd3cf9b4.zip |
relay: Clarify reachability status check functions
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
check_whether_orport_reachable router_skip_orport_reachability_check \
check_whether_dirport_reachable router_skip_dirport_reachability_check
It was generated with --no-verify, so it probably breaks some commit hooks.
The commiter should be sure to fix them up in a subsequent commit.
Part of 33222.
Diffstat (limited to 'src/feature/relay/selftest.c')
-rw-r--r-- | src/feature/relay/selftest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c index 0088ce0190..3b938d750f 100644 --- a/src/feature/relay/selftest.c +++ b/src/feature/relay/selftest.c @@ -70,7 +70,7 @@ router_reachability_checks_disabled(const or_options_t *options) * - the network is disabled. */ int -check_whether_orport_reachable(const or_options_t *options) +router_skip_orport_reachability_check(const or_options_t *options) { int reach_checks_disabled = router_reachability_checks_disabled(options); return reach_checks_disabled || @@ -87,7 +87,7 @@ check_whether_orport_reachable(const or_options_t *options) * - the network is disabled. */ int -check_whether_dirport_reachable(const or_options_t *options) +router_skip_dirport_reachability_check(const or_options_t *options) { int reach_checks_disabled = router_reachability_checks_disabled(options) || !options->DirPort_set; @@ -171,7 +171,7 @@ router_do_reachability_checks(int test_or, int test_dir) { const routerinfo_t *me = router_get_my_routerinfo(); const or_options_t *options = get_options(); - int orport_reachable = check_whether_orport_reachable(options); + int orport_reachable = router_skip_orport_reachability_check(options); tor_addr_t addr; if (router_should_check_reachability(test_or, test_dir)) { @@ -188,7 +188,7 @@ router_do_reachability_checks(int test_or, int test_dir) /* XXX IPv6 self testing */ tor_addr_from_ipv4h(&addr, me->addr); - if (test_dir && !check_whether_dirport_reachable(options) && + if (test_dir && !router_skip_dirport_reachability_check(options) && !connection_get_by_type_addr_port_purpose( CONN_TYPE_DIR, &addr, me->dir_port, DIR_PURPOSE_FETCH_SERVERDESC)) { @@ -258,7 +258,7 @@ router_orport_found_reachable(void) log_notice(LD_OR,"Self-testing indicates your ORPort is reachable from " "the outside. Excellent.%s", options->PublishServerDescriptor_ != NO_DIRINFO - && check_whether_dirport_reachable(options) ? + && router_skip_dirport_reachability_check(options) ? " Publishing server descriptor." : ""); can_reach_or_port = 1; mark_my_descriptor_dirty("ORPort found reachable"); @@ -285,7 +285,7 @@ router_dirport_found_reachable(void) log_notice(LD_DIRSERV,"Self-testing indicates your DirPort is reachable " "from the outside. Excellent.%s", options->PublishServerDescriptor_ != NO_DIRINFO - && check_whether_orport_reachable(options) ? + && router_skip_orport_reachability_check(options) ? " Publishing server descriptor." : ""); can_reach_dir_port = 1; if (router_should_advertise_dirport(options, me->dir_port)) { |