X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXCommandmode.pm;fp=perl%2FDXCommandmode.pm;h=3226399746a15385b4582544994e4c0f7b959ba9;hp=90812225dfe772c4bd8b2671f6ff3600bc70a521;hb=f91073b99369ea05c42364f9462695be7a67016d;hpb=ca5baf12f22e041cb14af595254af4ae88d82ae0 diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 90812225..32263997 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -74,8 +74,11 @@ sub new # routing, this must go out here to prevent race condx my $pkg = shift; my $call = shift; -# my @rout = $main::routeroot->add_user($call, Route::here(1)); - DXProt::_add_thingy($main::routeroot, [$call, 0, 0, 1, undef, undef, $self->hostname], ); + # my @rout = $main::routeroot->add_user($call, Route::here(1)); + my $ipaddr = $self->hostname; + $ipaddr = $main::localhost_alias_ipv6 if $ipaddr eq '::1' && $main::localhost_alias_ipv6; + $ipaddr = $main::localhost_alias_ipv4 if $ipaddr =~ /^127\./ && $main::localhost_alias_ipv4; + DXProt::_add_thingy($main::routeroot, [$call, 0, 0, 1, undef, undef, $ipaddr], ); # ALWAYS output the user my $ref = Route::User::get($call);