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

ares_gethostbyname: fake hostent for AF_UNSPEC #204

Merged
merged 1 commit into from Aug 27, 2020

Conversation

Seraphime
Copy link
Contributor

Currently, the conditional which decides whether the specified host
is an IPv4 address verifies whether family is AF_INET or AF_INET6
which is equivalent to saying family is AF_UNSPEC, but users of
AF_UNSPEC cannot fake IPv4 hosts.

Currently, the conditional which decides whether the specified host
is an IPv4 address verifies whether family is AF_INET or AF_INET6
which is equivalent to saying family is AF_UNSPEC, but users of
AF_UNSPEC cannot fake IPv4 hosts.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 92.952% when pulling 4b522d5 on Seraphime:fakehostent_with_af_unspec into 7ebedab on c-ares:master.

@Seraphime
Copy link
Contributor Author

The reason the coverage has fallen by 0.002% is because the if checking for IPv4 addresses is no longer executed for family == AF_INET6, which is nonsensical anyways.

@bradh352 bradh352 merged commit c4764c2 into c-ares:master Aug 27, 2020
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022
…-ares#204)

fake_hostent() was not supporting AF_UNSPEC, so when an ip address was specified when using AF_UNSPEC it would attempt to do a DNS lookup rather than returning a fake hostent using the ip address.

Fix By: Seraphime Kirkovski (@Seraphime)
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.

None yet

3 participants