From aa8cc0d19a7ad2cc5d8891187ceae2fba73eee2d Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 7 Sep 2001 18:27:29 +0000 Subject: [PATCH] prevent nodes appearing as users from incoming PC16s --- Changes | 2 ++ perl/DXProt.pm | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index a4314b53..c14763d6 100644 --- 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======================================================================= diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 9d92a829..c26016ee 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -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); -- 2.43.0