2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge pull request #2460 from immarvin/onxcatd

fix issue  #2459
This commit is contained in:
neo954 2017-02-06 16:59:25 +08:00 committed by GitHub
commit d7ca3e7b69

View File

@ -395,9 +395,12 @@ sub do_installm_service {
($client_name, $client_aliases) = gethostbyaddr($conn->peeraddr, AF_INET);
}
unless ($client_name) {
my $myaddr = inet_ntoa($conn->peeraddr);
my $addrfamily=sockaddr_family(getpeername($conn));
my $myaddr=Socket::inet_ntop($addrfamily,$conn->peeraddr);
xCAT::MsgUtils->message("S", "xcatd received a connection request from unknown host with ip address $myaddr, please check whether the reverse name resolution works correctly. The connection request will be ignored");
print "xcatd received a connection request from unknown host with ip address $myaddr, please check whether the reverse name resolution works correctly. The connection request will be ignored\n";
close($conn);
next;
}
$clients[0] = $client_name;