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

Apply the IPv6 server blacklist to all nameserver sources, not just Windows #193

Merged
merged 1 commit into from May 17, 2018
Merged

Apply the IPv6 server blacklist to all nameserver sources, not just Windows #193

merged 1 commit into from May 17, 2018

Conversation

b-spencer
Copy link
Contributor

@b-spencer b-spencer commented May 17, 2018

For #164, I mentioned that it seemed like the IPv6 nameserver blacklist should apply to all OSes. In a mailing list post, @bradh352 agreed and suggested that I file a PR to make it so. This is that PR. Sorry for the delay.

This moves the blacklist check from being Windows-specific to being a general feature of config_nameservers(), no matter the nameserver source. It also simplifies the ares_ipv6_server_blacklisted() implementation to not parse and re-parse the blacklisted IPv6 addresses from strings on every check. I think they're almost as easy to read as a sequence of hex bytes in an array initializer, and it's definitely less work on each trip through the code.

The new unit test for this behaviour passes on Linux x86_64.

@bradh352
Copy link
Member

looks good, I'll merge once travis finishes successfully

@bradh352 bradh352 self-requested a review May 17, 2018 16:40
@bradh352 bradh352 merged commit 7458fd5 into c-ares:master May 17, 2018
DronRathore pushed a commit to DronRathore/c-ares that referenced this pull request Mar 11, 2020
…indows (c-ares#193)

For c-ares#164, I mentioned that it seemed like the IPv6 nameserver blacklist should apply to all OSes. In a mailing list post, @bradh352 agreed and suggested that I file a PR to make it so. 

This moves the blacklist check from being Windows-specific to being a general feature of config_nameservers(), no matter the nameserver source. It also simplifies the ares_ipv6_server_blacklisted() implementation to not parse and re-parse the blacklisted IPv6 addresses from strings on every check. I think they're almost as easy to read as a sequence of hex bytes in an array initializer, and it's definitely less work on each trip through the code.

Fix By: Brad Spencer @b-spencer 
PR: c-ares#193
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

2 participants