Open nlyan opened 8 years ago
Indeed, RFC1035 does indicate that $ORIGIN
accepts relative names.
$ORIGIN <domain-name> [<comment>]
...
<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.
From the "why-won't-this-guy-go-away-and-stop-reporting-silly-bugs department". BIND accepts $ORIGIN directives that depend on the current origin. For example:
BIND fails to load the 'ns1' record because it expands to 'ns1.powerdns.com.powerdns.com.' PowerDNS, on the other hand, assumes all $ORIGIN arguments are absolute, and only expands it to 'ns1.powerdns.com.', which completes the zone.
$ zone2json --zone-name=powerdns.com --zone=pdns.zone | jq
RFC 1035 also seems to suggest accepting relative names here is intended.