Skip to content
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

Fix FQDN lookup on hosts where ndots < channel ndots #345

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

instagrim-dev
Copy link
Contributor

ares_create_query(), returns a ARES_EBADNAME when appending search list domains to the query name. As a result, c-ares fails to iterate through the search list & perform a query for what is actually a valid name.
Since all channel tests are performed with the default ndots value, this case wasn't covered.
Bug repro & debugging explained here: https://github.com/wheelpharaoh/c-ares-exmaple

@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 89.152% when pulling aebadb5 on wheelpharaoh:nDotsFQDN into 2c32de2 on c-ares:master.

@bradh352 bradh352 merged commit ba59781 into c-ares:master Aug 24, 2020
bradh352 added a commit that referenced this pull request Aug 27, 2020
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022
…lue (c-ares#345)

If a query is performed for dynamodb.us-east-1.amazonaws.com. with ndots=5, it was attempting to search the search domains rather than just attempting the FQDN that was passed it.  This patch now at least attempts the FQDN first.

We may need to determine if we should abort any further searching, however as is probably intended.

Fix by: Jonathan Maye-Hobbs (@wheelpharoah)
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants