diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d8ccad76f7..1311c111ee 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1829,9 +1829,7 @@ sub udp_server ($$) { $sock = IO::Socket::INET->new(LocalPort => $udp_port, Proto => 'udp') or die "socket: $@"; while ($sock->recv($newmsg, $MAXLEN)) { - my($port, $ipaddr) = sockaddr_in($sock->peername); - $hishost = gethostbyaddr($ipaddr, AF_INET); - + my $hishost = $sock->peerhost(); if (($udp_auth_address eq "0.0.0.0") || ($hishost eq $udp_auth_address)){ if ($newmsg =~ /REFRESH AGENT/){ # Send signal to restart agent