]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/cachectl: do not clear private namespaces
authorMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 15 Oct 2015 11:56:16 +0000 (13:56 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 15 Oct 2015 11:56:16 +0000 (13:56 +0200)
modules/cachectl/cachectl.c

index 695f6f0b52f6b68df0dad152ac8d2def4877f3c1..7a76de42b4acc3adf6633099a973a1f4801dc7d7 100644 (file)
@@ -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) {