X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=0c23663c415bf111e30f935f668369304a3e0054;hb=9fdfb0d7573d820fb5e2db8930a9679ed6de666f;hp=b8b17ae612065b2080eb8c44f7c34cc20120c81c;hpb=d0e9787ea8e709d8cbd91e87e363812e669c0ca6;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index b8b17ae6..0c23663c 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -44,7 +44,7 @@ $main::branch += $BRANCH; use vars qw($me $pc11_max_age $pc23_max_age $last_pc50 $last_hour $last10 %eph %pings %rcmds $ann_to_talk - %nodehops $baddx $badspotter $badnode $censorpc + %nodehops $baddx $badspotter $badnode $censorpc $rspfcheck $allowzero $decode_dk0wcy $send_opernam @checklist); $me = undef; # the channel id for this cluster @@ -62,6 +62,7 @@ $badspotter = new DXHash "badspotter"; $badnode = new DXHash "badnode"; $last10 = $last_pc50 = time; $ann_to_talk = 1; +$rspfcheck = 1; @checklist = ( @@ -316,6 +317,9 @@ sub normal SWITCH: { if ($pcno == 10) { # incoming talk + # rsfp check + return if $rspfcheck and !$self->rspfcheck(0, $field[6], $field[1]); + # will we allow it at all? if ($censorpc) { my @bad; @@ -384,6 +388,9 @@ sub normal } } + # rsfp check + return if $rspfcheck and !$self->rspfcheck(1, $field[7], $field[6]); + # if this is a 'nodx' node then ignore it if ($badnode->in($field[7])) { dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr'); @@ -513,6 +520,9 @@ sub normal } if ($pcno == 12) { # announces + + return if $rspfcheck and !$self->rspfcheck(1, $field[5], $field[1]); + # announce duplicate checking $field[3] =~ s/^\s+//; # remove leading blanks if (AnnTalk::dup($field[1], $field[2], $field[3])) { @@ -849,6 +859,8 @@ sub normal } } + return if $rspfcheck and !$self->rspfcheck(1, $field[8], $field[7]); + # do some de-duping my $d = cltounix($field[1], sprintf("%02d18Z", $field[2])); my $sfi = unpad($field[3]);