From 6af6a0fceebef98791348e6b03aaaf6575cab79c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 20 Oct 2003 15:04:05 +0000 Subject: fix #6159: fix detection when a local name server is faking the connection because of its cache by checking at least a packet is ack-ed --- perl-install/network/tools.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 993fe2c2a..6f9a1ff52 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -234,13 +234,13 @@ sub test_connected { sub connected2() { if ($kid_pid = open(my $kid_to_read, "-|")) { - #- parent - $kid_to_read; - } else { - #- child - my $a = gethostbyname("mandrakesoft.com") ? 1 : 0; - print $a; - c::_exit(0); + #- parent + $kid_to_read; + } else { + #- child + require Net::Ping; + print Net::Ping->new("icmp")->ping("mandrakesoft.com") ? 1 : 0; + c::_exit(0); } } -- cgit v1.2.1