mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 23:16:05 +03:00
cleanup, removed debuginfo
This commit is contained in:
parent
125bb57a2f
commit
966f095d1e
11
iodine.c
11
iodine.c
@ -75,11 +75,7 @@ tunnel(int tun_fd, int dns_fd)
|
|||||||
warn("select");
|
warn("select");
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else if (i > 0) {
|
||||||
|
|
||||||
if(i == 0) {
|
|
||||||
dns_ping(dns_fd);
|
|
||||||
} else {
|
|
||||||
if(FD_ISSET(tun_fd, &fds)) {
|
if(FD_ISSET(tun_fd, &fds)) {
|
||||||
read = read_tun(tun_fd, in, sizeof(in));
|
read = read_tun(tun_fd, in, sizeof(in));
|
||||||
if(read <= 0)
|
if(read <= 0)
|
||||||
@ -101,7 +97,8 @@ tunnel(int tun_fd, int dns_fd)
|
|||||||
if (!dns_sending())
|
if (!dns_sending())
|
||||||
dns_ping(dns_fd);
|
dns_ping(dns_fd);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
dns_ping(dns_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -144,8 +141,6 @@ handshake(int dns_fd)
|
|||||||
|
|
||||||
if (read > 0) {
|
if (read > 0) {
|
||||||
if (sscanf(in, "%[^-]-%[^-]-%d", server, client, &mtu) == 3) {
|
if (sscanf(in, "%[^-]-%[^-]-%d", server, client, &mtu) == 3) {
|
||||||
printf("%s %s %d\n", server, client, mtu);
|
|
||||||
|
|
||||||
if (tun_setip(client) == 0 && tun_setmtu(mtu) == 0)
|
if (tun_setip(client) == 0 && tun_setmtu(mtu) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user