Subject: Re: [vserver] TAP-interfaces won't shutdown properly.
From: Josef Johansson <josef@ilait.se>
Date: Thu, 12 May 2011 12:31:18 +0200 (CEST)

Noted that the problem occurs upstream also.

----- Original Message -----
From: "Josef Johansson" <josef@ilait.se>
To: vserver@list.linux-vserver.org
Sent: Thursday, May 12, 2011 12:14:38 PM
Subject: [vserver] TAP-interfaces won't shutdown properly.

Hi,

I had a problem with TAP-interfaces not shutting down properly on debian 6.0.

The cause for this was that the --tap argument did not get pushed to the tunctl command.

I post the solution to the problem below.


--- /usr/lib/util-vserver/vserver.functions.old	2011-05-12 10:12:11.000000000 +0000
+++ /usr/lib/util-vserver/vserver.functions	2011-05-12 10:09:32.000000000 +0000
@@ -751,7 +751,11 @@ function disableInterfaces
 	    IP_ADDR_FLUSH)	;;
 	    IP_LINK)		;; ## Ignore the link-down command for now
 	    IP_ROUTE)		$_IP route del "$@";;
-	    TUNCTL)		$_TUNCTL --~persist "$1";;
+	    TUNCTL)		
+               local dev="$1"
+               shift                 
+               $_TUNCTL --~persist "$@" "$dev"
+               ;;
 	    *)			echo "Unknown interface-command type '$type'" >&2; false;;
 	esac
     done

Regards
Josef