]> git.proxmox.com Git - pve-common.git/commit
get_ip_from_hostname: check all address we get from getaddrinfo_all for non-local IP
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 Feb 2020 12:49:18 +0000 (13:49 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 Feb 2020 12:54:16 +0000 (13:54 +0100)
commit5bd1e56b7ab7100dcd8d3e75394e1508306ba69d
tree83f008cd5f18ccfb0fb8ab7d537190c5d8ef437c
parent630fe0a73534f8f9aee00f280438d24519ac09a0
get_ip_from_hostname: check all address we get from getaddrinfo_all for non-local IP

This was limited without reason to checking only the first IP we get
returned from getaddrinfo_all, but we can have multiple IPs for a
hostname, and possible one of them is local but another not, so check
all and only die if no non-local address at all got found.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network.pm