[ldns-users] ldns-read-zone output not very helpful
wouter at nlnetlabs.nl
Wed Jul 21 09:51:06 UTC 2021
On 21/07/2021 11:42, Anand Buddhdev via ldns-users wrote:
> On 21/07/2021 11:21, Wouter Wijngaards via ldns-users wrote:
> Hi Wouter,
>>> The zone file has several $INCLUDE directives, and some of the included
>>> files have $GENERATE directives in them. Could ldns be getting confused
>>> by these? Could it also be reporting the line number *after* including
>>> the files? That would explain why I can't find anything obvious.
>> ldns-read-zone does not support the include and should return an error,
>> in zone.c:262, there it fails for an include directive. Also for the
>> generate directive, that should have been a syntax error. Is it reading
>> a different, processed, file?
> ldns-read-zone is just reading the unprocessed ripe.net.zone file. I
> understand that $GENERATE is a BIND-specific directive, and isn't
> supported by other utilities.
But then it should fail on that, and not really this error. From reading
the source code then, is that really what happens?
> However, why would ldns not support $INCLUDE directives? They are a part
> of the standard, and any DNS zone processing utility must handle them. A
> lot of people break up their zones into small units to keep things tidy.
> IMHO, if ldns-read-zone won't support a very commonly-used feature of
> the DNS zone file standard, then it's not a very useful tool.
No specific reason that I know, I think it is just not implemented. I
think also NSD did not have include processing in older versions,
perhaps also at that time.
> Also, if ldns-read-zone doesn't like the $INCLUDE directive, then it
> should emit a more useful response. The error it's printing currently
> isn't helping operators at all.
It should print "Syntax error, $INCLUDE not implemented" at the line
with that statement. Since you claim the file has includes at the start,
I think the error may really be from another file entirely, since the
tool would not be able to read past that not-implemented include directive.
Best regards, Wouter
> ldns-users mailing list
> ldns-users at lists.nlnetlabs.nl
More information about the ldns-users