explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode

(cherry picked from commit 0c42a9c0ab)
This commit is contained in:
Mark Andrews 2019-01-07 14:05:43 +11:00 committed by Evan Hunt
parent 5a31a22986
commit e4f7d6c418
2 changed files with 5 additions and 2 deletions

View file

@ -2471,14 +2471,18 @@ client_request(isc_task_t *task, isc_event_t *event) {
* Parsing the request failed. Send a response
* (typically FORMERR or SERVFAIL).
*/
if (result == DNS_R_OPTERR)
if (result == DNS_R_OPTERR) {
(void)ns_client_addopt(client, client->message,
&client->opt);
}
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
"message parsing failed: %s",
isc_result_totext(result));
if (result == ISC_R_NOSPACE) {
result = DNS_R_FORMERR;
}
ns_client_error(client, result);
goto cleanup;
}

View file

@ -405,7 +405,6 @@ dns_result_torcode(isc_result_t result) {
rcode = dns_rcode_noerror;
break;
case ISC_R_BADBASE64:
case ISC_R_NOSPACE:
case ISC_R_RANGE:
case ISC_R_UNEXPECTEDEND:
case DNS_R_BADAAAA: