Zone files with more than one $ORIGIN will produce incorrect (repeating) labels for records with later $ORIGINs that don't explicitly set their name to either '@' or some other name.
For example:
$ORIGIN example.com.
@ 3600 SOA ns1.example.com. (
hostmaster.example.com.
42
3600
600
86400
300
)
$ORIGIN sub.example.com.
@ 3600 CNAME sub2.example.com.
3600 MX 10 mail.example.com.
will produce:
> zone = DNS::Zone::load(File.read('test.zone'))
> zone.records.each{ |r| puts r.label }
@
sub
sub.sub
where the third label should be 'sub'.
Zone files with more than one $ORIGIN will produce incorrect (repeating) labels for records with later $ORIGINs that don't explicitly set their name to either '@' or some other name.
For example:
will produce:
where the third label should be 'sub'.