projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3f1464a
)
improve debugging for badip on spots
author
Dirk Koopman
<djk@tobit.co.uk>
Mon, 9 Jan 2023 09:06:32 +0000
(09:06 +0000)
committer
Dirk Koopman
<djk@tobit.co.uk>
Mon, 9 Jan 2023 09:06:32 +0000
(09:06 +0000)
perl/DXProtHandle.pm
patch
|
blob
|
history
diff --git
a/perl/DXProtHandle.pm
b/perl/DXProtHandle.pm
index 8a35bbbf137c47369637619354823928618a9637..d7d9270711ef782d9b00a87b99cf368e44774e9e 100644
(file)
--- a/
perl/DXProtHandle.pm
+++ b/
perl/DXProtHandle.pm
@@
-161,7
+161,7
@@
sub handle_11
}
}
}
}
- dbg("INPUT PC$pcno $line origin $origin recurse: $recurse") if isdbg("pc11");
+ dbg("INPUT PC$pcno $line origin $origin recurse: $recurse") if isdbg("pc11")
|| isdbg("pc61")
;
# my ($hops) = $pc->[8] =~ /^H(\d+)/;
# my ($hops) = $pc->[8] =~ /^H(\d+)/;
@@
-196,12
+196,13
@@
sub handle_11
}
# check IP addresses
}
# check IP addresses
- if (
$pc->[8]
&& is_ipaddr($pc->[8])) {
+ if (
@$pc > 8
&& is_ipaddr($pc->[8])) {
my $ip = $pc->[8];
$ip =~ s/,/:/g;
$ip =~ s/^::ffff://;
if (DXCIDR::find($ip)) {
my $ip = $pc->[8];
$ip =~ s/,/:/g;
$ip =~ s/^::ffff://;
if (DXCIDR::find($ip)) {
- dbg("DXProt: Spot ignore $pc->[8] in badip list") if dbg('badip');
+ dbg($line) if isdbg('nologchan');
+ dbg("PCProt: $ip in badip list, dropped");
return;
}
}
return;
}
}
@@
-210,6
+211,7
@@
sub handle_11
my $d = cltounix($pc->[3], $pc->[4]);
# bang out (and don't pass on) if date is invalid or the spot is too old (or too young)
if (!$d || (($pcno == 11 || $pcno == 61) && ($d < $main::systime - $pc11_max_age || $d > $main::systime + 900))) {
my $d = cltounix($pc->[3], $pc->[4]);
# bang out (and don't pass on) if date is invalid or the spot is too old (or too young)
if (!$d || (($pcno == 11 || $pcno == 61) && ($d < $main::systime - $pc11_max_age || $d > $main::systime + 900))) {
+ dbg($line) if isdbg('nologchan');
dbg("PCPROT: Spot ignored, invalid date or out of range ($pc->[3] $pc->[4])\n");
return;
}
dbg("PCPROT: Spot ignored, invalid date or out of range ($pc->[3] $pc->[4])\n");
return;
}
@@
-217,6
+219,7
@@
sub handle_11
# is it 'baddx'
if ($baddx->in($pc->[2])) {
dbg("PCPROT: Bad DX spot '$pc->[2]', ignored");
# is it 'baddx'
if ($baddx->in($pc->[2])) {
dbg("PCPROT: Bad DX spot '$pc->[2]', ignored");
+ dbg($line) if isdbg('nologchan');
return;
}
return;
}
@@
-224,6
+227,7
@@
sub handle_11
$pc->[5] =~ s/^\s+//; # take any leading blanks off
$pc->[2] = unpad($pc->[2]); # take off leading and trailing blanks from spotted callsign
if ($pc->[2] =~ /BUST\w*$/) {
$pc->[5] =~ s/^\s+//; # take any leading blanks off
$pc->[2] = unpad($pc->[2]); # take off leading and trailing blanks from spotted callsign
if ($pc->[2] =~ /BUST\w*$/) {
+ dbg($line) if isdbg('nologchan');
dbg("PCPROT: useless 'BUSTED' spot") if isdbg('chanerr');
return;
}
dbg("PCPROT: useless 'BUSTED' spot") if isdbg('chanerr');
return;
}