From: Tony Finch Date: Sun, 21 Jun 2020 20:17:51 +0000 (+0100) Subject: Fix `rndc dnstap -roll N` X-Git-Tag: v9.17.3~42^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c07129a51e8686d41e2915e83838129219f31f7;p=thirdparty%2Fbind9.git Fix `rndc dnstap -roll N` The `rndc` argument was always overridden by the static configuration, because the logic for handling the number of dnstap files to retain was both backwards and a bit redundant. --- diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index 42de18f9e41..f6073db9915 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -337,7 +337,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) { fstrm_iothr_destroy(&env->iothr); } - if (roll != 0) { + if (roll == 0) { roll = env->rolls; } @@ -349,7 +349,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) { char *filename = isc_mem_strdup(env->mctx, env->path); file.name = filename; file.stream = NULL; - file.versions = roll != 0 ? roll : env->rolls; + file.versions = roll; file.maximum_size = 0; file.maximum_reached = false; file.suffix = env->suffix;