[svn-upgrade] Integrating new upstream version, iodine (0.5.2)
[debian/iodine.git] / src / iodine.c
index 65e47bc8159e13ba0bdb13e4082b916344a594fa..8c2bc9338ff704847ea578ff0462c5c3100b28ef 100644 (file)
@@ -231,7 +231,7 @@ tunnel_tun(int tun_fd, int dns_fd)
        unsigned long inlen;
        char out[64*1024];
        char in[64*1024];
-       size_t read;
+       ssize_t read;
 
        if ((read = read_tun(tun_fd, in, sizeof(in))) <= 0)
                return -1;
@@ -1100,7 +1100,12 @@ main(int argc, char **argv)
                /* NOTREACHED */
        }
 
-       set_nameserver(nameserv_addr);
+       if (nameserv_addr) {
+               set_nameserver(nameserv_addr);
+       } else {
+               usage();
+               /* NOTREACHED */
+       }       
 
        if(strlen(topdomain) <= 128) {
                if(check_topdomain(topdomain)) {