git://git.onelab.eu
/
vsys-scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
98d651c
)
Load the legacy tun module if the first attempt doesn't work out.
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 29 Oct 2009 00:42:59 +0000
(
00:42
+0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 29 Oct 2009 00:42:59 +0000
(
00:42
+0000)
fd_tuntap.c
patch
|
blob
|
history
diff --git
a/fd_tuntap.c
b/fd_tuntap.c
index
0f538eb
..
668a9c5
100644
(file)
--- a/
fd_tuntap.c
+++ b/
fd_tuntap.c
@@
-106,8
+106,11
@@
int main(int argc, char *argv[])
/* Open tun device */
if( (tap_fd = open("/dev/stdtun", O_RDWR)) < 0 ) {
- perror("ERROR: tun_alloc():open(/dev/stdtun)");
- exit(-1);
+ system("modprobe tun");
+ if( (tap_fd = open("/dev/stdtun", O_RDWR)) < 0 ) {
+ perror("ERROR: tun_alloc():open(/dev/stdtun)");
+ exit(-1);
+ }
}