From 1d6f34636608c8ee1c4f9a623004da2e02122403 Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 27 Jun 2011 08:52:56 +0000 Subject: [PATCH] add check in getNodeIPaddress, return 0 if the input node is undef. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9947 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 92ede9bad..13eedd642 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -5729,6 +5729,10 @@ sub isIpaddr $addr = shift; } + unless ( $addr ) + { + return 0; + } #print "addr=$addr\n"; if ($addr !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) {