]> git.kaiwu.me - nginx.git/commit
Removed sorting of getaddrinfo() results.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 20 Mar 2019 17:31:59 +0000 (20:31 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 20 Mar 2019 17:31:59 +0000 (20:31 +0300)
commitb92e8ffa130366b0181c34f95376a56245cf6414
treeb8e9ea9bc68508d9c35038455b48fdf4180db2df
parent4e17b93eb6787e99a4023f20f8c391284f86bbf3
Removed sorting of getaddrinfo() results.

Previously the ngx_inet_resolve_host() function sorted addresses in a way that
IPv4 addresses came before IPv6 addresses.  This was implemented in eaf95350d75c
(1.3.10) along with the introduction of getaddrinfo() which could resolve host
names to IPv6 addresses.  Since the "listen" directive only used the first
address, sorting allowed to preserve "listen" compatibility with the previous
behavior and with the behavior of nginx built without IPv6 support.  Now
"listen" uses all resolved addresses which makes sorting pointless.
src/core/ngx_inet.c