/etc/host.conf has: [...] # Valid values are on and off. If set to on, the resolv+ library # will return all valid addresses for a host that appears in the # /etc/hosts file, instead of only the first. This is off by # default, as it may cause a substantial performance loss at sites # with large hosts files. # multi off This setting does seem like a relic from the past. With the default multi off, getaddrinfo() returns just one address which caused a few surprises on our email server which has both ipv6 and ipv4 addresses. I don't know about "substantial performance loss" but it does seem unlikely in this time and age. As more and more machines are getting dual-stacked, I believe multi on makes more sense as the default.
if /etc/hosts is large, then every network look up has to scan the entire file for possible multiple matches, so yes, there will still be a performance impact. we could probably cheat and do something in pkg_preinst like: if [[ $(wc -l < "${ROOT}"/etc/hosts) -lt 1000 ]] ; then sed -i '/^multi off/s:off:on:' "${ROOT}"/etc/hosts elog "Defaulting /etc/host.conf:multi to on" fi
should be all set now in the tree; thanks for the report! Commit message: Default host.conf:multi to on when /etc/hosts is small http://sources.gentoo.org/sys-libs/glibc/files/eblits/pkg_preinst.eblit?r1=1.5&r2=1.6
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e35ef2d25fd6bc46a3289f4c39667727c32e1eea commit e35ef2d25fd6bc46a3289f4c39667727c32e1eea Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2017-12-16 19:03:53 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2017-12-16 19:04:12 +0000 sys-libs/glibc: Downgrade hosts.conf message to einfo, bug 638154 The logic of the setting makes sense though... Bug: https://bugs.gentoo.org/436530 Closes: https://bugs.gentoo.org/638154 Package-Manager: Portage-2.3.18, Repoman-2.3.6 sys-libs/glibc/glibc-2.26-r3.ebuild | 2 +- sys-libs/glibc/glibc-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)}