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

[or-cvs] fix bug 235



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

Modified Files:
	config.c 
Log Message:
fix bug 235


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.481
retrieving revision 1.482
diff -u -p -d -r1.481 -r1.482
--- config.c	10 Jan 2006 20:00:20 -0000	1.481
+++ config.c	10 Jan 2006 20:06:24 -0000	1.482
@@ -1942,9 +1942,8 @@ options_validate(or_options_t *old_optio
   if (options->AuthoritativeDir && !options->ORPort)
     REJECT("Running as authoritative directory, but no ORPort set.");
 
-  if (options->AuthoritativeDir && options->ClientOnly) {
+  if (options->AuthoritativeDir && options->ClientOnly)
     REJECT("Running as authoritative directory, but ClientOnly also set.");
-  }
 
   if (options->AuthoritativeDir && options->NoPublish)
     REJECT("You cannot set both AuthoritativeDir and NoPublish.");
@@ -1963,12 +1962,10 @@ options_validate(or_options_t *old_optio
     options->_AccountingMaxKB = 0;
   }
 
-  if (validate_ports_csv(options->FirewallPorts,
-                         "FirewallPorts") < 0)
+  if (validate_ports_csv(options->FirewallPorts, "FirewallPorts") < 0)
     result = -1;
 
-  if (validate_ports_csv(options->LongLivedPorts,
-                         "LongLivedPorts") < 0)
+  if (validate_ports_csv(options->LongLivedPorts, "LongLivedPorts") < 0)
     result = -1;
 
   if (options->FascistFirewall && !options->ReachableAddresses) {
@@ -2016,6 +2013,11 @@ options_validate(or_options_t *old_optio
     }
   }
 
+  if (options->ReachableAddresses && server_mode(options))
+    REJECT("Servers must be able to freely connect to the rest "
+           "of the Internet, so they must not set ReachableAddresses "
+           "or FascistFirewall.");
+
   options->_AllowUnverified = 0;
   if (options->AllowUnverifiedNodes) {
     SMARTLIST_FOREACH(options->AllowUnverifiedNodes, const char *, cp, {