aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterServer/UDP/BeaconCatcher.pm
diff options
context:
space:
mode:
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\\/) {