]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make the Exit tag in status documents actually work in head too
authorPeter Palfrader <peter@palfrader.org>
Mon, 12 Jun 2006 22:03:25 +0000 (22:03 +0000)
committerPeter Palfrader <peter@palfrader.org>
Mon, 12 Jun 2006 22:03:25 +0000 (22:03 +0000)
svn:r6608

src/or/policies.c

index 32c3fbc72f43e36ead923e698d5728ae397e8518..b7946f9204ff25e9d896709a7ed43a03aa47b5d1 100644 (file)
@@ -608,7 +608,6 @@ int
 exit_policy_is_general_exit(addr_policy_t *policy)
 {
   static const int ports[] = { 80, 443, 6667 };
-  int n_allowed = 0;
   int i;
   for (i = 0; i < 3; ++i) {
     struct addr_policy_t *p = policy;
@@ -621,11 +620,10 @@ exit_policy_is_general_exit(addr_policy_t *policy)
         continue; /* 127.x */
       /* We have a match that is at least a /8. */
       if (p->policy_type == ADDR_POLICY_ACCEPT)
-        ++n_allowed;
-      break;
+        return 1;
     }
   }
-  return n_allowed > 0;
+  return 0;
 }
 
 /** Release all storage held by <b>p</b> */