-
Notifications
You must be signed in to change notification settings - Fork 907
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
dnsdist: Add support for setting Extended DNS Error statuses #13473
Conversation
This PR adds support for adding EDNS Extended DNS Error statuses from DNSDist, via the following mechanisms: - `SetExtendedDNSErrorAction` - `SetExtendedDNSErrorResponseAction` - `DNSQuestion:setExtendedDNSError(infoCode [, extraText])` - `DNSResponse:setExtendedDNSError(infoCode [, extraText])` - `dnsdist_ffi_dnsquestion_set_extended_dns_error(...)`
Pull Request Test Coverage Report for Build 6823512332Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
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.
LGTM!
[UPDATED the content upon request] I noticed that the MBZ flag is set to
Then
A 'dig +nodo TXT example.nl @dnsdistresolver.example.nl' works okay. We use: dnsdist 1.10.0-alpha0.1183.master.g5508d1039 (Lua 5.1.4 [LuaJIT 2.1.0-beta3]) And dig v 9.20.0 . An anonymized pcap file is attached below: It has a query for For |
Please share a complete minimal example and / or what you are trying to achieve. Since you omitted how you are actually using this luarule, nobody knows. I cannot reproduce this with the following minimal test configuration: function luarule(dr)
dr:setExtendedDNSError(4, "We fiddled around with this")
return DNSAction.Allow, ""
end
function luaresponserule(dr)
dr:setExtendedDNSError(4, "We fiddled around with this")
return DNSResponseAction.Allow, ""
end
setLocal('0.0.0.0:5300')
newServer({ address="1.1.1.1:53" })
addAction(QNameRule("tst.example.com."), LuaAction(luarule))
addResponseAction(QNameRule("tstres.example.com."), LuaResponseAction(luaresponserule)) The test results: dig -p 5300 tstres.example.com txt @127.0.0.1
dig -p 5300 tst.example.com txt @127.0.0.1
Note that you can also use SetExtendedDNSErrorAction() in an |
Also please note that comments on closed tickets/PRs tend to get forgotten! When in doubt, a new Q&A discussion is always a good place. |
I SetExtendedDNSErrorResponseAction() was a good suggestion. Thanks. |
(continued debugging should move to a Discussion or IRC) |
Short description
This PR adds support for adding EDNS Extended DNS Error statuses from DNSDist, via the following mechanisms:
SetExtendedDNSErrorAction
SetExtendedDNSErrorResponseAction
DNSQuestion:setExtendedDNSError(infoCode [, extraText])
DNSResponse:setExtendedDNSError(infoCode [, extraText])
dnsdist_ffi_dnsquestion_set_extended_dns_error(...)
Closes #12572
Checklist
I have: