[Dxspider-support] Is $calltick actually being used?
Dirk Koopman
djk at tobit.co.uk
Sat Apr 5 17:27:34 BST 2025
Well I think it is, in Spot.pm:
sub handle_dupecalls
{
my $call = shift;
my $reason = shift;
my $testtype = shift;
my $just_find = shift;
my $timeout = shift || $dupecall;
my $threshold = shift || $dupecallthreshold;
my *$tick *= shift*|| $calltick;*
my $check = $just_find ? 'CHECK' : 'ADD ';
# we are DEFINITELY kicking the timer down the road until it stops
# in a sustained attack this will oscillate between systime and
systime + threshold until
# the attack stops and the record is cleaned away as normal
my $ldupkey = "X$call";
my $t = DXDupe::find($ldupkey);
if ($t > 0) {
my $new = $t +*$tick;*
if ($t < $main::systime + $threshold) {
A bit further up this function is called:
*
* # first crude flood protection. This plain callsign checking
spotting anything that isn't caught by preceding tests.
if ($dupecall) {
$t = handle_dupecalls($call, $reason, "(CALL)", $just_find) if
$do_call_check;
$t ||= handle_dupecalls($by, $reason, "(BY)", $just_find) if
$do_by_check;
$t ||= handle_dupecalls("N$node", $reason, "(NODE)",
$just_find, $nodetime, $nodetimethreshold) if $do_node_check;
$t ||= handle_dupecalls($ipaddr, $reason, "(IPADDR)",
$just_find) if $do_ipaddr_check && $ipaddr && is_ipaddr($ipaddr);
return $t if $t && $just_find;
}
As the last three arguments are not set in the function calls, they get
the defaults. One of which is $calltick.
The problem with trying to model this is that the time continues
underneath all these timers. So analysing it is pretty
non-deterministic. You have send the spot and then observe the result at
exactly the same number of seconds later.
Hope this helps
Dirk G1TLH
On 05/04/2025 16:39, Kin via Dxspider-support wrote:
> Hi Dirk,
>
> I'm analysing these two spots, and it seems to me that $calltick is not
> actually being applied. Instead, it appears to be replaced by $dupecall.
>
> Spot-1
> 1743764875^PC61^28482.0^4X4HQ^
> 4-Apr-2025^1107Z^CQing^ON3FZT^PA1RBZ^91.177.93.57^H27^
>
> DXDupe::add key: X4X4HQ|ON3FZT|28482|1743764820|CQING time: 11:17:55Z (time
> de llegada al nodo)
> DXDupe::add key: X4X4HQ|28482 time: 11:09:00Z
> DXDupe::add key: X4X4HQ|CQING time: 11:13:00Z
> DXDupe::add key: X4X4HQ time: 11:08:05Z
> DXDupe::add key: XON3FZT time: 11:08:05Z
> DXDupe::add key: X91.177.93.57 time: 11:08:05Z
>
> Spot-2
> 1743764885^PC61^28482.0^4X4HQ^
> 4-Apr-2025^1107Z^CQing^ON3FZT^PA1RBZ^91.177.93.57^H27^
>
> DXDupe::add key: X4X4HQ|ON3FZT|28482|1743764820|CQING time: 11:18:05Z (time
> de llegada al nodo)
> DXDupe::add key: X4X4HQ|28482 time: 11:09:00Z
> DXDupe::add key: X4X4HQ|CQING time: 11:13:00Z
> DXDupe::add key: X4X4HQ time: 11:08:15Z ***
> DXDupe::add key: XON3FZT time: 11:08:15Z ***
> DXDupe::add key: X91.177.93.57 time: 11:08:15Z ***
>
> Note ***
> Previous expiration t = 11:07:55Z = 1743764875
> $main::systime = 11:08:05Z = 1743764885
> Threshold ($Spot::dupecallthreshold) = 35
> So: t < $main::systime + 35 -> OK
> New value calculated: 1743764885 + 5 = 1743764890 = 11:08:10Z
> ($main::systime is equal to the arrival time of the second spot)
>
> However, that value is not actually used. Instead, it is replaced with:
> $main::systime + $dupecall = 1743764885 + 10 = 1743764895 = 11:08:15Z
>
> The keys X4X4HQ, XON3FZT, and X91.177.93.57 are all renewed using $dupecall
> (10 seconds), not $calltick.
> The $calltick = 5 is effectively not applied here, because:
> Even though the code computes t + $calltick, it is overwritten by:
> DXDupe::add($ldupkey, $main::systime + $dupecall)
>
> Variable values used:
> $Spot::dupage 600
> $Spot::dupeqrgcall 65
> $Spot::dupecallinfo 305
> $Spot::dupecall 10
> $Spot::calltick 5
> $Spot::dupecallthreshold 35
>
> Is my understanding correct?
>
> Kin EA3CV
>
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20250405/b1c67e77/attachment.htm>
More information about the Dxspider-support
mailing list