37d7a7d984
Change the resolved.conf Cache option to a tri-state "no, no-negative, yes" values.
If a lookup returns SERVFAIL systemd-resolved will cache the result for 30s (See 201d995
),
however, there are several use cases on which this condition is not acceptable (See systemd#5552 comments)
and the only workaround would be to disable cache entirely or flush it , which isn't optimal.
This change adds the 'no-negative' option when set it avoids putting in cache
negative answers but still works the same heuristics for positive answers.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
29 lines
1.5 KiB
Plaintext
29 lines
1.5 KiB
Plaintext
%{
|
|
#if __GNUC__ >= 7
|
|
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
|
|
#endif
|
|
#include <stddef.h>
|
|
#include "conf-parser.h"
|
|
#include "resolved-conf.h"
|
|
%}
|
|
struct ConfigPerfItem;
|
|
%null_strings
|
|
%language=ANSI-C
|
|
%define slot-name section_and_lvalue
|
|
%define hash-function-name resolved_gperf_hash
|
|
%define lookup-function-name resolved_gperf_lookup
|
|
%readonly-tables
|
|
%omit-struct-type
|
|
%struct-type
|
|
%includes
|
|
%%
|
|
Resolve.DNS, config_parse_dns_servers, DNS_SERVER_SYSTEM, 0
|
|
Resolve.FallbackDNS, config_parse_dns_servers, DNS_SERVER_FALLBACK, 0
|
|
Resolve.Domains, config_parse_search_domains, 0, 0
|
|
Resolve.LLMNR, config_parse_resolve_support, 0, offsetof(Manager, llmnr_support)
|
|
Resolve.MulticastDNS, config_parse_resolve_support, 0, offsetof(Manager, mdns_support)
|
|
Resolve.DNSSEC, config_parse_dnssec_mode, 0, offsetof(Manager, dnssec_mode)
|
|
Resolve.DNSOverTLS, config_parse_dns_over_tls_mode, 0, offsetof(Manager, dns_over_tls_mode)
|
|
Resolve.Cache, config_parse_dns_cache_mode, DNS_CACHE_MODE_YES, offsetof(Manager, enable_cache)
|
|
Resolve.DNSStubListener, config_parse_dns_stub_listener_mode, 0, offsetof(Manager, dns_stub_listener_mode)
|
|
Resolve.ReadEtcHosts, config_parse_bool, 0, offsetof(Manager, read_etc_hosts) |