use Route::Node;
use Script;
use DXProtHandle;
+use DXCIDR;
use Time::HiRes qw(gettimeofday tv_interval);
use DXSubprocess;
# log it
my $host = $self->{conn}->peerhost;
$host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
+ $host ||= $host if is_ipaddr($host);
$host ||= "unknown";
$self->{hostname} = $host if is_ipaddr($host);
-
Log('DXProt', "$call connected from $host");
# remember type of connection
}
}
+ my $origin = $self->{call};
+
if (defined &Local::pcprot) {
my $r;
- eval { $r = Local::pcprot($self, $pcno, $line, @field); };
+ eval { $r = Local::pcprot($self, $pcno, $line, $origin, \@field); };
return if $r; # i.e don't process it
}
# send it out for processing
- my $origin = $self->{call};
no strict 'subs';
my $sub = "handle_$pcno";
{
my $pcno = shift;
my $hops = $DXProt::hopcount{$pcno};
- $hops = $DXProt::def_hopcount if !$hops;
+ $hops = $DXProt::def_hopcount unless $hops;
return "H$hops";
}