diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-10-30 17:47:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-02-09 17:58:30 +0100 |
commit | 30ee7071703226bf84e69f983ad1c08283e4b891 (patch) | |
tree | 35312f820df07866eb24cb49638d2e5a318f4f30 /src/resolve/resolved-dns-stub.c | |
parent | 775ae35403f8f3c01b7ac13387fe8aac1759993f (diff) | |
download | systemd-30ee7071703226bf84e69f983ad1c08283e4b891.tar.gz |
resolved: avoid NOTIMP error when looking up not supported requests
Some folks argue that NOTIMP should only be returned if a specific QTYPE
is not supported. While I don#t think the RFCs are too clear about that,
let's use REFUSED instead, which appears to be a less controversial
choice of error code.
Prompted-by: #17218
Diffstat (limited to 'src/resolve/resolved-dns-stub.c')
-rw-r--r-- | src/resolve/resolved-dns-stub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c index 8c252bfafe..c54e269927 100644 --- a/src/resolve/resolved-dns-stub.c +++ b/src/resolve/resolved-dns-stub.c @@ -703,13 +703,13 @@ static void dns_stub_process_query(Manager *m, DnsStubListenerExtra *l, DnsStrea if (dns_type_is_obsolete(p->question->keys[0]->type)) { log_debug("Got message with obsolete key type, refusing."); - dns_stub_send_failure(m, l, s, p, DNS_RCODE_NOTIMP, false); + dns_stub_send_failure(m, l, s, p, DNS_RCODE_REFUSED, false); return; } if (dns_type_is_zone_transer(p->question->keys[0]->type)) { log_debug("Got request for zone transfer, refusing."); - dns_stub_send_failure(m, l, s, p, DNS_RCODE_NOTIMP, false); + dns_stub_send_failure(m, l, s, p, DNS_RCODE_REFUSED, false); return; } |