mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
dirauth: Refactor some config checks
Minor cleanup and simplification. Part of 32213.
This commit is contained in:
parent
da49c4d78d
commit
3881ac2c86
@ -106,17 +106,17 @@ options_validate_dirauth_mode(const or_options_t *old_options,
|
||||
if (options->GuardfractionFile && !old_options) {
|
||||
dirserv_read_guardfraction_file(options->GuardfractionFile, NULL);
|
||||
}
|
||||
|
||||
if (!options->DirPort_set)
|
||||
REJECT("Running as authoritative directory, but no DirPort set.");
|
||||
|
||||
if (!options->ORPort_set)
|
||||
REJECT("Running as authoritative directory, but no ORPort set.");
|
||||
|
||||
if (options->ClientOnly)
|
||||
REJECT("Running as authoritative directory, but ClientOnly also set.");
|
||||
}
|
||||
|
||||
if (options->AuthoritativeDir && !options->DirPort_set)
|
||||
REJECT("Running as authoritative directory, but no DirPort set.");
|
||||
|
||||
if (options->AuthoritativeDir && !options->ORPort_set)
|
||||
REJECT("Running as authoritative directory, but no ORPort set.");
|
||||
|
||||
if (options->AuthoritativeDir && options->ClientOnly)
|
||||
REJECT("Running as authoritative directory, but ClientOnly also set.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user