diff options
author | David Goulet <dgoulet@torproject.org> | 2022-01-19 14:37:26 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-03-15 15:26:37 -0400 |
commit | 2cdb5ceb1dfdeead331f6f65b8aa67791d91f94d (patch) | |
tree | 71310057e87ed6c8a080110c3b6a98392788adbf /src/feature/relay/dns.h | |
parent | 347eaa32bfbcdfb13c9e34397d8b068ed6f6ba17 (diff) | |
download | tor-2cdb5ceb1dfdeead331f6f65b8aa67791d91f94d.tar.gz tor-2cdb5ceb1dfdeead331f6f65b8aa67791d91f94d.zip |
relay: On new consensus, reconfigure DNS nameservers
This applies only for relays. Previous commit adds two new consensus
parameters that dictate how libevent is configured with DNS resolution.
And so, with a new consensus, we now look at those values in case they
ever change.
Without this, Exit relay would have to HUP or restart to apply any new
Exit DNS consensus parameters.
Related to #40312
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/dns.h')
-rw-r--r-- | src/feature/relay/dns.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/relay/dns.h b/src/feature/relay/dns.h index d7a815e697..3f8519bd97 100644 --- a/src/feature/relay/dns.h +++ b/src/feature/relay/dns.h @@ -26,6 +26,7 @@ void dns_reset_correctness_checks(void); size_t dns_cache_total_allocation(void); void dump_dns_mem_usage(int severity); size_t dns_cache_handle_oom(time_t now, size_t min_remove_bytes); +void dns_new_consensus_params(const networkstatus_t *ns); /* These functions are only used within the feature/relay module, and don't * need stubs. */ @@ -47,6 +48,8 @@ void dns_launch_correctness_checks(void); ((void)(severity)) #define dns_cache_handle_oom(now, bytes) \ ((void)(now), (void)(bytes), 0) +#define dns_new_consensus_params(ns) \ + ((void) ns) #define connection_dns_remove(conn) \ STMT_BEGIN \ |