]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove...
authorMark Andrews <marka@isc.org>
Mon, 7 Jan 2019 03:05:43 +0000 (14:05 +1100)
committerEvan Hunt <each@isc.org>
Wed, 9 Jan 2019 04:50:35 +0000 (20:50 -0800)
(cherry picked from commit 0c42a9c0aba9a791a8ec7ec835c979634b5bc2ab)

lib/dns/result.c
lib/ns/client.c

index fcbe7186e6a11f6b9818d575aff36cbc2b6b39b3..9bfc959831ab5295616370d2a663942965c54101 100644 (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:
index 2667eb75b4e3c47fb53750edc6150a48cbfaba7d..5dae36ad70cecbce58bd9ac5b57ffc8b0ddb9f82 100644 (file)
@@ -2487,14 +2487,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;
        }