From: Mark Andrews Date: Mon, 7 Jan 2019 03:05:43 +0000 (+1100) Subject: explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove... X-Git-Tag: v9.13.6~68^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c42a9c0aba9a791a8ec7ec835c979634b5bc2ab;p=thirdparty%2Fbind9.git explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode --- diff --git a/lib/dns/result.c b/lib/dns/result.c index ffbe7f760b2..69b7eec91e7 100644 --- a/lib/dns/result.c +++ b/lib/dns/result.c @@ -407,7 +407,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: diff --git a/lib/ns/client.c b/lib/ns/client.c index 36dbb1d2ab0..b71aa73eaa3 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -2445,14 +2445,18 @@ ns__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); return; }