Enable standard tun interface
authorSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 28 Oct 2009 19:10:14 +0000 (19:10 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Wed, 28 Oct 2009 19:10:14 +0000 (19:10 +0000)
kernel-2.6.spec
linux-2.6-528-enable-stdtun.patch [new file with mode: 0644]

index 86a2ce5..9a9e398 100644 (file)
@@ -171,6 +171,7 @@ Patch524: linux-2.6-524-peercred.patch
 Patch525: linux-2.6-525-sknid-elevator.patch
 Patch526: linux-2.6-526-tun-tap.patch
 Patch527: linux-2.6-527-iptables-classify-add-mark.patch
+Patch528: linux-2.6-528-enable-stdtun.patch
 Patch530: linux-2.6-530-built-by-support.patch
 Patch540: linux-2.6-540-oom-kill.patch
 Patch550: linux-2.6-550-raise-default-nfile-ulimit.patch
@@ -394,6 +395,7 @@ KERNEL_PREVIOUS=vanilla
 %ApplyPatch 525
 %ApplyPatch 526
 %ApplyPatch 527
+%ApplyPatch 528
 
 %ApplyPatch 530
 %ApplyPatch 540
diff --git a/linux-2.6-528-enable-stdtun.patch b/linux-2.6-528-enable-stdtun.patch
new file mode 100644 (file)
index 0000000..4369f31
--- /dev/null
@@ -0,0 +1,41 @@
+--- linux-i686-2.6.22/drivers/net/tun.c.orig   2009-10-09 00:07:30.000000000 -0400
++++ linux-i686-2.6.22/drivers/net/tun.c        2009-10-09 00:31:19.000000000 -0400
+@@ -38,10 +38,11 @@
+  *    Modifications for 2.3.99-pre5 kernel.
+  */
+-#define DRV_NAME      "tun"
++#define DRV_NAME      "stdtun"
+ #define DRV_VERSION   "1.6"
+ #define DRV_DESCRIPTION       "Universal TUN/TAP device driver"
+ #define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>"
++#define TUN_MINOR_HACK 255
+ #include <linux/module.h>
+ #include <linux/errno.h>
+@@ -791,8 +792,8 @@
+ };
+ static struct miscdevice tun_miscdev = {
+-      .minor = TUN_MINOR,
+-      .name = "tun",
++      .minor = TUN_MINOR_HACK,
++      .name = "stdtun",
+       .fops = &tun_fops,
+ };
+@@ -890,7 +891,7 @@
+       ret = misc_register(&tun_miscdev);
+       if (ret)
+-              printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR);
++              printk(KERN_ERR "tun: Can't register misc device %d\n", TUN_MINOR_HACK);
+       return ret;
+ }
+@@ -914,4 +915,4 @@
+ MODULE_DESCRIPTION(DRV_DESCRIPTION);
+ MODULE_AUTHOR(DRV_COPYRIGHT);
+ MODULE_LICENSE("GPL");
+-MODULE_ALIAS_MISCDEV(TUN_MINOR);
++MODULE_ALIAS_MISCDEV(TUN_MINOR_HACK);