X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fd_tuntap.c;h=45e66be8e12fdae0a65697caf32a8704c66d7568;hb=refs%2Fheads%2F0.7%4012288;hp=b7f515898447230c9ebcc5b72bdcd32e9b9bbf76;hpb=d9889cbb1a7729edb91a3f36b29b7630b1ee0ef1;p=vsys-scripts.git diff --git a/fd_tuntap.c b/fd_tuntap.c index b7f5158..45e66be 100644 --- a/fd_tuntap.c +++ b/fd_tuntap.c @@ -45,7 +45,7 @@ int send_vif_fd(int sock_fd, int vif_fd, char *vif_name) msg.msg_flags = 0; /* Send the interface name as the iov */ - vec.iov_base = &vif_name; + vec.iov_base = vif_name; vec.iov_len = strlen(vif_name)+1; while ((retval = sendmsg(sock_fd, &msg, 0)) == -1 && errno == EINTR); @@ -105,10 +105,10 @@ 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)"); + if( (tap_fd = open("/dev/net/tun", O_RDWR)) < 0 ) { + perror("ERROR: tun_alloc():open(/dev/net/tun)"); exit(-1); } }