Hello Willy, On 7/20/2016 9:28 PM, Willy Tarreau wrote: > I vaguely remind such a conversation in the past with reports of > getaddrinfo() not returning what was expected. Maybe that's something > to consider for a next major version (eg: 1.7). However we could > possibly have something intermediary for 1.6 : having the option to > force to use GAI and not use it by default. That wouldn't break existing > setups and would allow those who need it to use it as-is. We'd basically > build with "USE_GHBN_FIRST" in addition to "USE_GETADDRINFO", it would > then use only gethostbyname except if the option forces the other one. > > Does this sound like a reasonable option ?
It sounds fine, until I think all the various ways we enable or disable this. We have: - Build option to build with gai(), preferring it - Runtime flag to disable gai(), falling back to ghbn() - Configuration option to disable gai(), falling back to ghbn() Now we would need to add: - Build option to prefer ghbn() when gai() is enabled - A configuration option/runtime flag to switch back to gai() in the case above I am pretty familiar with this part of the code, and it makes my head hurt :) I'd vote to keep 1.6 as is, and completely break 1.7 by removing the build option USE_GETADDRINFO and building with it by default, perhaps switching to NO_GETADDRINFO for any platforms that are broken (if such exist). We then just keep the runtime flag/config option for people who wish to disable it. Regards, Nenad

