Re: [dnsext] BADVER/FORMERR

Mark Andrews <marka@isc.org> Sat, 12 November 2011 22:14 UTC

Return-Path: <marka@isc.org>
X-Original-To: dnsext@ietfa.amsl.com
Delivered-To: dnsext@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 42B7521F8663 for <dnsext@ietfa.amsl.com>; Sat, 12 Nov 2011 14:14:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.301
X-Spam-Level:
X-Spam-Status: No, score=-2.301 tagged_above=-999 required=5 tests=[AWL=-0.302, BAYES_00=-2.599, J_CHICKENPOX_57=0.6]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id scIjddOpdKp1 for <dnsext@ietfa.amsl.com>; Sat, 12 Nov 2011 14:14:58 -0800 (PST)
Received: from mx.ams1.isc.org (mx.ams1.isc.org [IPv6:2001:500:60::65]) by ietfa.amsl.com (Postfix) with ESMTP id 8D0A721F8593 for <dnsext@ietf.org>; Sat, 12 Nov 2011 14:14:58 -0800 (PST)
Received: from bikeshed.isc.org (bikeshed.isc.org [IPv6:2001:4f8:3:d::19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "bikeshed.isc.org", Issuer "ISC CA" (verified OK)) by mx.ams1.isc.org (Postfix) with ESMTPS id 5AB625F984C; Sat, 12 Nov 2011 22:14:36 +0000 (UTC) (envelope-from marka@isc.org)
Received: from drugs.dv.isc.org (unknown [IPv6:2001:470:1f00:820:6233:4bff:fe01:7585]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bikeshed.isc.org (Postfix) with ESMTPSA id 03399216C85; Sat, 12 Nov 2011 22:14:05 +0000 (UTC) (envelope-from marka@isc.org)
Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (Postfix) with ESMTP id 861341712639; Sun, 13 Nov 2011 09:14:05 +1100 (EST)
To: Olafur Gudmundsson <ogud@ogud.com>
From: Mark Andrews <marka@isc.org>
References: <20111111025007.B689B17061FA@drugs.dv.isc.org> <4EBEC277.7070306@ogud.com>
In-reply-to: Your message of "Sat, 12 Nov 2011 14:01:11 CDT." <4EBEC277.7070306@ogud.com>
Date: Sun, 13 Nov 2011 09:14:05 +1100
Message-Id: <20111112221405.861341712639@drugs.dv.isc.org>
Cc: dnsext@ietf.org
Subject: Re: [dnsext] BADVER/FORMERR
X-BeenThere: dnsext@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: DNS Extensions working group discussion list <dnsext.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsext>, <mailto:dnsext-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dnsext>
List-Post: <mailto:dnsext@ietf.org>
List-Help: <mailto:dnsext-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsext>, <mailto:dnsext-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Nov 2011 22:14:59 -0000

In message <4EBEC277.7070306@ogud.com>, Olafur Gudmundsson writes:
> On 10/11/2011 21:50, Mark Andrews wrote:
> >
> > I was looking for a good way to test for EDNS support and hacked
> > dig to send out a empty question section when the EDNS version was
> > set to 255 and got what I believe to be incorrect responses from K
> > and L.  EDNS version processing is supposed to take precedence over
> > examining the query section as the EDNS version can influence the
> > interpretion of the question section.  I believe the correct response
> > should be BADVERS.  Adding a question elicited BADVERS.
> >
> > Do others agree with my interpretion of rcode precedence?
> >
> 
> <no hat>
> Formerr is perfectly valid return code.
> It is the first error you detect and you can stop processing
> right then.
> (This assumes that the QR=0)
> 
> Reasoning: You sent a question that is not a real question
> I see nothing in ENDS0 rfcs that say you need to look into the
> opt record if the DNS packet is malformed, QR=0 and QDCOUNT=0
> is malformed packet IMHO.

Even if FORMERR is returned, the response is also missing the OPT
record which is required to be sent by EDNS aware servers.  If you
can't parse the packet to get to the OPT record then a 12 octet
FORMERR is appropriate.  This packet is parsable.

   VERSION         Indicates the implementation level of whoever sets
                   it.  Full conformance with this specification is
                   indicated by version "0."  Requestors are encouraged
                   to set this to the lowest implemented level capable
                   of expressing a transaction, to minimize the
                   responder and network load of discovering the
                   greatest common implementation level between
                   requestor and responder.  A requestor's version
                   numbering strategy should ideally be a run time
                   configuration option.

                   If a responder does not implement the VERSION level
                   of the request, then it answers with RCODE=BADVERS.
                   All responses will be limited in format to the
                   VERSION level of the request, but the VERSION of each
                   response will be the highest implementation level of
                   the responder.  In this way a requestor will learn
                   the implementation level of a responder as a side
                   effect of every response, including error responses,
                   including RCODE=BADVERS.
 
> 	Olafur
> _______________________________________________
> dnsext mailing list
> dnsext@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsext
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka@isc.org