]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
ORPort must be defined if ORBindAddress is defined.
authorRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 06:51:46 +0000 (06:51 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 06:51:46 +0000 (06:51 +0000)
svn:r3100

src/or/config.c

index a7aaf023a5edfa0e4b1159ee9dd553ea0ef9eb0f..5994e6e8071e8cb267f9a4fbce0dd2dceca29d30 100644 (file)
@@ -1137,6 +1137,12 @@ options_validate(or_options_t *options)
     result = -1;
   }
 
+  /* XXX might similarly want to check the other *BindAddress options */
+  if (options->ORPort == 0 && options->ORBindAddress != NULL) {
+    log(LOG_WARN, "ORPort must be defined if ORBindAddress is defined.");
+    result = -1;
+  }
+
   if (validate_data_directory(options)<0) {
     log(LOG_WARN, "Invalid DataDirectory");
     result = -1;