When I use openssl s_client and ask it to connect to ip6-localhost it actually connects to 127.0.0.1 instead of ::1.This is what I see on both Ubuntu and Debian:$ strace -e connect openssl s_client -connect ip6-localhost:443connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory)connect(3, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT (No such file or directory)connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr(127.0.0.1)}, 16) = 0I don't see anything in /etc/hosts which could explain the behavior:127.0.0.1       localhost127.0.1.1       dell# The following lines are desirable for IPv6 capable hosts::1     ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allroutersHow does s_client reach the conclusion that the IP address of ip6-localhost is 127.0.0.1?
How does s_client turn ip6-localhost into 127.0.0.1?
openssl;ipv6;ipv4