aboutsummaryrefslogtreecommitdiff
path: root/dgd
diff options
context:
space:
mode:
Diffstat (limited to 'dgd')
-rwxr-xr-xdgd/dgd8
-rwxr-xr-xdgd/rc.uplink4
2 files changed, 5 insertions, 7 deletions
diff --git a/dgd/dgd b/dgd/dgd
index 5b467e4..f809cc8 100755
--- a/dgd/dgd
+++ b/dgd/dgd
@@ -438,13 +438,15 @@ 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 1;
diff --git a/dgd/rc.uplink b/dgd/rc.uplink
index f116293..239d85f 100755
--- a/dgd/rc.uplink
+++ b/dgd/rc.uplink
@@ -27,8 +27,4 @@ END {
fi
ip rule add from $3 table $1
- ip rule add from $5 table $1
- if [ -n "$6" ]; then
- ip rule add from $6 table $1
- fi
ip route add default via $4 table $1
if [ -n "$7" ]; then

Return to:

Send suggestions and report system problems to the System administrator.