On 04/10/2017 01:42 PM, Павел Знаменский wrote:
Hello,
Hello,
I'm trying to add IPv6 address as a nameserver to able resolve addresses
in IPv6-only environment:
resolvers google_dns_10m
nameserver google_dns1 2001:4860:4860::8888:53
nameserver google_dns2 2001:4860:4860::8844:53
hold valid 10m
resolve_retries 2
But I getting error:
[ALERT] 099/133733 (10412) : Starting [google_dns_10m/google_dns1]
nameserver: can't connect socket.
As I understood resolver uses AF_INET when connecting to the nameserver
and that's why IPv6 doesn't work.
Indeed, the address families used during socket() and connect() syscall
are different.
This is revealed by strace:
socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
connect(4, {sa_family=AF_INET6, sin6_port=htons(53), inet_pton(AF_INET6,
"2001:4860:4860::8844", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0},
28) = -1 EAFNOSUPPORT (Address family not supported by protocol)
should be:
socket(PF_INET6, ...)
Is it possible to add IPv6 support for resolvers?
Thanks.