diff options
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/dns.c | 4 | ||||
-rw-r--r-- | src/feature/relay/relay_config.c | 7 | ||||
-rw-r--r-- | src/feature/relay/relay_find_addr.c | 16 | ||||
-rw-r--r-- | src/feature/relay/router.c | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c index 4ae4a8e4b9..be226f4815 100644 --- a/src/feature/relay/dns.c +++ b/src/feature/relay/dns.c @@ -768,11 +768,11 @@ dns_resolve_impl,(edge_connection_t *exitconn, int is_resolve, if (!is_reverse || !is_resolve) { if (!is_reverse) - log_info(LD_EXIT, "Bad .in-addr.arpa address \"%s\"; sending error.", + log_info(LD_EXIT, "Bad .in-addr.arpa address %s; sending error.", escaped_safe_str(exitconn->base_.address)); else if (!is_resolve) log_info(LD_EXIT, - "Attempt to connect to a .in-addr.arpa address \"%s\"; " + "Attempt to connect to a .in-addr.arpa address %s; " "sending error.", escaped_safe_str(exitconn->base_.address)); diff --git a/src/feature/relay/relay_config.c b/src/feature/relay/relay_config.c index 85ccfc18a7..aa9d48beac 100644 --- a/src/feature/relay/relay_config.c +++ b/src/feature/relay/relay_config.c @@ -33,6 +33,7 @@ #include "core/or/port_cfg_st.h" #include "feature/hibernate/hibernate.h" +#include "feature/hs/hs_service.h" #include "feature/nodelist/nickname.h" #include "feature/stats/geoip_stats.h" #include "feature/stats/predict_ports.h" @@ -942,7 +943,8 @@ options_validate_relay_accounting(const or_options_t *old_options, if (accounting_parse_options(options, 1)<0) REJECT("Failed to parse accounting options. See logs for details."); - if (options->AccountingMax) { + if (options->AccountingMax && + !hs_service_non_anonymous_mode_enabled(options)) { if (options->RendConfigLines && server_mode(options)) { log_warn(LD_CONFIG, "Using accounting with a hidden service and an " "ORPort is risky: your hidden service(s) and your public " @@ -1118,7 +1120,8 @@ options_validate_relay_mode(const or_options_t *old_options, if (BUG(!msg)) return -1; - if (server_mode(options) && options->RendConfigLines) + if (server_mode(options) && options->RendConfigLines && + !hs_service_non_anonymous_mode_enabled(options)) log_warn(LD_CONFIG, "Tor is currently configured as a relay and a hidden service. " "That's not very secure: you should probably run your hidden service " diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c index f4f9d40823..5a32283a7b 100644 --- a/src/feature/relay/relay_find_addr.c +++ b/src/feature/relay/relay_find_addr.c @@ -212,17 +212,19 @@ relay_addr_learn_from_dirauth(void) return; } const node_t *node = node_get_by_id(rs->identity_digest); - if (!node) { + extend_info_t *ei = NULL; + if (node) { + ei = extend_info_from_node(node, 1, false); + } + if (!node || !ei) { /* This can happen if we are still in the early starting stage where no * descriptors we actually fetched and thus we have the routerstatus_t * for the authority but not its descriptor which is needed to build a * circuit and thus learn our address. */ - log_info(LD_GENERAL, "Can't build a circuit to an authority. Unable to " - "learn for now our address from them."); - return; - } - extend_info_t *ei = extend_info_from_node(node, 1, false); - if (BUG(!ei)) { + log_info(LD_GENERAL, + "Trying to learn our IP address by connecting to an " + "authority, but can't build a circuit to one yet. Will try " + "again soon."); return; } diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index bc98fd985c..dddc0b1de5 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -2554,8 +2554,6 @@ mark_my_descriptor_dirty_if_too_old(time_t now) rs = networkstatus_vote_find_entry(ns, server_identitykey_digest); if (rs == NULL) retry_fast_reason = "not listed in consensus"; - else if (rs->published_on < slow_cutoff) - retry_fast_reason = "version listed in consensus is quite old"; else if (rs->is_staledesc && ns->valid_after > desc_clean_since) retry_fast_reason = "listed as stale in consensus"; } |