[pve-devel] [PATCH] Storage::resolv_server gethostbyname replacement explanation

Wolfgang Bumiller w.bumiller at proxmox.com
Tue May 12 09:42:36 CEST 2015


I supplemented the patch with a description regarding the reason for replacing
gethostbyname. It's simply that perl's gethostbyname doesn't support ipv6 the
way POSIX' gethostbyname(3) does.

An easy way to test this:

$ perl -MData::Dumper -e 'print Dumper(gethostbyname("::1")), "\n";'

While this works with ipv4 addresses. At the same time when asking for an
actual _name_ instead of an ipv6 address, the result shows an address type of
AF_INET, instead of AF_INET6, even if the name is supposed to resolve to ONLY
an ipv6 address.

Wolfgang Bumiller (1):
  ipv6 support for Storage::resolv_server

 PVE/Storage.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list