aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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