diff options
author | Roger Dingledine <arma@torproject.org> | 2006-01-10 20:06:24 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-01-10 20:06:24 +0000 |
commit | f71273c21603c47b62ec96a324f869cb9a3c2f00 (patch) | |
tree | dbd21950f3ae87d70c74c8ec632387a7f0e8f92c /src/or/config.c | |
parent | 7fc62029d4d3d7de526b7aa679b96a7da9824aa2 (diff) | |
download | tor-f71273c21603c47b62ec96a324f869cb9a3c2f00.tar.gz tor-f71273c21603c47b62ec96a324f869cb9a3c2f00.zip |
fix bug 235
svn:r5768
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c index aeff69feb0..57165ce900 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1942,9 +1942,8 @@ options_validate(or_options_t *old_options, or_options_t *options) 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_options, or_options_t *options) 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_options, or_options_t *options) } } + 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, { |