--- smeserver-affa-0.10.0/root/sbin/e-smith/affa.DNS_Timeout 2008-03-10 18:41:52.000000000 +0100 +++ smeserver-affa-0.10.0/root/sbin/e-smith/affa 2008-03-11 09:55:26.000000000 +0100 @@ -635,15 +635,23 @@ # check for remoteHostName==localhost using DNS my $res = Net::DNS::Resolver->new; - my $query = $res->search($job{'remoteHostName'}); - if ($query) + $res->udp_timeout(10); + if( $job{'remoteHostName'} ne 'localhost' ) { - foreach my $rr ($query->answer) + my $query = $res->search($job{'remoteHostName'}); + if ($query) { - next unless $rr->type eq "A"; - $job{'remoteHostName'}='localhost' if( $rr->address eq $LocalIP ); - } - } + foreach my $rr ($query->answer) + { + next unless $rr->type eq "A"; + $job{'remoteHostName'}='localhost' if( $rr->address eq $LocalIP ); + } + } + else + { + lg('Warning: DNS resolver timeout'); + } + } # check for remoteHostName==localhost using e-smith DB if( $job{'remoteHostName'} =~ /^(127.0.0.1|$LocalIP|$SystemName|$SystemName\.$DomainName)$/ ) {