[ldns-users] ldns-read-zone output not very helpful
wouter at nlnetlabs.nl
Wed Jul 21 08:43:11 UTC 2021
On 20/07/2021 23:20, Anand Buddhdev via ldns-users wrote:
> On 20/07/2021 14:59, Paul Wouters wrote:
> Hi Paul,
>> It is the line number. Make a parse error on line 10 and see it fail:
>> [root at ns0 ~]# ldns-read-zone /tmp/nohats.ca Syntax error, could not
>> parse the RR's rdata at 10
> I just tried again:
> % ldns-read-zone ripe.net.zone
> Syntax error, could not parse the RR's class at 3638
> Line 3638 is actually a blank line! Here are the lines before and after it:
> 3636 reg01-test.atlas 86400 A 188.8.131.52
> 3637 reg01-test.atlas 86400 AAAA 2001:67c:2e8:11::184.108.40.206
> 3639 reg02-test.atlas 86400 A 220.127.116.11
> 3640 reg02-test.atlas 86400 AAAA 2001:67c:2e8:11::18.104.22.168
> So I'm completely stumped, and have no idea why ldns-read-zone is
> failing. Would appreciate some help from the developers...
So the error happens because the code is trying to read the class but
this fails. To be precise: the owner name can be read. The TTL can be
read, and if it exists, it parses. But when it then attempts to read the
next token, for the class, that token cannot be read.
You skip the class token and have a type token. But the token itself
cannot be read, I mean it skips spaces and tabs but then fails. So the
token fetch failed at the class position.
Perhaps there is data there, but there is whitespace on the line. And
the empty spaces are read as an owner and TTL, empty values, and then
the class token read finds the end of the buffer and this fails with the
Or there could be invisible unicode characters in the sourcefile. But I
do not immediately see what codepath would then print this error.
The parser should skip lines filled with whitespace I see in the code
rr.c:760. So that should not really happen. The error is from rr.c:233.
Best regards, Wouter
> ldns-users mailing list
> ldns-users at lists.nlnetlabs.nl
More information about the ldns-users