Browse Source

r17469@catbus: nickm | 2008-01-05 20:14:07 -0500
Fix bug 579: Count DNSPort and hidden services when checking whether Tor is going to do anything. Change "no configured ports" from fatal to warning.


svn:r13036

Nick Mathewson 17 years ago
parent
commit
17036de8b7
2 changed files with 12 additions and 3 deletions
  1. 6 0
      ChangeLog
  2. 6 3
      src/or/config.c

+ 6 - 0
ChangeLog

@@ -28,6 +28,12 @@ Changes in version 0.2.0.16-alpha - 2008-01-??
   o Minor features (controller):
   o Minor features (controller):
     - Get NS events working again.  (Patch from tup)
     - Get NS events working again.  (Patch from tup)
 
 
+  o Minor features (other):
+    - Add hidden services and DNSPorts to the list of things that make
+      Tor accept that it has running ports.  Change starting Tor with
+      no ports from a fatal error to a warning; we might change it
+      back if this turns out to confuse anybody.  (Fixes bug 579.)
+
 Changes in version 0.2.0.15-alpha - 2007-12-25
 Changes in version 0.2.0.15-alpha - 2007-12-25
   o Major bugfixes:
   o Major bugfixes:
     - Fix several remotely triggerable asserts based on DirPort requests
     - Fix several remotely triggerable asserts based on DirPort requests

+ 6 - 3
src/or/config.c

@@ -2745,9 +2745,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
     REJECT("NatdPort option out of bounds.");
     REJECT("NatdPort option out of bounds.");
 
 
   if (options->SocksPort == 0 && options->TransPort == 0 &&
   if (options->SocksPort == 0 && options->TransPort == 0 &&
-      options->NatdPort == 0 && options->ORPort == 0)
-    REJECT("SocksPort, TransPort, NatdPort, and ORPort are all undefined? "
-           "Quitting.");
+      options->NatdPort == 0 && options->ORPort == 0 &&
+      options->DNSPort == 0 && !options->RendConfigLines)
+    log(LOG_WARN, LD_CONFIG,
+        "SocksPort, TransPort, NatdPort, DNSPort, and ORPort are all "
+        "undefined, and there aren't any hidden services configured.  "
+        "Tor will still run, but probably won't do anything.");
 
 
   if (options->ControlPort < 0 || options->ControlPort > 65535)
   if (options->ControlPort < 0 || options->ControlPort > 65535)
     REJECT("ControlPort option out of bounds.");
     REJECT("ControlPort option out of bounds.");