[pve-devel] [PATCH 0/4] pve-common: ipv6 changes

Wolfgang Bumiller w.bumiller at proxmox.com
Fri May 8 12:24:40 CEST 2015


IPv6 related changes and helpers added.

I added two helpers to Tools.pm I'm using in pve-manager:

a) a wrapper around Socket::unpack_sockaddr_in  and its _in6 variant chosen
based on the address family, and returning the family together with the
unpacked result. (Used in the manager's HTTPServer.pm to allow accepting ipv6
connections when listening on an ipv6 socket.)

b) get_host_address_family: to get the address family used for a connection to
a certain hostname, used in pveproxy to make the decision whether to listen on
ipv4 or ipv6 *:8006 depend on whether the own hostname (from /etc/hosts) points
to an ipv4 or ipv6 address.

For (b) I also added an optional $family parameter to
Daemon::create_reusable_socket which is passed as Socket::IP->new's Family
option.
The rest just replaces Socket::INET with Socket::IP.

Wolfgang Bumiller (4):
  Use IO::Socket::IP instead of INET
  provide Tools::unpack_sockaddr_in46
  optional socket family parameter for create_reusable_socket
  add utility to fetch the socket family for a hostname

 src/PVE/Daemon.pm |  9 +++++----
 src/PVE/Tools.pm  | 31 +++++++++++++++++++++++++------
 2 files changed, 30 insertions(+), 10 deletions(-)

-- 
2.1.4





More information about the pve-devel mailing list