mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
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
This commit is contained in:
parent
775ae35403
commit
30ee707170
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user