From: Florian Fainelli Date: Sat, 24 Mar 2007 21:48:06 +0000 (+0000) Subject: Fix the tun device path (#1491) X-Git-Url: http://git.ozo.com/?p=lede-routing%2F.git;a=commitdiff_plain;h=ecfa7cbcefbcf0a9544151b1c57f4082a88cb459 Fix the tun device path (#1491) git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/batman@6686 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/patches/101-tun_device.patch b/patches/101-tun_device.patch new file mode 100644 index 0000000..26d528f --- /dev/null +++ b/patches/101-tun_device.patch @@ -0,0 +1,27 @@ +diff -ruN batman-III-0.2.0a.old/linux-specific.c batman-III-0.2.0a/linux-specific.c +--- batman-III-0.2.0a.old/linux-specific.c 2007-02-20 21:07:29.000000000 +0100 ++++ batman-III-0.2.0a/linux-specific.c 2007-03-19 15:34:36.000000000 +0100 +@@ -111,9 +111,9 @@ + + int32_t fd; + +- if ( ( fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { ++ if ( ( fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { + +- debug_output( 0, "Error - could not open '/dev/net/tun' ! Is the tun kernel module loaded ?\n" ); ++ debug_output( 0, "Error - could not open '/dev/tun' ! Is the tun kernel module loaded ?\n" ); + return 0; + + } +@@ -151,9 +151,9 @@ + memset( &ifr_if, 0, sizeof(ifr_if) ); + ifr_tun.ifr_flags = IFF_TUN | IFF_NO_PI; + +- if ( ( *fd = open( "/dev/net/tun", O_RDWR ) ) < 0 ) { ++ if ( ( *fd = open( "/dev/tun", O_RDWR ) ) < 0 ) { + +- debug_output( 0, "Error - can't create tun device (/dev/net/tun): %s\n", strerror(errno) ); ++ debug_output( 0, "Error - can't create tun device (/dev/tun): %s\n", strerror(errno) ); + return -1; + + }