X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=b0fdd2d9114e49f9338e9a18a999b56ccf4a6ae8;hb=fb0820fe3b3d60f189483716f72e3bce02fcd1c2;hp=cbd0ff65a92480a839db78234bea83929e800903;hpb=6ac34274be29c64e3f292622881f7af60009bc5d;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index cbd0ff65..b0fdd2d9 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1005,6 +1005,8 @@ sub handle_19 # new routing list my @rout; + + # first get the INTERFACE node my $parent = Route::Node::get($self->{call}); unless ($parent) { dbg("DXPROT: my parent $self->{call} has disappeared"); @@ -1012,6 +1014,27 @@ sub handle_19 return; } + # if the origin isn't the same as the INTERFACE, then reparent, creating nodes as necessary + if ($origin ne $self->call) { + my $op = Route::Node::get($origin); + unless ($op) { + $op = $parent->add($origin, 5000, Route::here(1)); + my $user = DXUser->get_current($origin); + if (!$user) { + $user = DXUser->new($origin); + $user->sort('S'); + $user->priv(1); # I have relented and defaulted nodes + $user->lockout(1); + $user->homenode($origin); + $user->node($origin); + $user->wantroutepc19(1); + $user->wantpc90(1); + } + $user->put; + } + $parent = $op; + } + # parse the PC19 for ($i = 1; $i < $#_-1; $i += 4) { my $here = $_[$i]; @@ -2037,7 +2060,7 @@ sub send_local_config # send our nodes if ($self->{isolate}) { @localnodes = ( $main::routeroot ); - $self->send_route($main::mycall, \&pc19, 1, $main::routeroot, $main::routeroot); + $self->send_route($main::mycall, \&pc19, 1, $main::routeroot); } 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