]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] use getaddrinfo to resolve names if gethostbyname fail
authorDavid du Colombier <dducolombier@exceliance.fr>
Thu, 17 Mar 2011 09:40:16 +0000 (10:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Mar 2011 21:49:55 +0000 (22:49 +0100)
commitd5f4328efd5f4eaa7c89cad9773124959195430a
tree0add1a079e05f5ce493d700ebca5b7924547ac56
parent2dff0c28e85207df94185d43b80722ac138c4436
[MEDIUM] use getaddrinfo to resolve names if gethostbyname fail

Function gethostbyname is deprecated since IEEE Std 1003.1-2008 and
was replaced by getaddrinfo (available since IEEE Std 1003.1-2004).
Contrary to gethostbyname, getaddrinfo is specified to support both
IPv4 and IPv4 addresses.
Since some libc doesn't handle getaddrinfo properly, constant
USE_GETADDRINFO must be defined at compile time to enable use of
getaddrinfo.
src/standard.c