Skip to content

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

Merged
bradh352 merged 1 commit intoc-ares:masterfrom
instagrim-dev:nDotsFQDN
Aug 24, 2020
Merged

Fix FQDN lookup on hosts where ndots < channel ndots#345
bradh352 merged 1 commit intoc-ares:masterfrom
instagrim-dev:nDotsFQDN

Conversation

@instagrim-dev
Copy link
Copy Markdown
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
Copy Markdown

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