summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-28 19:53:03 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-28 19:53:03 +0000
commite1f03572cac39855dc435e62d72ba413d4ab4462 (patch)
tree03ae6ae0b73091768e9db7891e193db8dcba3a16 /src/or/dns.c
parentf78793879d0f8cda54303f40337a7f439423b54a (diff)
downloadtor-e1f03572cac39855dc435e62d72ba413d4ab4462.tar.gz
tor-e1f03572cac39855dc435e62d72ba413d4ab4462.zip
Support setting serverdnsrandomizecase during sighup. Backportable, unless too trivial.
svn:r18307
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index d57e8fc562..74d187be58 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -197,10 +197,6 @@ dns_init(void)
{
init_cache_map();
evdns_set_random_bytes_fn(_dns_randfn);
- if (get_options()->ServerDNSRandomizeCase)
- evdns_set_option("randomize-case:", "1", DNS_OPTIONS_ALL);
- else
- evdns_set_option("randomize-case:", "0", DNS_OPTIONS_ALL);
if (server_mode(get_options())) {
int r = configure_nameservers(1);
return r;
@@ -1121,6 +1117,11 @@ configure_nameservers(int force)
}
}
+ if (options->ServerDNSRandomizeCase)
+ evdns_set_option("randomize-case:", "1", DNS_OPTIONS_ALL);
+ else
+ evdns_set_option("randomize-case:", "0", DNS_OPTIONS_ALL);
+
evdns_set_log_fn(evdns_log_cb);
if (conf_fname) {
if (stat(conf_fname, &st)) {