mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-11 15:50:11 +00:00
fix for bug 4650: check if the kvm hypervisor hostname could be resolved
This commit is contained in:
@ -341,6 +341,10 @@ sub nodesockopen {
|
||||
unless ($node) { return 0; }
|
||||
my $socket;
|
||||
my $addr = gethostbyname($node);
|
||||
if (!$addr) {
|
||||
xCAT::SvrUtils::sendmsg([1,"Cannot not resolve host $node"], $callback);
|
||||
return 0;
|
||||
}
|
||||
my $sin = sockaddr_in($port,$addr);
|
||||
my $proto = getprotobyname('tcp');
|
||||
socket($socket,PF_INET,SOCK_STREAM,$proto) || return 0;
|
||||
|
Reference in New Issue
Block a user