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

Bjørn Mork <> Thu, 06 April 2017 12:07 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 48895129473 for <>; Thu, 6 Apr 2017 05:07:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.3
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id le4nUqtfjuNk for <>; Thu, 6 Apr 2017 05:07:46 -0700 (PDT)
Received: from ( [IPv6:2001:4641::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B6F71129458 for <>; Thu, 6 Apr 2017 05:07:43 -0700 (PDT)
Received: from ([IPv6:2a02:2121:2c0:3560:b474:86ff:fe5d:4ecf]) (authenticated bits=0) by (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;; 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 with local (Exim 4.89) (envelope-from <>) id 1cw6CJ-00075J-55; Thu, 06 Apr 2017 14:07:31 +0200
From: Bjørn Mork <>
To: Tony Finch <>
Organization: m
References: <> <>
Date: Thu, 06 Apr 2017 14:07:31 +0200
In-Reply-To: <> (Tony Finch's message of "Thu, 6 Apr 2017 12:35:55 +0100")
Message-ID: <>
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: <>
Subject: Re: [DNSOP] Unexpected REFUSED from BIND when using example config from RFC7706
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: IETF DNSOP WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 06 Apr 2017 12:07:50 -0000

Tony Finch <> writes:
> Bjørn Mork <> 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.
> 	/*
> 	 * 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 :)