[bind10-dev] Zone loading requirements, take 1

Peter Koch pk at DENIC.DE
Tue Mar 6 13:12:35 UTC 2012


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 suggesting
to enforce the <blank>[<comment>] rule ;-)

-Peter


More information about the bind10-dev mailing list