Commit 542189f2 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

dns_result_torcode() now converts ISC_R_SUCCESS into

dns_rcode_noerror, not dns_rcode_servfail
parent ae6851be
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment