[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] switch semantics of authdirinvalid/reject



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv2014/src/or

Modified Files:
	config.c dirserv.c 
Log Message:
switch semantics of authdirinvalid/reject

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.426
retrieving revision 1.427
diff -u -d -r1.426 -r1.427
--- config.c	30 Sep 2005 21:16:47 -0000	1.426
+++ config.c	4 Oct 2005 19:52:58 -0000	1.427
@@ -2083,12 +2083,12 @@
     result = -1;
   }
   if (config_parse_addr_policy(options->AuthDirReject, &addr_policy,
-                               ADDR_POLICY_ACCEPT)) {
+                               ADDR_POLICY_REJECT)) {
     log_fn(LOG_WARN, "Error in ReachableAddresses entry.");
     result = -1;
   }
   if (config_parse_addr_policy(options->AuthDirInvalid, &addr_policy,
-                               ADDR_POLICY_ACCEPT)) {
+                               ADDR_POLICY_REJECT)) {
     log_fn(LOG_WARN, "Error in ReachableAddresses entry.");
     result = -1;
   }

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -d -r1.243 -r1.244
--- dirserv.c	30 Sep 2005 01:09:52 -0000	1.243
+++ dirserv.c	4 Oct 2005 19:52:58 -0000	1.244
@@ -58,7 +58,7 @@
     authdir_reject_policy = NULL;
   }
   config_parse_addr_policy(get_options()->AuthDirReject,
-                           &authdir_reject_policy, ADDR_POLICY_ACCEPT);
+                           &authdir_reject_policy, ADDR_POLICY_REJECT);
   /* ports aren't used. */
   for (n=authdir_reject_policy; n; n = n->next) {
     n->prt_min = 1;
@@ -70,7 +70,7 @@
     authdir_invalid_policy = NULL;
   }
   config_parse_addr_policy(get_options()->AuthDirInvalid,
-                           &authdir_invalid_policy, ADDR_POLICY_ACCEPT);
+                           &authdir_invalid_policy, ADDR_POLICY_REJECT);
   /* ports aren't used. */
   for (n=authdir_invalid_policy; n; n = n->next) {
     n->prt_min = 1;
@@ -251,14 +251,14 @@
     addr_policy_result_t inv = router_compare_addr_to_addr_policy(
                        router->addr, router->or_port, authdir_invalid_policy);
 
-    if (rej == ADDR_POLICY_PROBABLY_ACCEPTED || rej == ADDR_POLICY_ACCEPTED) {
+    if (rej == ADDR_POLICY_PROBABLY_REJECTED || rej == ADDR_POLICY_REJECTED) {
       log_fn(LOG_INFO, "Rejecting '%s' because of address %s",
              router->nickname, router->address);
       if (msg)
         *msg = "Authdir is rejecting routers in this range.";
       return FP_REJECT;
     }
-    if (inv == ADDR_POLICY_PROBABLY_ACCEPTED || inv == ADDR_POLICY_ACCEPTED) {
+    if (inv == ADDR_POLICY_PROBABLY_REJECTED || inv == ADDR_POLICY_REJECTED) {
       log_fn(LOG_INFO, "Not marking '%s' valid because of address %s",
              router->nickname, router->address);
       return FP_INVALID;