Merge branch 'master' into iodine-0.5
This commit is contained in:
parent
7c4a9c4c7a
commit
c501a3903f
|
@ -5,6 +5,11 @@ iodine - http://code.kryo.se/iodine
|
||||||
|
|
||||||
CHANGES:
|
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"
|
2009-03-21: 0.5.1 "Boringo"
|
||||||
- Added initial Windows support, fixes #43.
|
- Added initial Windows support, fixes #43.
|
||||||
- Added length check of autoprobe responses
|
- Added length check of autoprobe responses
|
||||||
|
|
|
@ -231,7 +231,7 @@ tunnel_tun(int tun_fd, int dns_fd)
|
||||||
unsigned long inlen;
|
unsigned long inlen;
|
||||||
char out[64*1024];
|
char out[64*1024];
|
||||||
char in[64*1024];
|
char in[64*1024];
|
||||||
size_t read;
|
ssize_t read;
|
||||||
|
|
||||||
if ((read = read_tun(tun_fd, in, sizeof(in))) <= 0)
|
if ((read = read_tun(tun_fd, in, sizeof(in))) <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1100,7 +1100,12 @@ main(int argc, char **argv)
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nameserv_addr) {
|
||||||
set_nameserver(nameserv_addr);
|
set_nameserver(nameserv_addr);
|
||||||
|
} else {
|
||||||
|
usage();
|
||||||
|
/* NOTREACHED */
|
||||||
|
}
|
||||||
|
|
||||||
if(strlen(topdomain) <= 128) {
|
if(strlen(topdomain) <= 128) {
|
||||||
if(check_topdomain(topdomain)) {
|
if(check_topdomain(topdomain)) {
|
||||||
|
|
|
@ -360,7 +360,8 @@ read_tun(int tun_fd, char *buf, size_t len)
|
||||||
#if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
|
#if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
|
||||||
/* FreeBSD/Darwin/NetBSD has no header */
|
/* FreeBSD/Darwin/NetBSD has no header */
|
||||||
int bytes;
|
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) {
|
if (bytes < 0) {
|
||||||
return bytes;
|
return bytes;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue