summaryrefslogtreecommitdiffabout
path: root/dgd/dgd
Side-by-side diff
Diffstat (limited to 'dgd/dgd') (more/less context) (ignore whitespace changes)
-rwxr-xr-xdgd/dgd8
1 files changed, 5 insertions, 3 deletions
diff --git a/dgd/dgd b/dgd/dgd
index 5b467e4..f809cc8 100755
--- a/dgd/dgd
+++ b/dgd/dgd
@@ -439,11 +439,13 @@ sub check_links {
debug(1, "checking links ".($#links+1).", probes $config{core}{probes}");
- my $p = Net::Ping->new("icmp", $config{core}{timeout});
for (my $i = 0; $i < $config{core}{probes}; $i++) {
foreach $link (@links) {
- debug(3, "ping $link->{name}");
next if link_is_alive($link);
+ debug(3, "ping $link->{name}");
+ my $p = Net::Ping->new("icmp", $config{core}{timeout}, undef,
+ $link->{if});
++$link->{alive} if $p->ping($link->{gw});
+ $p->close();
+ debug(3, "$link->{name} " . ($link->{alive} ? "alive" : "dead"));
}
}
- $p->close();
if (!defined($active_link)) {

Return to:

Send suggestions and report system problems to the System administrator.