summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-10-20 15:04:05 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-10-20 15:04:05 +0000
commit6af6a0fceebef98791348e6b03aaaf6575cab79c (patch)
treeb0b4befee9526d36b9272f848f8dd4e2b59f9387 /perl-install/network
parentfa492843fb0d08958917d557cd1dd5d6ac8d5356 (diff)
downloaddrakx-backup-do-not-use-6af6a0fceebef98791348e6b03aaaf6575cab79c.tar
drakx-backup-do-not-use-6af6a0fceebef98791348e6b03aaaf6575cab79c.tar.gz
drakx-backup-do-not-use-6af6a0fceebef98791348e6b03aaaf6575cab79c.tar.bz2
drakx-backup-do-not-use-6af6a0fceebef98791348e6b03aaaf6575cab79c.tar.xz
drakx-backup-do-not-use-6af6a0fceebef98791348e6b03aaaf6575cab79c.zip
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
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/tools.pm14
1 files changed, 7 insertions, 7 deletions
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);
}
}