aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterServer/UDP/BeaconCatcher.pm
diff options
context:
space:
mode:
authorDarkelarious <darkelarious@333networks.com>2017-09-25 22:41:59 +0200
committerDarkelarious <darkelarious@333networks.com>2017-09-25 22:41:59 +0200
commit18fc4c931e75d8de804c601b46dc8c8b339db3d9 (patch)
tree58a78c8c7841f649fa2e98ddd94456a55951dfa7 /lib/MasterServer/UDP/BeaconCatcher.pm
parentc06322da38b4cb76b2036af1a5448083adb8ff20 (diff)
downloadMasterServer-Perl-18fc4c931e75d8de804c601b46dc8c8b339db3d9.tar.gz
MasterServer-Perl-18fc4c931e75d8de804c601b46dc8c8b339db3d9.zip
game statistics for all servers, numerous small fixes
Diffstat (limited to 'lib/MasterServer/UDP/BeaconCatcher.pm')
-rwxr-xr-xlib/MasterServer/UDP/BeaconCatcher.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MasterServer/UDP/BeaconCatcher.pm b/lib/MasterServer/UDP/BeaconCatcher.pm
index 6058bfa..1bfc5b0 100755
--- a/lib/MasterServer/UDP/BeaconCatcher.pm
+++ b/lib/MasterServer/UDP/BeaconCatcher.pm
@@ -34,6 +34,9 @@ sub recv_beacon {
# unpack ip from packed client address
my ($port, $iaddr) = sockaddr_in($paddress);
my $beacon_address = inet_ntoa($iaddr);
+
+ # ignore localhost and restricted IPs like localhost
+ return unless $self->valid_address($beacon_address, $port);
# determine and process heartbeat
if ($buffer =~ m/\\heartbeat\\/) {