mirror of
https://github.com/yarrick/iodine.git
synced 2025-01-09 12:13:34 +02:00
Change to recv(), stop warning on close
This commit is contained in:
parent
43787fae12
commit
f2b27f868e
2 changed files with 4 additions and 4 deletions
4
dns.c
4
dns.c
|
@ -133,10 +133,8 @@ int
|
|||
dns_read(int fd, char *buf, int len)
|
||||
{
|
||||
int r;
|
||||
int fromlen;
|
||||
struct sockaddr_in from;
|
||||
|
||||
r = recvfrom(fd, buf, len, 0, (struct sockaddr*)&from, &fromlen);
|
||||
r = recv(fd, buf, len, 0);
|
||||
if (r < 0) {
|
||||
perror("recvfrom");
|
||||
}
|
||||
|
|
4
dnstun.c
4
dnstun.c
|
@ -56,7 +56,9 @@ tunnel(int tun_fd, int dns_fd)
|
|||
i = select(MAX(tun_fd, dns_fd) + 1, &fds, NULL, NULL, &tv);
|
||||
|
||||
if(i < 0) {
|
||||
warn("select");
|
||||
if (running) {
|
||||
warn("select");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue