if (l->dns_over_tls_mode != mode) {
link_set_dns_over_tls_mode(l, mode);
+ link_allocate_scopes(l);
(void) link_save_user(l);
if (l->dnssec_mode != mode) {
link_set_dnssec_mode(l, mode);
+ link_allocate_scopes(l);
(void) link_save_user(l);
#endif
l->dns_over_tls_mode = mode;
+ l->unicast_scope = dns_scope_free(l->unicast_scope);
}
static int link_update_dns_over_tls_mode(Link *l) {
if (l->dnssec_mode == mode)
return;
- if ((l->dnssec_mode == _DNSSEC_MODE_INVALID) ||
- (l->dnssec_mode == DNSSEC_NO && mode != DNSSEC_NO) ||
- (l->dnssec_mode == DNSSEC_ALLOW_DOWNGRADE && mode == DNSSEC_YES)) {
-
- /* When switching from non-DNSSEC mode to DNSSEC mode, flush the cache. Also when switching from the
- * allow-downgrade mode to full DNSSEC mode, flush it too. */
- if (l->unicast_scope)
- dns_cache_flush(&l->unicast_scope->cache);
- }
-
l->dnssec_mode = mode;
+ l->unicast_scope = dns_scope_free(l->unicast_scope);
}
static int link_update_dnssec_mode(Link *l) {