-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rec: Duplicate NSEC and RRSIG in foo.cname-exists.phicoh.nl #14120
Comments
Rec constructs the answer in two steps, first
Then the CNAME target
The auth sections are then merged, but contain duplicates. |
Right, the |
I wonder if it would make sense to use a set instead of a vector for these? |
Don't know yet, have to investigate, as we might be using the (implicit) ordering of the vector. |
Currently the code builds the complete answer in a vector. The order of the answers is mostly preserved (after sorting in sections) by the shuffling code. If we want to start using a duplicate-avoiding data structure we still want to keep the order of inserts (like the order-preserving arrays/set hybrid available in some languages). So this is a no small change, as lots of code assume they just need to append to a vector. As an experiment I created a diff to fix this particular case, but not very happy about it, it is very specific to the test case, though the duplicate record problem might be a general one. This raises the question: what if an auth sends us duplicates. Do we want to dedup these as well? Or only if the answer is constructed from several replies? Conclusion: this needs more thought. Experimental diff attached. |
See also #14362, another instance of an edge case that causes duplicate records. |
This is not a support question, I have read about opensource and will send support questions to the IRC channel, Github Discussions or the mailing list.
I have read and understood the 'out in the open' support policy
Program: Recursor
Issue type: Bug report
Short description
Someone on the DNS-OARC Mattermost found that "
dig +dnssec foo.cname-exists.phicoh.nl txt
" on "a popular public resolver" returns two "does-exist.phicoh.nl. 3600 IN NSEC *.ent.phicoh.nl. A RRSIG NSEC
" records. I don't know which resolver they meant, but I checked a few of them and PowerDNS Recursor does in fact return the NSEC and its corresponding RRSIG twice.Beats me why, but there are wildcards and ENTs and possibly other horrors involved.
There may have been recent changes in this area, but I don't know if it's a new issue. It affects Quad9, so I doubt it's that new.
Environment
Steps to reproduce
dig +dnssec foo.cname-exists.phicoh.nl txt
Expected behaviour
No duplicate records.
Actual behaviour
Extra NSEC and RRSIG records.
Other information
The text was updated successfully, but these errors were encountered: