mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-23 18:15:13 +00:00
repsonse parser
This commit is contained in:
parent
f2b27f868e
commit
cbdb3a9c7d
10
dnstun.c
10
dnstun.c
@ -38,13 +38,11 @@ static int
|
|||||||
tunnel(int tun_fd, int dns_fd)
|
tunnel(int tun_fd, int dns_fd)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
fd_set fds;
|
|
||||||
struct timeval tv;
|
|
||||||
char buf[1024];
|
|
||||||
int buflen;
|
|
||||||
int read;
|
int read;
|
||||||
|
fd_set fds;
|
||||||
|
char buf[1024];
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
buflen = 1024;
|
|
||||||
while (running) {
|
while (running) {
|
||||||
tv.tv_sec = 1;
|
tv.tv_sec = 1;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
@ -69,7 +67,7 @@ tunnel(int tun_fd, int dns_fd)
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(FD_ISSET(dns_fd, &fds)) {
|
if(FD_ISSET(dns_fd, &fds)) {
|
||||||
read = dns_read(dns_fd, buf, buflen);
|
read = dns_read(dns_fd, buf, sizeof(buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user