--- linux-2.6.28/drivers/net/tun.c.orig	2008-12-25 02:26:37.000000000 +0300
+++ linux-2.6.28/drivers/net/tun.c	2009-02-02 17:33:02.000000000 +0300
@@ -714,7 +714,7 @@ static int tun_set_iff(struct net *net, 
 		if (((tun->owner != -1 &&
 		      current->euid != tun->owner) ||
 		     (tun->group != -1 &&
-		      current->egid != tun->group)) &&
+		      !in_egroup_p(tun->group))) &&
 		     !capable(CAP_NET_ADMIN))
 			return -EPERM;
 	}
