Re: [DNSOP] Unexpected REFUSED from BIND when using example config from RFC7706

Bjørn Mork <bjorn@mork.no> Thu, 06 April 2017 12:07 UTC

Return-Path: <bjorn@mork.no>
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 48895129473 for <dnsop@ietfa.amsl.com>; Thu, 6 Apr 2017 05:07:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.3
X-Spam-Level:
X-Spam-Status: No, score=-4.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mork.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 le4nUqtfjuNk for <dnsop@ietfa.amsl.com>; Thu, 6 Apr 2017 05:07:46 -0700 (PDT)
Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B6F71129458 for <dnsop@ietf.org>; Thu, 6 Apr 2017 05:07:43 -0700 (PDT)
Received: from miraculix.mork.no ([IPv6:2a02:2121:2c0:3560:b474:86ff:fe5d:4ecf]) (authenticated bits=0) by canardo.mork.no (8.14.4/8.14.4) with ESMTP id v36C7ajB020393 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 6 Apr 2017 14:07:36 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1491480457; bh=bLEfy92UztBbCn3Mno6J95hUxiHgsaxMIv8TXP1cWrc=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=jCJ4A42y3WBc5AoOCDq4X4baxnsU6+Mkc49IruymdP6y6yS5YtvW4WF6fmda30Z7O 5rxIPpyYG5ZC9CVWT95rHeQST745NvnmTy3O6E64lhDSYJPlVRC/qQf3JxpHHotg7I Plb7q8Et3zH3F0pz2M1IFo/IejTh0FxaOCHI9P+A=
Received: from bjorn by miraculix.mork.no with local (Exim 4.89) (envelope-from <bjorn@mork.no>) id 1cw6CJ-00075J-55; Thu, 06 Apr 2017 14:07:31 +0200
From: =?utf-8?Q?Bj=C3=B8rn_Mork?= <bjorn@mork.no>
To: Tony Finch <dot@dotat.at>
Cc: dnsop@ietf.org
Organization: m
References: <87inmhrjpx.fsf@miraculix.mork.no> <alpine.DEB.2.11.1704061226310.17574@grey.csi.cam.ac.uk>
Date: Thu, 06 Apr 2017 14:07:31 +0200
In-Reply-To: <alpine.DEB.2.11.1704061226310.17574@grey.csi.cam.ac.uk> (Tony Finch's message of "Thu, 6 Apr 2017 12:35:55 +0100")
Message-ID: <87pogppwn0.fsf@miraculix.mork.no>
User-Agent: Gnus/5.130015 (Ma Gnus v0.15) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: clamav-milter 0.99.2 at canardo
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/DYoec2OmDIGPFTJIFV8V6eG_IUk>
Subject: Re: [DNSOP] Unexpected REFUSED from BIND when using example config from RFC7706
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: Thu, 06 Apr 2017 12:07:50 -0000

Tony Finch <dot@dotat.at> writes:
> Bjørn Mork <bjorn@mork.no> wrote:
>>
>> Recently I noticed a side effect of this configuration which I consider
>> unwanted and unexpected: It changes how BIND replies to requests without
>> the RD bit set. BIND will normally answer such requests with a "best
>> possible redirection", using any matching NS set it has in its cache.
>> Which often will be the root NS.  But using the RFC7706 example config,
>> BIND will REFUSE all requests without RD set.
>
> I agree this behaviour is unhelpful and weird. It seems to come from the
> following bit of the source, though the comment doesn't help very much to
> explain the whys or wherefores.
> https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=blob;f=bin/named/query.c;h=0cfdf9288fb16a8f991e7a31f3248118add691d5;hb=HEAD#l1040
>
> 	/*
> 	 * Non recursive query to a static-stub zone is prohibited; its
> 	 * zone content is not public data, but a part of local configuration
> 	 * and should not be disclosed.
> 	 */
> 	if (dns_zone_gettype(zone) == dns_zone_staticstub &&
> 	    !RECURSIONOK(client)) {
> 		return (DNS_R_REFUSED);
> 	}


Thanks for the code pointer!  I tried looking at the git commit log, but
it didn't help explaining this either.  The comment and test were part
of the commit adding the "static-stub" feature.

> You might be able to work around the problem by adding a
> match-recursion-only option to the recursive view, and adding a
> non-recursive view that has allow-query-cache, and use attach-cache
> so all views share the same cache. I have not tried this :-)

And the main objection I hear wrt RFC7706 is that it complicates the
config :)


Bjørn