Browse Source

Fix a logic error that would automatically reject all but the first configured DNS server. Bugfix on 0.2.1.5-alpha. Possible fix for part of 813/868. Spotted by coderman

svn:r17569
Nick Mathewson 16 years ago
parent
commit
d8027aa689
2 changed files with 6 additions and 1 deletions
  1. 5 0
      ChangeLog
  2. 1 1
      src/or/eventdns.c

+ 5 - 0
ChangeLog

@@ -1,4 +1,9 @@
 Changes in version 0.2.1.9-alpha - 200?-??-??
+  o Major bugfixes:
+    - Fix a logic error that would automatically reject all but the first
+      configured DNS server.  Bugfix on 0.2.1.5-alpha.  Possible fix for part
+      of bug 813/868.  Bug spotted by coderman.
+
   o Minor features:
     - Give a better error message when an overzealous init script says,
       "sudo -u username tor --user username".  Makes Bug 882 easier

+ 1 - 1
src/or/eventdns.c

@@ -2224,7 +2224,7 @@ _evdns_nameserver_add_impl(const struct sockaddr *address,
 	int err = 0;
 	if (server) {
 		do {
-			if (!sockaddr_eq(address, (struct sockaddr *)&server->address, 1)) {
+			if (sockaddr_eq(address, (struct sockaddr *)&server->address, 1)) {
 				log(EVDNS_LOG_DEBUG, "Duplicate nameserver.");
 				return 3;
 			}