From patchwork Fri Feb 7 17:50:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 37745 Received: (qmail 11058 invoked by alias); 7 Feb 2020 17:50:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11045 invoked by uid 89); 7 Feb 2020 17:50:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=CNAME X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581097832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92yxlfB1VgbK1OVSdv/IYTT53AA8OlvmLd/99jZaWq8=; b=PjIXEIK0LTsJUPT6tkPxW/h6JoTWodwr+UqpNILyGeQ218Bo45a6n1JumqX7fVwSVBxIKB bSf0MtDZ08+G/ifvM7KL1Ag4ZtwfvYT0Mm0wjKC90vqJohCvVyqYkHZelkmxlQFZKaOe1e atJt3abpYKdsZ7E1VvQRaIxXOjF1u0M= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] resolv: Fix CNAME chaining in resolv/tst-resolv-ai_idn-common.c Date: Fri, 07 Feb 2020 18:50:23 +0100 Message-ID: <875zgi5lsw.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com The second CNAME record optionally generated by the response function used the question name, not the redirected name from the first CNAME. This breaks the chain and results in failures of these IDNA tests if CNAME owner names are checked as expected (which the current implementation does not do). ----- resolv/tst-resolv-ai_idn-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolv/tst-resolv-ai_idn-common.c b/resolv/tst-resolv-ai_idn-common.c index 9e8ed7611c..97eb617cfa 100644 --- a/resolv/tst-resolv-ai_idn-common.c +++ b/resolv/tst-resolv-ai_idn-common.c @@ -219,8 +219,9 @@ response (const struct resolv_response_context *ctx, } if (with_idn_cname) { + const char *previous_name = next_name; next_name = ANDERES_NAEMCHEN_IDNA ".example"; - resolv_response_open_record (b, qname, C_IN, T_CNAME, 0); + resolv_response_open_record (b, previous_name, C_IN, T_CNAME, 0); resolv_response_add_name (b, next_name); resolv_response_close_record (b); }