mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 23:02:05 -04:00
dns_result_torcode() now converts ISC_R_SUCCESS into
dns_rcode_noerror, not dns_rcode_servfail
This commit is contained in:
parent
ae6851be33
commit
542189f21b
3 changed files with 5 additions and 6 deletions
|
|
@ -140,10 +140,7 @@ respond(ns_client_t *client, dns_result_t result) {
|
|||
isc_result_t msg_result;
|
||||
|
||||
message = client->message;
|
||||
if (result == DNS_R_SUCCESS)
|
||||
rcode = dns_rcode_noerror;
|
||||
else
|
||||
rcode = dns_result_torcode(result);
|
||||
rcode = dns_result_torcode(result);
|
||||
|
||||
msg_result = dns_message_reply(message, ISC_TRUE);
|
||||
if (msg_result != ISC_R_SUCCESS)
|
||||
|
|
|
|||
|
|
@ -1730,8 +1730,7 @@ respond(ns_client_t *client, dns_result_t result) {
|
|||
goto msg_failure;
|
||||
|
||||
response->id = client->message->id;
|
||||
response->rcode = (result == DNS_R_SUCCESS ?
|
||||
dns_rcode_noerror : dns_result_torcode(result));
|
||||
response->rcode = dns_result_torcode(result));
|
||||
response->flags = client->message->flags;
|
||||
response->flags |= DNS_MESSAGEFLAG_QR;
|
||||
response->opcode = client->message->opcode;
|
||||
|
|
|
|||
|
|
@ -160,6 +160,9 @@ dns_result_torcode(isc_result_t result) {
|
|||
* Try to supply an appropriate rcode.
|
||||
*/
|
||||
switch (result) {
|
||||
case ISC_R_SUCCESS:
|
||||
return rcode = dns_rcode_noerror;
|
||||
break;
|
||||
case ISC_R_NOSPACE:
|
||||
case ISC_R_UNEXPECTEDEND:
|
||||
case ISC_R_BADBASE64:
|
||||
|
|
|
|||
Loading…
Reference in a new issue