Open SamLR opened 7 years ago
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'.
My example is bit more weird:
$ORIGIN domain.com. test A 1.2.3.4
results the record will be test.domaincom. Which is pretty not what I need.
test.domaincom
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'.