]> scm.dxcluster.org Git - spider.git/commitdiff
improve the nuclear option
authorDirk Koopman <djk@tobit.co.uk>
Wed, 12 Feb 2025 14:45:41 +0000 (14:45 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Wed, 12 Feb 2025 14:45:41 +0000 (14:45 +0000)
Changes
perl/DXProt.pm
perl/DXProtHandle.pm
perl/DXProtout.pm

diff --git a/Changes b/Changes
index 39277cf1abaa29d8256265faae9014bdc522c2fa..1a5e4775e88996cedae8eee4997541cc1062843d 100644 (file)
--- 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.
index 56adcd4dc9029b9bd74a727c88b7c5e242034a72..56e891b9f04813592c13718bd282539416c9bd25 100644 (file)
@@ -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
index 853349a165eb51f0805abfc33f78b04947cb5c93..622aa3554757ef1b7484295f4d6999a1bebaca15 100644 (file)
@@ -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');
                                
index 8525b5396aef6c8bb0405e7e713746dc568a1535..14c36df96f20b3743ecb2b3e94fdeccd26f1863e 100644 (file)
@@ -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^';
 }