X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=152a5fe05bdb84510ae764028d57ce59106d0524;hb=743d0338dd4ebf095be93b441425b283a20406dc;hp=3767145ca4277463ca60fe172db9b695f57b8320;hpb=877fab7416e9545aeae5b9880246262bc92be650;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3767145c..152a5fe0 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -651,23 +651,27 @@ sub normal if ($r) { my $ar; if ($call ne $parent->call) { - $ar = $parent->add($r); - push @rout, $ar if $ar; + if ($self->in_filter_route($r)) { + $ar = $parent->add($call, $ver, $flags); + push @rout, $ar if $ar; + } else { + next; + } } if ($r->version ne $ver || $r->flags != $flags) { $r->version($ver); - $r->flags(Route::here($here)|Route::conf($conf)); + $r->flags($flags); push @rout, $r unless $ar; } } else { next if $call eq $main::mycall || $call eq $self->{call}; - my $new = $parent->new($call, $ver, Route::here($here)|Route::conf($conf)); + my $new = Route->new($call); # throw away if ($self->in_filter_route($new)) { - $parent->add($new); - push @rout, $new; + my $r = $parent->add($call, $ver, $flags); + push @rout, $r; } else { - $new->del($parent); + next; } } @@ -785,6 +789,7 @@ sub normal $ref->here($field[2]) if $ref; $ref = Route::User::get($call); $ref->here($field[2]) if $ref; + $ref ||= Route->new($call); # input filter if required return unless $self->in_filter_route($ref); @@ -927,7 +932,7 @@ sub normal } $user->lastoper($main::systime); # to cut down on excessive for/opers being generated $user->put; - my $ref = Route::get($call); + my $ref = Route::get($call) || Route->new($call); # input filter if required return unless $self->in_filter_route($ref); @@ -1444,7 +1449,7 @@ sub send_local_config # and are not themselves isolated, this to make sure that isolated nodes # don't appear outside of this node my @dxchan = grep { $_->call ne $main::mycall && $_->call ne $self->{call} } DXChannel::get_all_nodes(); - @localnodes = map { Route::Node::get($_->{call}) or die "connot find node $_->{call}" } @dxchan if @dxchan; + @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan; my @intcalls = map { $_->nodes } @localnodes if @localnodes; my $ref = Route::Node::get($self->{call}); my @rnodes = $ref->nodes; @@ -1483,7 +1488,7 @@ sub route # always send it down the local interface if available my $dxchan = DXChannel->get($call); unless ($dxchan) { - my $cl = Route::Node::get($call); + my $cl = Route::get($call); $dxchan = $cl->dxchan if $cl; if (ref $dxchan) { if (ref $self && $dxchan eq $self) { @@ -1792,7 +1797,7 @@ sub broadcast_route foreach $dxchan (@dxchan) { next if $dxchan == $self; next if $dxchan == $me; - if ($self->{routefilter} || !$self->{isolate}) { + if ($dxchan->{routefilter} || !$self->{isolate}) { $dxchan->send_route($generate, @_) } else { dbg('DXPROT: isolated') if isdbg('chanerr');