Skip to content

libcurl does not recognize [::] as a valid IPv6 address #5344

Description

@volpav

I did this

  1. Started a local server, providing the IPv6 binding of [::]:12345
  2. Attempted to use libcurl to connect to the server

I expected the following

libcurl successfully connecting to the server.

instead, I got this

Received URL using bad/illegal format or missing URL (code 3) error from libcurl.

curl/libcurl version

7.69.1 (with IPv6 enabled)

operating system

Debian-based corporate build.

notes

Changing [::] to [::1] fixes the problem.

Looks like the bug was introduced in 4706603. To comment on this, [::] (and even ::) seems to be a valid IPv6 address according to https://en.wikipedia.org/wiki/0.0.0.0.

This works as expected in 7.66.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions