-
Notifications
You must be signed in to change notification settings - Fork 8
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
Lokup limit being reached one lookup earlier than it should #3
Comments
Thanks a lot for reporting this! I think you are correct: the library is counting the initial resolution as a resolution for the purposes of the lookup limits, and it shouldn't as per the standard. I'm working on a fix. |
As per RFC, we should not count the initial DNS lookup for the purposes of the lookup limit, but the code currently does. This can result in over-limiting by 1 lookup. This patch fixes the problem by incrementing the counts on their respective mechanism and modifier. That behaviour also matches the RFC wording, so it is easier to follow. https://datatracker.ietf.org/doc/html/rfc7208#section-4.6.4 Thanks to Anh Do <[email protected]> for reporting this issue in #3.
This should be fixed in commit 48ee700, which is in the I've tested that it now resolves microsoft.com as expected, and added some tests to prevent future regressions. Note I've also added your name and email in the commit message, let me know if you prefer to be credited in another way, and I'll amend the patch. Once it's gotten a bit more exposure and if everything goes well, I'll move it to Thanks again! |
@albertito Thanks for your fix. I highly appreciate your mention <3 |
The fix is now in the Thank you! |
Hi,
I have seen "lookup limit reached" error when performing SPF check on "microsoft.com":
According to https://datatracker.ietf.org/doc/html/rfc7208#section-4.6.4, I understand the default limit is 10. However in the package, the DNS query for the SPF policy record itself counts towards that limit but other packages/libs do not. For example, when I check with https://dmarcly.com/tools/spf-record-checker, the "microsoft.com" domain has exactly an SPF DNS lookup count of 10.
I understand I can use the
OverrideLookupLimit()
function to change the limit. However I would like to report this issue and hear your comment whether it's a bug.The text was updated successfully, but these errors were encountered: