summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2017-11-04 16:37:41 +0100
committerSebastian Hahn <sebastian@torproject.org>2017-11-04 18:31:02 +0100
commitd3fee8b82395f95a925b9adcb7b3a66ae0d5a0ef (patch)
treea38c8bb23187a9bc71389f438882d0fe9f120328 /src/or/config.c
parente491c05f96387178da0958614084cd6ab30f5ea7 (diff)
downloadtor-d3fee8b82395f95a925b9adcb7b3a66ae0d5a0ef.tar.gz
tor-d3fee8b82395f95a925b9adcb7b3a66ae0d5a0ef.zip
ClientDNSRejectInternalAddresses in non-default networks
Once again allow the flag to be set, unless the default network is used. Thanks to nickm for a suggestion for the workaround to a test failure.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index bba2532000..d6e1abaa10 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4216,6 +4216,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
CHECK_DEFAULT(TestingLinkKeySlop);
#undef CHECK_DEFAULT
+ if (!options->ClientDNSRejectInternalAddresses &&
+ !(options->DirAuthorities ||
+ (options->AlternateDirAuthority && options->AlternateBridgeAuthority)))
+ REJECT("ClientDNSRejectInternalAddresses used for default network.");
if (options->SigningKeyLifetime < options->TestingSigningKeySlop*2)
REJECT("SigningKeyLifetime is too short.");
if (options->TestingLinkCertLifetime < options->TestingAuthKeySlop*2)