prevent nodes appearing as users from incoming PC16s
authorminima <minima>
Fri, 7 Sep 2001 18:27:29 +0000 (18:27 +0000)
committerminima <minima>
Fri, 7 Sep 2001 18:27:29 +0000 (18:27 +0000)
Changes
perl/DXProt.pm

diff --git a/Changes b/Changes
index a4314b53dd8497692556516ce9f4bf3919f411b6..c14763d6d558ab30214afeff6ec8b539d123f361 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+06Sep01=======================================================================
+1. prevent nodes appearing as users from incoming PC16s
 04Sep01=======================================================================
 1. add delete/user command
 03Sep01=======================================================================
index 9d92a8293099060c42bc16cd936b69b4eb358153..c26016ee5048ce9205175a484ae042c3be8b1b31 100644 (file)
@@ -570,7 +570,15 @@ sub normal
                                
                                $conf = $conf eq '*';
 
-                               my $r = Route::User::get($call);
+                               # reject this if we think it is a node already
+                               my $r = Route::Node::get($call);
+                               my $u = DXUser->get_current($call) unless $r;
+                               if ($r || ($u && $u->is_node)) {
+                                       dbg("PCPROT: $call is a node") if isdbg('chanerr');
+                                       next;
+                               }
+                               
+                               $r = Route::User::get($call);
                                my $flags = Route::here($here)|Route::conf($conf);
                                
                                if ($r) {
@@ -621,17 +629,17 @@ sub normal
                                dbg("PCPROT: PC17 from $self->{call} trying to alter locally connected $ncall, ignored!") if isdbg('chanerr');
                                return;
                        }
-                       my $parent = Route::Node::get($ncall);
-                       unless ($parent) {
-                               dbg("PCPROT: Route::Node $ncall not in config") if isdbg('chanerr');
-                               return;
-                       }
+
                        my $uref = Route::User::get($ucall);
                        unless ($uref) {
                                dbg("PCPROT: Route::User $ucall not in config") if isdbg('chanerr');
                                return;
                        }
-                       
+                       my $parent = Route::Node::get($ncall);
+                       unless ($parent) {
+                               dbg("PCPROT: Route::Node $ncall not in config") if isdbg('chanerr');
+                               return;
+                       }                       
 
                        # input filter if required
                        return unless $self->in_filter_route($parent);