# HG changeset patch # User Ivo Smits # Date 1370214082 -7200 # Node ID d83d6bb647a2c1ddf9a0886b012a9149264b14d8 # Parent 02b4a9a139da8a7be5d5fe49481d39956ce34d84 Fixed tunnel destruction on Debian using iproute2 diff -r 02b4a9a139da -r d83d6bb647a2 debian/static/etc/network/if-post-down.d/quicktun --- 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