-
Notifications
You must be signed in to change notification settings - Fork 295
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
ENH: cymru expert: prevent extra lookups, handle invalid asnames #2352
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -928,9 +928,6 @@ def resolve_dns(*args, **kwargs) -> dns.resolver.Answer: | |
|
||
Parameters: | ||
see: https://dnspython.readthedocs.io/en/stable/resolver-class.html#dns.resolver.Resolver.resolve | ||
The `search` parameter is always set to True for compatibility with dnspython version 1. | ||
|
||
""" | ||
if dns.version.MAJOR < 2: | ||
return dns.resolver.query(*args, **kwargs) | ||
return dns.resolver.resolve(*args, **kwargs, search=True) | ||
return dns.resolver.resolve(*args, **kwargs) | ||
Comment on lines
-934
to
+933
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With that change the function is obsolete now. But that's something for a major version as it is a change in the interface. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you leave a ticket to remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added to #1444 |
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.
is this the "Avoid extraneous search domain-based queries on NXDOMAIN result"?
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.
That's the added periods in
IP_QUERY
andASN_QUERY
, actually.Example: if you have a search domain of "lan" and resolving
homeserver
fails with NXDOMAIN, then the search domain will causehomeserver.lan.
to be queried.However, if, for instance,
1.2.3.4.origin4.cymru.com
returns NXDOMAIN, then1.2.3.4.origin4.cymru.com.lan.
would be queried.But, the added period at the end signifies that this is a fully qualified domain name and such queries should not be made.