[bind10-dev] Zone loading requirements, take 1

Mark Andrews marka at isc.org
Tue Mar 6 14:31:17 UTC 2012


In message <20120306131235.GY22296 at x27.adm.denic.de>, Peter Koch writes:
> On Tue, Mar 06, 2012 at 12:29:13PM +0000, Stephen Morris wrote:
> 
> > > 3.3.6 $ORIGIN control entry
> > How about adding a requirement that if $ORIGIN is specified, it is a 
> > fatal error for the argument not to be a fully-qualified domain name? 
> > (I am thinking of the case back in 2009 where the trailing "." was 
> > missed in the zone file of a TLD ...)
> 
> RFC 1035 isn't too consistent about <domain-name>.  Section 3.3 defines
> 
>   <domain-name> is a domain name represented as a series of labels, and
>   terminated by a label with zero length.
> 
> This is what we'd call wire format today. Later, section 5 says
> 
>   <domain-name>s make up a large share of the data in the master file.
>   The labels in the domain name are expressed as character strings and
>   separated by dots.  Quoting conventions allow arbitrary characters to be
>   stored in domain names.  Domain names that end in a dot are called
>   absolute, and are taken as complete.  Domain names which do not end in a
>   dot are called relative; the actual domain name is the concatenation of
>   the relative part with an origin specified in a $ORIGIN, $INCLUDE, or as
>   an argument to the master file loading routine.  A relative name is an
>   error when no origin is available.
> 
> In the context of a zone file that means <domain-name> is in presentation
> format and would thus allow for relative domain names even in a $ORIGIN
> statement, provided an origin was available before the statement.
> 
> On a related note, the syntax element <blank> seems undefined, but
> the use of
> 
> 	<blank><rr> [<comment>]
> 
> suggests it consists of at least one white space. That said, comments
> ought to start after a blank only
> 
>     <blank>[<comment>]
> 
> unless one interprets
> 
>   Blank lines, with or without comments, are allowed anywhere in the file.
> 
> to allow for 'blank lines with comments, i.e., lines with nothing but
> a comment.  1035 is a source of never ending surprise - and i'm not suggestin
> g
> to enforce the <blank>[<comment>] rule ;-)


<blank>[<comment>] means you need to handle leading whitespace before a
comment as leading whitespace is syntactically significant.  This is a
easy thing to botch.

> -Peter
> _______________________________________________
> bind10-dev mailing list
> bind10-dev at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind10-dev
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org


More information about the bind10-dev mailing list