Skip to content

runtime.exs: Utils.ip_version() misses hostnames resolving to IPv6 (only) #3073

Description

@tvogel

Because Utils.ip_version() expects a numeric IP, it can only distinguish numeric IPv4 and IPv6. Therefore, socket_options are again not set according to the IP version for host names:

case Utils.ip_version(System.get_env("DB_HOSTNAME", "")) do

case Utils.ip_version(host) do

The function detect_ip_version defined there, however does DNS lookups and works correctly. Why not use that (again)?

Another option would be to add DNS lookups to Utils.ip_version().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions