[pve-devel] [PATCH cluster 3/4] pvecm: module cleanup: use our get_host_address_family
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Nov 13 10:16:36 CET 2017
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
data/PVE/CLI/pvecm.pm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index 0137046..0e1ecb4 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -3,7 +3,6 @@ package PVE::CLI::pvecm;
use strict;
use warnings;
use Getopt::Long;
-use Socket;
use IO::File;
use IO::Socket::IP;
use POSIX;
@@ -852,7 +851,7 @@ __PACKAGE__->register_method ({
if (defined($network)) {
$ip = PVE::Cluster::get_local_migration_ip($network)
or die "failed to get migration IP address to listen on\n";
- $family = Net::IP::ip_is_ipv6($ip) ? AF_INET6 : AF_INET;
+ $family = PVE::Tools::get_host_address_family($ip);
} else {
my $nodename = PVE::INotify::nodename();
($ip, $family) = PVE::Network::get_ip_from_hostname($nodename, 0);
--
2.11.0
More information about the pve-devel
mailing list