Explorar o código

bugfix in exit_policy_is_general_exit() that weasel found.
this time for sure!


svn:r6617

Roger Dingledine %!s(int64=20) %!d(string=hai) anos
pai
achega
88dadc917c
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/or/policies.c

+ 3 - 1
src/or/policies.c

@@ -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;