Closed tomsommer closed 2 years ago
in lib/Parser/Parser.php#L365
Only the first token should be tested for isTTL. isCLlass or isType If either is true, reuse the $this->lastStatedDomain, else first token is the new Domain.
Currently the first token is taken as a ResourceName if the next token is isTTL. isCLlass or isType
Thank you for your issue - I have created a failing test case on branch issue-107
I will investigate further.
I just ran your example through named-compilezone and it appears to parse the TTLs as resource names as well...
example.com. 3600 IN SOA example.com. post.example.com. 2014110501 3600 14400 604800 3600
example.com. 3600 IN NS ns1.nameserver.com.
360.example.com. 3600 IN TLSA 3 1 1 01CA21026A705F21E7D0745849509B7C3F4DF6862BC422475E0585E4 C074A237
360.example.com. 3600 IN RRSIG TLSA 5 5 360 20220306072900 20220204072900 23262 example.com. bTgf9yyfTe+Vcb/5AV73z42cZBXbLe0i+TOVbaol0gKslEWccsT68FwS axKWdtKG+joWM6G64K2c0meRHONa8A==
; resign=20220306072900
43200.example.com. 3600 IN RRSIG NSEC 5 5 43200 20220306072900 20220204072900 23262 example.com. aUbjBXyihDOA28Si5rBZ3OkV9QyzhnT5E3JT/D30m1TPyJ1yTpo8mvY0 jUclxfNnODN4ug499YI5UDjFLY1bjg==
; resign=20220306072900
_25._tcp.example.com. 43200 IN NSEC _443._tcp.example.com. RRSIG NSEC TLSA
**Note that I had to add SOA and NS records so that it would parse.
So this is the way that BIND will see this particular record - I usually go with "What would BIND do?" as my mantra for developing this library.
This would also be the behaviour you want in something like a PTR record, for example:
$ORIGIN 1.168.192.IN-ADDR.ARPA.
42 PTR doug.adams.com.
Out of interest, what produced the example zone?
The export function at gratisdns.dk produces the output.
Unsure what generates it, but it might be powerdns or something? I doubt the dump itself is homemade.
Top of the dump states ; dnssec_signzone version 9.12.1-P2
Closing issue as this behaviour is consistent with BIND.
When parsing the attached example, a TLSA record named
_25._tcp.example.com
is not returnedIt appears
360
is parsed as the RR nameDocumented here: https://stackoverflow.com/questions/70987780/hostnameless-records-in-zonefile