prevent PC92 A/C changing our $my(alias|call)
authorDirk Koopman <djk@tobit.co.uk>
Mon, 3 Jan 2022 13:17:16 +0000 (13:17 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 3 Jan 2022 13:17:16 +0000 (13:17 +0000)
It appears that some nodes are getting knickers in a twist in their
routing tables and causing routes and thus $my(alias|call) file types to
change. Prevent this from happening.

Changes
cmd/dx.pl
cmd/set/rbn.pl
cmd/set/spider.pl
perl/DXProtHandle.pm

diff --git a/Changes b/Changes
index ca654a6be3a48517517c3cd313337bdfbe406bed..2441b64c51dc6e01ef2d2491615c6989b6c5cd17 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,8 @@
    $clusterport. This is really only of use for people trying to run more than
    one instance of DXSpider on the same machine.
 2. Fix who command to make RBN connections as RBN and not USER.
+3. Prevent other nodes claiming that $myalias or $mycall is a different type
+   (user or node) from changing our route table and thence the user type. 
 02Jan22=======================================================================
 1. Fix dx bug introduced to handle dx by ip <ipaddr> for webclusters.
 2. Remove _add_thingy dbg message from general view.
index ea76aab58bb3e2e309e003223eb121bd9a41dc1e..7cf460cc0d7d9a9b3319d0945b815fe8d3c49f56 100644 (file)
--- a/cmd/dx.pl
+++ b/cmd/dx.pl
@@ -45,7 +45,7 @@ if ($f[0] =~ /^by$/i) {
        return (1, $self->msg('e5')) unless $main::allowdxby || $self->priv > 1;
     $spotter = uc $f[1];
     $line =~ s/^\s*$f[0]\s+$f[1]\s+//;
-       @f = split /\s+/, $line, 3;
+       @f = split /\s+/, $line, 3; 
        return (1, $self->msg('dx2')) unless @f >= 2;
 }
 
index 2f1ff07ad889d3ff198819ab24620cfaabb84890..c0b90c66b4ce67840d89d448a4656970e33eb0ed 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       if ($call eq $main::myalias) {
+       if ($call eq $main::mycall) {
                push @out, $self->msg('e11', $call);
                next;
        }
index a0e519b680d508c72d4298c5cfba7b2434a07ada..28a91a12e50d045e8df2013426b8036c1f642538 100644 (file)
@@ -19,7 +19,7 @@ return (1, $self->msg('e5')) if $self->priv < 5;
 
 foreach $call (@args) {
        $call = uc $call;
-       if ($call eq $main::myalias) {
+       if ($call eq $main::mycall) {
                push @out, $self->msg('e11', $call);
                next;
        }
index c39b52e1da6b004982c92f667faa25d5ffc20705..79b9b8ba4a67498a7accde3f7753ab8a1f75dce1 100644 (file)
@@ -2016,6 +2016,11 @@ sub handle_92
                                dbg("PCPROT: $_->[0] refers to me, ignored") if isdbg('chanerr');
                                next;
                        }
+                       if ($_->[0] eq $main::myalias && $_->[1] || $_->[0] eq $main::mycall && $_->[1] == 0) {
+                               dbg("PCPROT: $_->[0] changing type to " . $_->[1]?"Node":"User" . ", ignored") if isdbg('chanerr');
+                               next;
+                       }
+                       
                        push @nent, $_;
                }