From 4f14826cb39395d650800ce2d528141d58663085 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Fri, 17 Mar 2006 23:25:40 +0000 Subject: [PATCH] Actually, only v1 auth dir servers need to define recommendedversions. But versioning dirservers do need to cause recommendclientversions and recommendedserverversions to somehow be non-empty. svn:r6181 --- src/or/config.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index cc4d435a6d..c7bf2866ab 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2172,14 +2172,18 @@ options_validate(or_options_t *old_options, or_options_t *options, if (options->AuthoritativeDir) { if (!options->ContactInfo) REJECT("Authoritative directory servers must set ContactInfo"); - if (VersioningAuthoritativeDir && !options->RecommendedVersions) - REJECT("Versioning auth dir servers must set RecommendedVersions."); + if (options->V1AuthoritativeDir && !options->RecommendedVersions) + REJECT("V1 auth dir servers must set RecommendedVersions."); if (!options->RecommendedClientVersions) options->RecommendedClientVersions = config_lines_dup(options->RecommendedVersions); if (!options->RecommendedServerVersions) options->RecommendedServerVersions = config_lines_dup(options->RecommendedVersions); + if (options->VersioningAuthoritativeDir && + (!options->RecommendedClientVersions || + !options->RecommendedServerVersions)) + REJECT("Versioning auth dir servers must set Recommended*Versions."); if (options->UseEntryGuards) { log_info(LD_CONFIG, "Authoritative directory servers can't set " "UseEntryGuards. Disabling.");