mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Fixed linux UDP Server. It did not get the peer IP.
This commit is contained in:
parent
a6699190bb
commit
a0050dff08
@ -1863,9 +1863,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user