]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: str2ip: make getaddrinfo() consider local address selection policy
authorDmitry Sivachenko <trtrmitya@gmail.com>
Thu, 1 Oct 2015 23:01:58 +0000 (01:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Oct 2015 23:01:58 +0000 (01:01 +0200)
commiteab7f3996f737177c1af66b9f2bec779f7bb5f05
treecbf07eee370566ec46f33460b3a3e62b902570be
parent43885c728e7f90f6295a195076833b64ff9bb3fb
BUG/MEDIUM: str2ip: make getaddrinfo() consider local address selection policy

When first parameter to getaddrinfo() is not NULL (it is always not NULL
in str2ip()), on Linux AI_PASSIVE value for ai_flags is ignored. On
FreeBSD, when AI_PASSIVE is specified and hostname parameter is not NULL,
getaddrinfo() ignores local address selection policy, always returning
AAAA record. Pass zero ai_flags to behave correctly on FreeBSD, this
change should be no-op for Linux.

This fix should be backported to 1.5 as well, after some observation
period.
src/standard.c