NLnetLabs / simdzone

Fast and standards compliant DNS zone parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement secondary mode

k0ekk0ek opened this issue · comments

simdzone attempts to be as strict as possible. However, when running as a secondary, it's useful to be lax. At least, the parser in NSD does so. The reason for this is that a zone may receive an update from the primary that contained data that would not have been accepted if submitted via zone file. The secondary may write this data to disk in text representation and read it back at a later stage. In this situation, data that has previously been loaded may be rejected on restart. It's probably best to add an option that enables a special mode of operation(?) Make an overview of all edge cases that are accepted by NSD when running as a secondary, capture them in test cases and verify everything works as intended.

One thing that the parser must not do if secondary, is reorder SVC_PARAM fields in rdata, which is something that should be done if zone content is read in primary mode.