From: Dirk Koopman Date: Wed, 12 Feb 2025 14:45:41 +0000 (+0000) Subject: improve the nuclear option X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa4d246be7efce783ad56709696d4646d107a186;p=spider.git improve the nuclear option --- diff --git a/Changes b/Changes index 39277cf1..1a5e4775 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +11Feb25====================================================================== +1. Remove duplicates from $DXProt::senderverify debug messages if this + variable is set to warn of or dump suspicious spots from spotters that + are not in the routing table for the node that they are claiming to + be spotting from. +2. Add this node's ip address to the PC92 K record on output. 04Feb25====================================================================== 1. Improve badspotter/node handling to handle more cases, more easily. Hopefully this won't cause problems greater than we already have. diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 56adcd4d..56e891b9 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -904,7 +904,7 @@ sub send_local_config # $self->send_last_pc92_config($main::routeroot); # $self->send(pc92a($main::routeroot, $node)) unless $main::routeroot->last_PC92C =~ /$self->{call}/; $self->send(pc92a($main::routeroot, $node)); - $self->send(pc92k($main::routeroot)); + $self->send(pc92k($main::routeroot, DXCommandmode::alias_localhost($main::me->{hostname} || '127.0.0.1'))); } else { # create a list of all the nodes that are not connected to this connection # and are not themselves isolated, this to make sure that isolated nodes diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 853349a1..622aa355 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -428,6 +428,7 @@ sub handle_11 my $uref = DXUser::get_current($pc->[7]); my $s = ''; my $ip = $pcno == 61 ? $pc->[8] : ''; + my ($hops) = $pc->[$pcno == 61 ? 9 : 8] =~ /H(\d+)/; if ($nroute && ($nroute->last_PC92C || ($local && !$local->do_pc9x))) { # $s .= "User $pc->[6] not logged in, " unless $uroute; @@ -441,7 +442,8 @@ sub handle_11 if ($s) { my $action = $sv > 1 ? ", DUMPED" : ''; $s =~ s/, $//; - dbg("PCPROT: Bad Spot $pc->[2] on $pc->[1] by $pc->[6]($ip)\@$pc->[7] $s$action"); + $hops ||= '0'; + dbg("PCPROT: Bad Spot $pc->[2] on $pc->[1] by $pc->[6]($ip)\@$pc->[7] $s$action via $self->{call} $hops hops"); return unless $sv < 2; } } @@ -2261,6 +2263,7 @@ sub handle_92 my $oldversion = $parent->version || 0; my $user = check_add_user($parent->call, 'S'); my $oldsort = $user->sort // ''; + my $ipaddr = @ent > 10 ? $ent[9] : ''; dbg("PCPROT: PC92 K v: $version ov: $oldversion b: $build ob: $oldbuild pk: " . ($parent->K || '0') . " uk: " . ($user->K || 0)) if isdbg('pc92k'); diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 8525b539..14c36df9 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -441,10 +441,13 @@ sub pc92c sub pc92k { my $nref = shift; + my $ipaddr = shift; + my $s = "PC92^$main::mycall^" . gen_pc9x_t() . "^K"; $s .= "^" . _encode_pc92_call($nref, 1) . ":$main::me->{build}"; $s .= "^" . scalar $nref->nodes; $s .= "^" . scalar $nref->users; + $s .= "^$ipaddr" if $ipaddr; return $s . '^H99^'; }