> On 30 сент. 2015 г., at 23:28, Willy Tarreau <w...@1wt.eu> wrote: > > > I think that you did a good job and that you're perfectly right. I even > checked on one of my older systems and the text was the same in 2008. > > Could you please write a commit message describing the initial issue > and copying your analysis above so that we don't lose the elements. > Please tag it as a bug so that we backport it to 1.5 as well.
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.
standard.c.patch
Description: Binary data