diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 0c62fb7a0..d54bf253b 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -736,7 +736,7 @@ sub get_nic_ip my %iphash; my $mode = "MULTICAST"; my $payingattention = 0; - my $interface; + my $interface = ""; my $keepcurrentiface; @@ -793,6 +793,7 @@ sub get_nic_ip delete $iphash{$interface}; } $keepcurrentiface = 0; + $interface = ""; if (!($line =~ /LOOPBACK/) and $line =~ /UP( |,|>)/ and $line =~ /$mode/) {