mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-30 13:35:09 +00:00
checking return value from decompress, to avoid sending 64k packages on the tun every time there is a datacorruption
This commit is contained in:
parent
16e9df4164
commit
757f59e350
@ -166,7 +166,8 @@ tunnel_dns(int tun_fd, int dns_fd)
|
|||||||
|
|
||||||
outlen = sizeof(out);
|
outlen = sizeof(out);
|
||||||
inlen = read;
|
inlen = read;
|
||||||
uncompress(out, &outlen, in, inlen);
|
if (uncompress(out, &outlen, in, inlen) != Z_OK)
|
||||||
|
return -1;
|
||||||
|
|
||||||
write_tun(tun_fd, out, outlen);
|
write_tun(tun_fd, out, outlen);
|
||||||
if (!is_sending())
|
if (!is_sending())
|
||||||
@ -362,6 +363,7 @@ handshake(int dns_fd)
|
|||||||
|
|
||||||
perform_login:
|
perform_login:
|
||||||
login_calculate(login, 16, password, seed);
|
login_calculate(login, 16, password, seed);
|
||||||
|
|
||||||
for (i=0; running && i<5 ;i++) {
|
for (i=0; running && i<5 ;i++) {
|
||||||
tv.tv_sec = i + 1;
|
tv.tv_sec = i + 1;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user