Comment

Comment by nly

The DNS "master file"/"zone file" format is a bloody disaster for the same reason, and practically unparseable. Every implementation parses them differently when it comes to parenthesis.

From the grammar in RFC 1035:

    <domain-name><rr> [<comment>]

    <blank><rr> [<comment>]

    <rr> contents take one of the following forms:

        [<TTL>] [<class>] <type> <RDATA>

        [<class>] [<TTL>] <type> <RDATA>
All the columns being optional creates the ambiguity between the <class> and <domain-name> columns in the TTL missing/2nd form. In the real world <class> is always "IN". It's even worse since the set of <type>'s is unbounded and the <RDATA> grammar depends on <type>

I believe this is one reason why tinydns has its own format https://cr.yp.to/djbdns/tinydns-data.html

parent nly 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton