changeset 51:d83d6bb647a2

Fixed tunnel destruction on Debian using iproute2
author Ivo Smits <Ivo@UCIS.nl>
date Mon, 03 Jun 2013 01:01:22 +0200
parents 02b4a9a139da
children 3115f8af98bb
files debian/static/etc/network/if-post-down.d/quicktun
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/debian/static/etc/network/if-post-down.d/quicktun	Sat Jun 01 15:45:36 2013 +0200
+++ b/debian/static/etc/network/if-post-down.d/quicktun	Mon Jun 03 01:01:22 2013 +0200
@@ -4,7 +4,12 @@
 if [ -x /usr/sbin/openvpn ]; then
 	/usr/sbin/openvpn --rmtun --dev "${IFACE}"
 elif [ -x /sbin/ip ] && /sbin/ip tuntap 2>&1 >/dev/null; then
-	/sbin/ip tuntap del dev "${IFACE}"
+	if [ -n "${IF_QT_TUN_MODE}" ] && [ "${IF_QT_TUN_MODE}" = "1" ]; then
+	        DEVTYPE="tun"
+	else
+	        DEVTYPE="tap"
+	fi
+	/sbin/ip tuntap del dev "${IFACE}" mode "${DEVTYPE}"
 elif [ -x /usr/sbin/tunctl ]; then
 	/usr/sbin/tunctl -d "${IFACE}"
 fi