aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
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 93adb5437..824e5643c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -655,6 +655,10 @@ int getconfig(int argc, char **argv, or_options_t *options) {
log(LOG_WARN,"DirFetchPostPeriod option must be positive.");
result = -1;
}
+ if(options->DirFetchPostPeriod > MIN_ONION_KEY_LIFETIME/2) {
+ log(LOG_WARN,"DirFetchPostPeriod is too large; clipping.");
+ options->DirFetchPostPeriod = MIN_ONION_KEY_LIFETIME/2;
+ }
if(options->KeepalivePeriod < 1) {
log(LOG_WARN,"KeepalivePeriod option must be positive.");