When connecting to a device via an mDNS hostname which resolves to an IPv6 link local address connection fails after a timeout.
...
setsockopt(5, SOL_TCP, TCP_KEEPIDLE, [60], 4) = 0
setsockopt(5, SOL_TCP, TCP_KEEPINTVL, [60], 4) = 0
setsockopt(5, SOL_TCP, TCP_KEEPCNT, [9], 4) = 0
connect(5, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "fe80::d269:9eff:fe9d:ffdc", &sin6_addr), sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
getsockname(5, {sa_family=AF_INET6, sin6_port=htons(0), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
getsockname(5, {sa_family=AF_INET6, sin6_port=htons(0), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_scope_id=0}, [128 => 28]) = 0
close(5) = 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f90b7c3e8f0}, NULL, 8) = 0
poll([{fd=3, events=POLLIN}, {fd=3, events=POLLIN}], 2, 1000) = 0 (Timeout)
...
This seems the be a regression in version 8.20.0. It used to work in 8.19.0. What might be relevant is that I am using systemd-resolved as the mDNS resolver.
I did this
When connecting to a device via an mDNS hostname which resolves to an IPv6 link local address connection fails after a timeout.
I ran curl with strace and there you can see that the
connectsyscall is called withoutsin6_scope_idfield set.This seems the be a regression in version 8.20.0. It used to work in 8.19.0. What might be relevant is that I am using systemd-resolved as the mDNS resolver.
I expected the following
No response
curl/libcurl version
curl 8.20.0 (upstream Arch Linux package version 8.20.0-7)
operating system
Arch Linux