From: Marek VavruĊĦa Date: Thu, 15 Oct 2015 11:56:16 +0000 (+0200) Subject: modules/cachectl: do not clear private namespaces X-Git-Tag: v1.0.0-beta2~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffee0a79c54d644723aeb58bde7cae0445a356b5;p=thirdparty%2Fknot-resolver.git modules/cachectl: do not clear private namespaces --- diff --git a/modules/cachectl/cachectl.c b/modules/cachectl/cachectl.c index 695f6f0b5..7a76de42b 100644 --- a/modules/cachectl/cachectl.c +++ b/modules/cachectl/cachectl.c @@ -169,6 +169,11 @@ static char* prune(void *env, struct kr_module *module, const char *args) storage->iter_val(it, &val) != 0) { break; } + /* Ignore special namespaces. */ + if (key.len < 2 || ((const char *)key.data)[0] == 'V') { + it = storage->iter_next(it); + continue; + } /* Prune expired records. */ struct kr_cache_entry *entry = val.data; if (entry->timestamp > now.tv_sec) {