2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-19 04:40:21 +00:00

fix issue [DEV]"xcatd: install monitor" process(listening on ipv6 socket) will die on status update from node failed on reverse dns lookup #2459

This commit is contained in:
immarvin
2017-02-06 13:59:41 +08:00
parent d2ab444dfb
commit 696ffeb023

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;