IPv6 link-local addresses with zone id not usable in proxy_pass
|Reported by:||launchpad.net/~lotheac||Owned by:|
|uname -a:||SunOS www 5.11 omnios-8c08411 i86pc i386 i86pc|
nginx version: nginx/1.6.1
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --with-ipv6 --with-http_ssl_module --with-ld-opt=-m64 --http-client-body-temp-path=tmp/client_body --http-proxy-temp-path=tmp/proxy --http-fastcgi-temp-path=tmp/fastcgi --http-uwsgi-temp-path=tmp/uwsgi --http-scgi-temp-path=tmp/scgi
nginx doesn't like IPv6 link-local addresses with zone identifiers (addresses like 'fe80::8:20ff:fe6a:64de%www1'; the zone identifier 'www1' here refers to the network interface).
First I tried with a literal address:
but that resulted in
invalid IPv6 address in upstream "[fe80::8:20ff:fe6a:64de%www1]:5232/"
As an aside: I could work around this if it was possible to tell nginx to use getaddrinfo to resolve upstreams. If I put the address in /etc/hosts as 'foo' and use 'http://foo%www1:5232/' both curl and wget resolve the address correctly (because they just pass it to getaddrinfo), but nginx fails with:
no resolver defined to resolve foo%www1
and if I do define a resolver, it will try DNS queries, which is the wrong thing here. Is it not possible to use the system resolver?