Re: [DNSOP] RCODE and CNAME chain

"Peter van Dijk" <peter.van.dijk@powerdns.com> Wed, 05 April 2017 07:03 UTC

Return-Path: <peter.van.dijk@powerdns.com>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8F7F7128B44 for <dnsop@ietfa.amsl.com>; Wed, 5 Apr 2017 00:03:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EqdoU25ztLR7 for <dnsop@ietfa.amsl.com>; Wed, 5 Apr 2017 00:03:47 -0700 (PDT)
Received: from shannon.7bits.nl (shannon.7bits.nl [IPv6:2a01:1b0:202:40::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E30011292FD for <dnsop@ietf.org>; Wed, 5 Apr 2017 00:03:40 -0700 (PDT)
Received: from [192.168.137.1] (unknown [IPv6:2001:610:666:0:ec43:d35c:953f:7ad]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: peter) by shannon.7bits.nl (Postfix) with ESMTPSA id 471FEC1B96; Wed, 5 Apr 2017 09:03:39 +0200 (CEST)
From: Peter van Dijk <peter.van.dijk@powerdns.com>
To: dnsop@ietf.org
Date: Wed, 05 Apr 2017 09:03:43 +0200
Message-ID: <73DD364E-12F0-4367-964D-6C18E37BC12B@powerdns.com>
In-Reply-To: <20170405054338.GA15831@jurassic>
References: <20170405054338.GA15831@jurassic>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=_MailMate_E9737506-7D9B-40F1-992F-14D5E6CAE68D_="; micalg="pgp-sha1"; protocol="application/pgp-signature"
X-Mailer: MailMate (1.9.6r5347)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/IiF0aRet2vbmDIvPRb8aUo9yUqk>
Subject: Re: [DNSOP] RCODE and CNAME chain
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Apr 2017 07:03:49 -0000

Hello Mukund,

On 5 Apr 2017, at 7:43, Mukund Sivaraman wrote:

> Evan just pointed out a case due to a system test failure that is
> interesting.. it's not clear what the behavior should be in this case,
> so please discuss:
>
> There's a nameserver that's authoritative for 2 zones example.org. and
> example.com.
>
> In the example.org. zone, foo.example.org. is CNAME to bar.example.com.
>
> In the example.com. zone, the name bar.example.com. doesn't exist (NXDOMAIN).
>
> A query for "foo.example.org./A" is answered by the nameserver. It adds
> the foo.example.org. CNAME bar.example.com. in the answer section, and
> then, following RFC 1034 4.3.2. 3.(a.), sets the QNAME to
> "bar.example.com" and looks into the "example.com" zone for
> "bar.example.com.". It is not found.
>
> The question is: what is the expected reply RCODE for this?
>
> 1. Is it NOERROR (0) because there is an answer section with the CNAME?
>
> 2. Is it NXDOMAIN (3) because the CNAME target was not found?

NXDOMAIN is correct. The text on this on 103x is a bit weak but 2308 2.1 clarifies this.

> 3. Does it not matter if it is either?

2308 does say
“
Some name servers fail to set the RCODE to NXDOMAIN in the presence
of CNAMEs in the answer section.  If a definitive NXDOMAIN / NODATA
answer is required in this case the resolver must query again using
the QNAME as the query label.
“

but not all resolvers honour this. So I’d say it does matter.

Kind regards,
-- 
Peter van Dijk
PowerDNS.COM BV - https://www.powerdns.com/