Skip to content

IPv6 not working for hosts with both A and AAAA entries #12917

Description

@ylangisc

According to the documentation you can prioritize IPv6 over IPv4 for hosts that have both A and AAAA DNS entries. This setting in turn sets the JAVA system property java.net.preferIPv6Addresses to true.

InetAddress.getByName(hostname) does return an IPv6 address for hosts with an A entry only. For hosts with both entries the IPv4 address is returned. The system property above does not have any effect in that case. Also refer to https://stackoverflow.com/a/11974740 which proposes to use InetAddress.getAllByName(hostname) or a 3rd party library.

Affected code in Resolver class.

Activity

  1. linked a pull request that will close this issueAdd failing test. #12919on Feb 24, 2022
  2. added this to the 8.2.4 milestone on Mar 2, 2022
  3. added a commit that references this issue on Mar 4, 2022
    dca7eac
  4. added a commit that references this issue on Mar 7, 2022
  5. modified the milestones: 8.3.0, 8.4.0 on May 17, 2022
  6. added a commit that references this issue on May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions