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

[or-cvs] only check if exit_policy_implicitly_allows if you"re a ser...



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	config.c 
Log Message:
only check if exit_policy_implicitly_allows if you're a server.
also, put a comment next to an interesting undocumented 'feature'.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -d -r1.307 -r1.308
--- config.c	1 Feb 2005 13:44:10 -0000	1.307
+++ config.c	2 Feb 2005 01:59:16 -0000	1.308
@@ -1483,7 +1483,11 @@
     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;