summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-07-12 22:21:29 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-07-12 22:21:29 +0200
commite2ec97c077aba0f45cd09ca3110eae35dc46e07b (patch)
treecffaef50e4fc4b31acbc4fa38c2016e340d1ee53
parentccff4c94718d8bc1d439c1a6e69fcd03b319c8c1 (diff)
downloadnetctl-e2ec97c077aba0f45cd09ca3110eae35dc46e07b.tar.gz
netctl-e2ec97c077aba0f45cd09ca3110eae35dc46e07b.tar.xz
Flush routing tables in ip_unset (FS#35638)
This adds to 032df. Custom and automatically (in case of IPv6) added routes are now deleted when the interface is brought down.
-rw-r--r--src/lib/ip2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ip b/src/lib/ip
index e144ee3..b627739 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -199,6 +199,8 @@ ip_unset() {
fi
[[ $DNS ]] && resolvconf -d "$Interface"
+ ip route flush dev "$Interface" &>/dev/null
+ ip -6 route flush dev "$Interface" &>/dev/null
ip addr flush dev "$Interface" scope host &>/dev/null
ip addr flush dev "$Interface" scope site &>/dev/null
ip addr flush dev "$Interface" scope global &>/dev/null