summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-03-16 14:47:21 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-03-16 14:47:21 -0400
commit649539e82ae98889653c39a78afc4e261b83f677 (patch)
treec03b71239ef52f28e78755d6fd6da0d31857a81c
parent1a5b612832b46331a2a545329cfa78d36130d84f (diff)
parent1f783bab40e489524565c824e0e9fe8a116d7079 (diff)
downloadtor-649539e82ae98889653c39a78afc4e261b83f677.tar.gz
tor-649539e82ae98889653c39a78afc4e261b83f677.zip
Merge branch 'tor-gitlab/mr/550'
-rw-r--r--src/feature/relay/dns.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 0af80d52ae..4ae4a8e4b9 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -1416,12 +1416,15 @@ get_consensus_param_exit_dns_attempts(void)
return str;
}
-/** Configure the libevent options. This can be called after initialization.
- * This should never be called without the evdns base pointer initialized. */
+/** Configure the libevent options. This can safely be called after
+ * initialization or even if the evdns base is not set. */
static void
configure_libevent_options(void)
{
- if (BUG(!the_evdns_base)) {
+ /* This is possible because we can get called when a new consensus is set
+ * while the DNS subsystem is not initialized just yet. It should be
+ * harmless. */
+ if (!the_evdns_base) {
return;
}