aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2011-09-21 03:57:09 +0200
committerChristian Ruppert <idl0r@gentoo.org>2011-09-21 03:57:09 +0200
commit29693ecb7a031f6bacb74fd4dccfe0bdb1b1e5f8 (patch)
tree3b8c431593820994b5e2f50583e0c57de860dc8c
parent930f4021b1904b9c46c41c70b99d6e0620a1b59d (diff)
Refactoring of commit bf49e59e3eb4fe12167812bc1b4531742eddc383
Make sure the RPDB rules will be removed.
-rw-r--r--net/iproute2.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 765294a6..660d5147 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -301,9 +301,6 @@ iproute2_post_start()
iproute2_post_stop()
{
- # Only do something if the interface actually exist
- _exists || return
-
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then
local rules="$(service_get_value "ip_rule")"
@@ -311,7 +308,11 @@ iproute2_post_stop()
einfo "Removing RPDB rules"
_ip_rule_runner del "${rules}"
fi
- ip route flush table cache dev "${IFACE}"
+
+ # Only do something if the interface actually exist
+ if _exists; then
+ ip route flush table cache dev "${IFACE}"
+ fi
fi
# Don't delete sit0 as it's a special tunnel