Skip to content

Fails to connect to host specified as IPv6 numerical address + zone id #3902

Closed
@GitYuanQu

Description

@GitYuanQu

duplicate with 3480.
I did this
[root@localhost src]# ls ../configure
../configure
[root@localhost src]# ./curl -V
curl 7.64.0-20181225 (x86_64-pc-linux-gnu) libcurl/7.64.0-20181225 OpenSSL/1.0.2p zlib/1.2.11 libssh2/1.7.0
Release-Date: 2018-12-25
Protocols: dict file ftp ftps gopher http https rtsp scp sftp smb smbs telnet tftp
Features: AsynchDNS Debug TrackMemory IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy
[root@localhost src]# ./curl --url sftp://root:sys2009health@[fe80::42f2:e9ff:fe30:c17%eth0]/home ../configure
curl: (3) URL using bad/illegal format or missing URL
curl: (6) Could not resolve host: ..
[root@localhost src]# ./curl --url sftp://root:SYS2009health@[2002:97b:c2bb:830:10:240:196:14]/home ../configure
curl: (60) SSL peer certificate or SSH remote key was not OK
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
curl: (6) Could not resolve host: ..
[root@localhost src]# ping6 2002:97b:c2bb:830:10:240:196:14
PING 2002:97b:c2bb:830:10:240:196:14(2002:97b:c2bb:830:10:240:196:14) 56 data bytes
64 bytes from 2002:97b:c2bb:830:10:240:196:14: icmp_seq=1 ttl=64 time=0.341 ms
64 bytes from 2002:97b:c2bb:830:10:240:196:14: icmp_seq=2 ttl=64 time=1.71 ms
^C
--- 2002:97b:c2bb:830:10:240:196:14 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1365ms
rtt min/avg/max/mdev = 0.341/1.027/1.714/0.687 ms
[root@localhost src]# ping6 fe80::42f2:e9ff:fe30:c17%eth0
PING fe80::42f2:e9ff:fe30:c17%eth0(fe80::42f2:e9ff:fe30:c17) 56 data bytes
64 bytes from fe80::42f2:e9ff:fe30:c17: icmp_seq=1 ttl=64 time=2.48 ms
64 bytes from fe80::42f2:e9ff:fe30:c17: icmp_seq=2 ttl=64 time=0.353 ms
^C
--- fe80::42f2:e9ff:fe30:c17%eth0 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1466ms
rtt min/avg/max/mdev = 0.353/1.417/2.482/1.065 ms

I expected the following
expect file could uploaded success

curl/libcurl version
curl 7.64.0-20181225 (x86_64-pc-linux-gnu) libcurl/7.64.0-20181225 OpenSSL/1.0.2p zlib/1.2.11 libssh2/1.7.0
Release-Date: 2018-12-25
Protocols: dict file ftp ftps gopher http https rtsp scp sftp smb smbs telnet tftp
Features: AsynchDNS Debug TrackMemory IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

operating system
ALL

even I use release 7.64.1, it still failed.

next step, I will use current master to check this issue, thanks.

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