[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] branch main updated: dns: Remove reachable BUG()



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

The following commit(s) were added to refs/heads/main by this push:
     new 1f783bab40 dns: Remove reachable BUG()
     new 649539e82a Merge branch 'tor-gitlab/mr/550'
1f783bab40 is described below

commit 1f783bab40e489524565c824e0e9fe8a116d7079
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
AuthorDate: Wed Mar 16 13:42:42 2022 -0400

    dns: Remove reachable BUG()
    
    Fixes #40587
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/feature/relay/dns.c | 9 ++++++---
 1 file 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;
   }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits