]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
bugfix in exit_policy_is_general_exit() that weasel found.
authorRoger Dingledine <arma@torproject.org>
Tue, 13 Jun 2006 10:48:26 +0000 (10:48 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 13 Jun 2006 10:48:26 +0000 (10:48 +0000)
this time for sure!

svn:r6617

src/or/policies.c

index 31622a012081f5e16a76acf8ff71ffc5dd14d5a3..2cad5777ed2466f1494074111b19fb75a311d5e6 100644 (file)
@@ -620,8 +620,10 @@ exit_policy_is_general_exit(addr_policy_t *policy)
       if ((p->addr & 0xff000000ul) == 0x7f000000ul)
         continue; /* 127.x */
       /* We have a match that is at least a /8. */
-      if (p->policy_type == ADDR_POLICY_ACCEPT)
+      if (p->policy_type == ADDR_POLICY_ACCEPT) {
         ++n_allowed;
+        break; /* stop considering this port */
+      }
     }
   }
   return n_allowed >= 2;