From: Lennart Poettering Date: Fri, 30 Oct 2020 16:47:43 +0000 (+0100) Subject: resolved: avoid NOTIMP error when looking up not supported requests X-Git-Tag: v248-rc1~158^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30ee7071703226bf84e69f983ad1c08283e4b891;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c index 8c252bfafe5..c54e269927a 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; }