New upstream release.
authorgregor herrmann <gregoa@debian.org>
Tue, 2 Jun 2009 15:38:02 +0000 (15:38 -0000)
committergregor herrmann <gregoa@debian.org>
Tue, 2 Jun 2009 15:38:02 +0000 (15:38 -0000)
CHANGELOG
debian/changelog
src/iodine.c
src/tun.c

index 1b792b8b3881da68eba91021c4c9fbd393359e77..8a647f8ab40633336588fc725b1f1e525f8b7122 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,11 @@ iodine - http://code.kryo.se/iodine
 
 CHANGES:
 
+2009-06-01: 0.5.2 "WifiFree"
+       - Fixed client segfault on OS X, #57
+       - Added check that nameserver lookup was successful
+       - Fixed ENOTSOCK error on OS X and FreeBSD, #58.
+
 2009-03-21: 0.5.1 "Boringo"
        - Added initial Windows support, fixes #43.
        - Added length check of autoprobe responses
index 4a73f03dac66971a7b906bcfe34de6c32f40ca8f..3284ff5e18dd46f419bf7c8e44c3b2d15e660dc1 100644 (file)
@@ -1,3 +1,9 @@
+iodine (0.5.2-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa@debian.org>  Tue, 02 Jun 2009 17:37:02 +0200
+
 iodine (0.5.1-2) unstable; urgency=low
 
   * (Re-)add a warning to README.Debian that both client and server needs to
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)) {
index 57b369d915a10ad3394233f8a1866b576e96f31b..4f40dd42d35ffc893ec83c23c5d3868de3e17d23 100644 (file)
--- a/src/tun.c
+++ b/src/tun.c
@@ -360,7 +360,8 @@ read_tun(int tun_fd, char *buf, size_t len)
 #if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
        /* FreeBSD/Darwin/NetBSD has no header */
        int bytes;
-       bytes = recv(tun_fd, buf + 4, len, 0);
+       memset(buf, 0, 4);
+       bytes = read(tun_fd, buf + 4, len - 4);
        if (bytes < 0) {
                return bytes;
        } else {