mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
return FORMERR when question section is empty if COOKIE is not present
This commit is contained in:
committed by
Evan Hunt
parent
be26328849
commit
06d3106002
@@ -2552,9 +2552,10 @@ ns__client_request(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
|
||||
if (client->message->rdclass == 0) {
|
||||
if ((client->attributes & NS_CLIENTATTR_WANTCOOKIE) != 0 ||
|
||||
(client->message->opcode == dns_opcode_query &&
|
||||
client->message->counts[DNS_SECTION_QUESTION] == 0U)) {
|
||||
if ((client->attributes & NS_CLIENTATTR_WANTCOOKIE) != 0 &&
|
||||
client->message->opcode == dns_opcode_query &&
|
||||
client->message->counts[DNS_SECTION_QUESTION] == 0U)
|
||||
{
|
||||
result = dns_message_reply(client->message, ISC_TRUE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_client_error(client, result);
|
||||
|
Reference in New Issue
Block a user