From b43617b2cd5712ef4271707b3021d5e24be48bcf Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 28 Jul 2011 17:09:24 +0000 Subject: [PATCH] Produce a clearer message when IPv6 resolution is attempted without IPv6 capability available git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10184 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/NetworkUtils.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 0626d6a98..975aab41b 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -260,6 +260,9 @@ sub getipaddr { #return inet_ntoa(inet_aton($iporhost)) #TODO, what if no scoket6 support, but passing in a IPv6 hostname? + if ($iporhost =~ /:/) { #ipv6 + die "Attempt to process IPv6 address, but system does not have requisite IPv6 perl support"; + } my $packed_ip; $iporhost and $packed_ip = inet_aton($iporhost); if (!$packed_ip)