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: Avoid IPv6 in system DNS queries by default (#2280) #2464

Closed
wants to merge 2 commits into from

Conversation

lackhoa
Copy link
Contributor

@lackhoa lackhoa commented Sep 30, 2023

Currently, there are cases where users cannot use IPv6 due to their network
infrastructure not supporting it. Therefore, we should not resolve hostnames to
IPv6 addresses unless told otherwise.

This commit defaults DNS queries to IPv4-only. It also allows users to resolve
IPv6 addresses by setting the system property java.net.preferIPv6Addresses.

/claim #2280

Reference: https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/

Currently, there are cases where users cannot use IPv6 due to their network
infrastructure not supporting it. Therefore, we should not resolve hostnames to
IPv6 addresses unless told otherwise.

This commit defaults DNS queries to IPv4-only. It also allows users to resolve
IPv6 addresses by setting the system property `java.net.preferIPv6Addresses`.

/claim zio#2280

Reference: https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/
@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (5906d30) 64.75% compared to head (871d9cb) 64.75%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2464   +/-   ##
=======================================
  Coverage   64.75%   64.75%           
=======================================
  Files         135      135           
  Lines        7135     7136    +1     
  Branches     1200     1224   +24     
=======================================
+ Hits         4620     4621    +1     
  Misses       2515     2515           
Files Coverage Δ
zio-http/src/main/scala/zio/http/DnsResolver.scala 85.29% <100.00%> (+0.44%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lackhoa
Copy link
Contributor Author

lackhoa commented Oct 1, 2023

I wanna change the branch name, so closing this (will open a new one).

@lackhoa lackhoa closed this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants