6
85
Fork
You've already forked dns
39

parse a zone as-is #877

Open
opened 2026年05月27日 20:20:42 +02:00 by miekg · 4 comments
Owner
Copy link

from miekg/dnsv1: Also miekg/dns does not have an option to leave $-directives as-is.

maybe that would be nice to add

from miekg/dnsv1: `Also miekg/dns does not have an option to leave $-directives as-is.` maybe that _would_ be nice to add

It would also be nice to add an error tolerant parser where it doesn't fail on a single broken record ?
Right now we are forced to parse RR by RR for single record broken zones

It would also be nice to add an error tolerant parser where it doesn't fail on a single broken record ? Right now we are forced to parse RR by RR for single record broken zones
Author
Owner
Copy link

might make sense too, yes

how do you end up with broken records in a zone?

might make sense too, yes how do you end up with broken records in a zone?

I can think of multiple cases - if your policy as a DNS provider is not to break zones on a single broken record you have to accept the zone without the broken record
A) Most common case would be an upstream bind master with "check-names master ignore;check-names slave ignore;"
Bind is chugging along happily masking operator mistakes because purposefully a lot of people run those options to not completely trash their zones if there are issues
You have no control of whats served upstream via AXFR/IXFR to anything thats running miekg/dns v2 , bind sends the zone with even a single broken record operators upstream can have a single broken record and then you have to fall back to per record RR parsing killing performance of whole zone parsing
B) multiple versions of bind dont validate IXFR they just relay it you can get anything on IXFR
C) You dont have proper verification yourself for a specific record type and you allow anything to be typed into it - parser fails due to this

I can think of multiple cases - if your policy as a DNS provider is not to break zones on a single broken record you have to accept the zone without the broken record A) Most common case would be an upstream bind master with "check-names master ignore;check-names slave ignore;" Bind is chugging along happily masking operator mistakes because purposefully a lot of people run those options to not completely trash their zones if there are issues You have no control of whats served upstream via AXFR/IXFR to anything thats running miekg/dns v2 , bind sends the zone with even a single broken record operators upstream can have a single broken record and then you have to fall back to per record RR parsing killing performance of whole zone parsing B) multiple versions of bind dont validate IXFR they just relay it you can get anything on IXFR C) You dont have proper verification yourself for a specific record type and you allow anything to be typed into it - parser fails due to this
Author
Owner
Copy link

Ack. Skipping errors should really easy actually. Though it depends a bit on how borked that parser state is

Ack. Skipping errors should really easy actually. Though it depends a bit on how borked that parser state is
Sign in to join this conversation.
No Branch/Tag specified
main
miek/26/jun24wo/14
miek/26/mrt24di/tls
miek/26/mrt09ma/17
miek/26/feb15zo/13
miek/zo-07-dec-25/gslb1
miek/2025-10-26@1431
miek/2025-10-18@2017
v0.6.83
v0.6.82
v0.6.81
v0.6.80
v0.6.79
v0.6.78
v0.6.77
v0.6.76
v0.6.75
v0.6.74
v0.6.73
v0.6.72
v0.6.71
v0.6.70
v0.6.69
v0.6.68
v0.6.67
v0.6.66
v0.6.65
v0.6.64
v0.6.63
v0.6.62
v0.6.61
v0.6.60
v0.6.59
v0.6.58
v0.6.57
v0.6.56
v0.6.55
v0.6.54
v0.6.53
v0.6.52
v0.6.51
v0.6.50
v0.6.49
v0.6.48
v0.6.47
v0.6.46
v0.6.45
v0.6.44
v0.6.43
v0.6.42
v0.6.41
v0.6.40
v0.6.39
v0.6.38
v0.6.37
v0.6.36
v0.6.35
v0.6.34
v0.6.33
v0.6.32
v0.6.31
v0.6.30
v0.6.29
v0.6.28
v0.6.27
v0.6.26
v0.6.25
v0.6.24
v0.6.23
v0.6.22
v0.6.21
v0.6.20
v0.6.19
v0.6.18
v0.6.17
v0.6.16
v0.6.15
v0.6.14
v0.6.13
v0.6.12
v0.6.11
v0.6.10
v0.6.9
v0.6.8
v0.6.7
v0.6.6
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.38
v0.5.37
v0.5.36
v0.5.35
v0.5.34
v0.5.33
v0.5.32
v0.5.31
v0.5.30
v0.5.29
v0.5.28
v0.5.27
v0.5.26
v0.5.25
v0.5.24
v0.5.23
v0.5.22
v0.5.21
v0.5.20
v0.5.19
v0.5.18
v0.5.17
v0.5.16
v0.5.15
v0.5.14
v0.5.13
v0.5.12
v0.5.11
v0.5.10
v0.5.9
v0.5.8
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.1.12
v0.1.11
v0.1.10
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.0.4
v0.0.3
v0.0.2
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miekg/dns#877
Reference in a new issue
miekg/dns
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?