Compare commits

...

2 Commits

Author SHA1 Message Date
Petr Špaček
08e5448f4e DO NOT MERGE: hack for measurements: dump cache in plain zone format
Sometimes it's handy to dump cache in a format which can be processed
using standard tools. Don't forget fgrep -v '$DATE'.
2021-12-02 10:13:47 +01:00
Petr Špaček
dcf68f6c23 DO NOT MERGE: hack for measurements: cache RRsets for one day
NEVER USE IN PRODUCTION! It's a dirty hack for interoperability tests.

Sometimes combined with
servfail-ttl 0;
lame-ttl 0;
2021-12-02 10:12:44 +01:00
4 changed files with 8 additions and 5 deletions

View File

@@ -163,8 +163,8 @@ options {\n\
max-recursion-queries 100;\n\
max-stale-ttl 86400; /* 1 day */\n\
message-compression yes;\n\
min-ncache-ttl 0; /* 0 hours */\n\
min-cache-ttl 0; /* 0 seconds */\n\
min-ncache-ttl 86400; /* hack for measurements */\n\
min-cache-ttl 86400; /* hack for measurements */\n\
minimal-any false;\n\
minimal-responses no-auth-recursive;\n\
notify-source *;\n\

View File

@@ -11396,7 +11396,7 @@ resume:
if (dctx->dumpexpired) {
style = &dns_master_style_cache_with_expired;
} else {
style = &dns_master_style_cache;
style = &dns_master_style_full; /* hack for measurements */
}
/* start cache dump */
if (dctx->view->view->cachedb != NULL) {

View File

@@ -19,11 +19,11 @@
#include <isccfg/cfg.h>
#ifndef MAX_MIN_CACHE_TTL
#define MAX_MIN_CACHE_TTL 90
#define MAX_MIN_CACHE_TTL 864000
#endif /* MAX_MIN_CACHE_TTL */
#ifndef MAX_MIN_NCACHE_TTL
#define MAX_MIN_NCACHE_TTL 90
#define MAX_MIN_NCACHE_TTL 864000
#endif /* MAX_MIN_NCACHE_TTL */
#ifndef MAX_MAX_NCACHE_TTL

View File

@@ -727,8 +727,11 @@ dns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset,
ttl = rrsig->timeexpire - now;
}
/*
ttl = ISC_MIN(ISC_MIN(rdataset->ttl, sigrdataset->ttl),
ISC_MIN(rrsig->originalttl, ttl));
*/
ttl = 86400; /* hack for measurements */
rdataset->ttl = ttl;
sigrdataset->ttl = ttl;
}