X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fd_tuntap.c;h=ddcd431a300da20c90cb39e3cfa1d11b51426e05;hb=bf6948cbaf9fd4e1bf94ced5c3dafa9e9d9a6dd0;hp=bf72a8187481e3d472566400ba36c37ca561830e;hpb=89b25eb4e3bb60dde1c2db7ec3ab9ab503caf221;p=vsys-scripts.git diff --git a/fd_tuntap.c b/fd_tuntap.c index bf72a81..ddcd431 100644 --- a/fd_tuntap.c +++ b/fd_tuntap.c @@ -105,10 +105,11 @@ int main(int argc, char *argv[]) } /* Open tun device */ - if( (tap_fd = open("/dev/stdtun", O_RDWR)) < 0 ) { + if( (tap_fd = open("/dev/net/tun", O_RDWR)) < 0 ) { system("modprobe tun"); - if( (tap_fd = open("/dev/stdtun", O_RDWR)) < 0 ) { - perror("ERROR: tun_alloc():open(/dev/stdtun)"); + system("ln -sf /dev/net/tun /dev/stdtun"); + if( (tap_fd = open("/dev/net/tun", O_RDWR)) < 0 ) { + perror("ERROR: tun_alloc():open(/dev/net/tun)"); exit(-1); } }