]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
only check if exit_policy_implicitly_allows if you're a server.
authorRoger Dingledine <arma@torproject.org>
Wed, 2 Feb 2005 01:59:16 +0000 (01:59 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 2 Feb 2005 01:59:16 +0000 (01:59 +0000)
also, put a comment next to an interesting undocumented 'feature'.

svn:r3499

src/or/config.c

index ea922595d3bd78d105cba6297cadb8c36f6bc8f0..41f8c3f1ec96244b0b67edb3e4d51e0b7b179bd3 100644 (file)
@@ -1483,7 +1483,11 @@ options_validate(or_options_t *options)
     log_fn(LOG_WARN, "Error in Exit Policy entry.");
     result = -1;
   }
-  exit_policy_implicitly_allows_local_networks(addr_policy, 1);
+  if (server_mode(options)) {
+    exit_policy_implicitly_allows_local_networks(addr_policy, 1);
+  }
+  /* The rest of these calls *append* to addr_policy. So don't actually
+   * use the results for anything other than checking if they parse! */
   if (config_parse_addr_policy(options->DirPolicy, &addr_policy)) {
     log_fn(LOG_WARN, "Error in DirPolicy entry.");
     result = -1;