[or-cvs] r18307: {tor} Support setting serverdnsrandomizecase during sighup. Backpo (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Wed Jan 28 19:53:03 UTC 2009


Author: nickm
Date: 2009-01-28 14:53:03 -0500 (Wed, 28 Jan 2009)
New Revision: 18307

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/dns.c
Log:
Support setting serverdnsrandomizecase during sighup.  Backportable, unless too trivial.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-01-28 18:26:20 UTC (rev 18306)
+++ tor/trunk/ChangeLog	2009-01-28 19:53:03 UTC (rev 18307)
@@ -23,6 +23,8 @@
     - Resolve a very rare crash bug that could occur when the user forced
       a nameserver reconfiguration during the middle of a nameserver
       probe.  Fixes bug 526.  Bugfix on 0.1.2.1-alpha.
+    - Support changing value of ServerDNSRandomizeCase during SIGHUP.
+      Bugfix on 0.2.1.7-alpha.
 
   o Minor features:
     - Support platforms where time_t is 64 bits long. (Congratulations,

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2009-01-28 18:26:20 UTC (rev 18306)
+++ tor/trunk/src/or/dns.c	2009-01-28 19:53:03 UTC (rev 18307)
@@ -197,10 +197,6 @@
 {
   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 @@
     }
   }
 
+  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)) {



More information about the tor-commits mailing list