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: add bogus ring to make it more easy to detect high profile domains with broken dnssec #6713
Conversation
The packet cache unit tests do not compile anymore :'( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature in itself is great, code looks very good. I'm not a big fan of adding this logic in the cache code, though.
pdns/recpacketcache.cc
Outdated
t_bogusremotes->push_back(source); | ||
if(t_bogusqueryring) | ||
t_bogusqueryring->push_back(make_pair(qname, qtype)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a bit wrong to have this code here, IMHO the packet cache should not have any knowledge of the rings or the requestor's source address. Perhaps this logic could be moved in doProcessUDPQuestion()
?
ddcf6ae
to
88694a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, looks very good otherwise. Thanks a lot for this PR!
@@ -174,6 +178,7 @@ void RecursorPacketCache::insertResponsePacket(unsigned int tag, uint32_t qhash, | |||
e.d_ttd = now+ttl; | |||
e.d_creation = now; | |||
e.d_tag = tag; | |||
e.d_vstate = valState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should likely also update the validation state when we replace an existing entry, just above.
… the packet cache
Checklist
I have: