diff options
Diffstat (limited to 'src/linux')
-rw-r--r-- | src/linux/tun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/linux/tun.c b/src/linux/tun.c index 385da8d..1faf49d 100644 --- a/src/linux/tun.c +++ b/src/linux/tun.c @@ -41,6 +41,7 @@ #include "tun_helper.h" #include <stdlib.h> +#include <unistd.h> #include <sys/wait.h> #include <fcntl.h> #include <sys/ioctl.h> @@ -56,7 +57,7 @@ int tun_init(tun_device_t* dev, const char* dev_name, const char* dev_type, const char* ifcfg_addr, u_int16_t ifcfg_prefix){ if(!dev) - return; + return -1; tun_conf(dev, dev_name, dev_type, ifcfg_addr, ifcfg_prefix, 1400); dev->actual_name_ = NULL; |