summarylogtreecommitdiffstats
path: root/android-dev.patch
blob: c970b47125ca2fa502bef994e7c47218ae22af97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -pur 1/linux/tun_dev.c 2/linux/tun_dev.c
--- 1/linux/tun_dev.c	2008-01-08 01:36:22.000000000 +0300
+++ 2/linux/tun_dev.c	2013-07-04 20:04:33.630722649 +0400
@@ -87,7 +87,7 @@ static int tun_open_common(char *dev, in
     struct ifreq ifr;
     int fd;
 
-    if ((fd = open("/dev/net/tun", O_RDWR)) < 0)
+    if ( (fd = open("/dev/net/tun", O_RDWR)) < 0 && (fd = open("/dev/tun", O_RDWR)) < 0 )
        return tun_open_common0(dev, istun);
 
     memset(&ifr, 0, sizeof(ifr));