[pve-devel] [PATCH cluster v2 2/3] pvecm: module cleanup: use our get_host_address_family
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Nov 20 12:51:19 CET 2017
I think we can also get rid of all the other Net::IP::ip_is_ipv6 calls,
and thus drop the dependency on Net::IP as well.. we only use it on
corosync addresses in create and add.
On Thu, Nov 16, 2017 at 03:27:52PM +0100, Thomas Lamprecht wrote:
> 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 015978d..6b1ab65 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;
> @@ -853,7 +852,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
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list