And add a note to the man page that `rndc validation` flushes the
cache when the validation state is changed. (It is necessary to flush
the cache when turning on validation, to avoid continuing to use
cryptographically invalid data. It is probably wise to flush the cache
when turning off validation to recover from lameness problems.)
if ((ptr != NULL && strcasecmp(ptr, view->name) != 0)
|| strcasecmp("_bind", view->name) == 0)
continue;
- CHECK(dns_view_flushcache(view, false));
if (set) {
+ CHECK(dns_view_flushcache(view, false));
view->enablevalidation = enable;
changed = true;
} else {
<para>
Enable, disable, or check the current status of
DNSSEC validation. By default, validation is enabled.
+ The cache is flushed when validation is turned on or off
+ to avoid using data that might differ between states.
</para>
</listitem>
</varlistentry>