Fix the tun device path (#1491)
[openwrt/svn-archive/archive.git] / net / batman / patches / 101-tun_device.patch
1 diff -ruN batman-III-0.2.0a.old/linux-specific.c batman-III-0.2.0a/linux-specific.c
2 --- batman-III-0.2.0a.old/linux-specific.c 2007-02-20 21:07:29.000000000 +0100
3 +++ batman-III-0.2.0a/linux-specific.c 2007-03-19 15:34:36.000000000 +0100
4 @@ -111,9 +111,9 @@
5
6 int32_t fd;
7
8 - if ( ( fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) {
9 + if ( ( fd = open( "/dev/tun", O_RDWR ) ) < 0 ) {
10
11 - debug_output( 0, "Error - could not open '/dev/net/tun' ! Is the tun kernel module loaded ?\n" );
12 + debug_output( 0, "Error - could not open '/dev/tun' ! Is the tun kernel module loaded ?\n" );
13 return 0;
14
15 }
16 @@ -151,9 +151,9 @@
17 memset( &ifr_if, 0, sizeof(ifr_if) );
18 ifr_tun.ifr_flags = IFF_TUN | IFF_NO_PI;
19
20 - if ( ( *fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) {
21 + if ( ( *fd = open( "/dev/tun", O_RDWR ) ) < 0 ) {
22
23 - debug_output( 0, "Error - can't create tun device (/dev/net/tun): %s\n", strerror(errno) );
24 + debug_output( 0, "Error - can't create tun device (/dev/tun): %s\n", strerror(errno) );
25 return -1;
26
27 }