aboutsummaryrefslogtreecommitdiff
path: root/src/dnscache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnscache.c')
-rw-r--r--src/dnscache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dnscache.c b/src/dnscache.c
index 44d8e282..57608e8c 100644
--- a/src/dnscache.c
+++ b/src/dnscache.c
@@ -111,6 +111,8 @@ dns_cache_get(int type, const char *keystr, char **rbuf, size_t rcnt)
DBM_DATUM contents;
int res;
+ if (!dns_cache_format->enabled)
+ return mf_failure;
if (dns_make_key(type, keystr, &key))
return mf_failure;
debug1(50, "%s: looking up in cache", MU_DATUM_PTR(key));
@@ -165,6 +167,8 @@ dns_cache_put(int type, const char *keystr, time_t ttl,
size_t len;
int res;
+ if (!dns_cache_format->enabled)
+ return;
if (dns_make_key(type, keystr, &key))
return;
if (mu_dbm_open(dns_cache_format->dbname, &db, MU_STREAM_RDWR,
@@ -238,6 +242,7 @@ dns_expire_item(const void *content)
static struct db_format dns_cache_format_struct = {
"dns",
DEFAULT_DNS_DATABASE,
+ 1,
DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL,
dns_print_item,
dns_expire_item

Return to:

Send suggestions and report system problems to the System administrator.