mirror of
https://github.com/yarrick/iodine.git
synced 2025-01-09 12:13:34 +02:00
Ignore ping packet on server
This commit is contained in:
parent
51bdcd9656
commit
5e7385a0ea
2 changed files with 5 additions and 1 deletions
2
dns.c
2
dns.c
|
@ -185,7 +185,7 @@ dns_ping(int dns_fd)
|
|||
printf("No reply on chunk, resending\n");
|
||||
dns_send_chunk(dns_fd);
|
||||
} else {
|
||||
dns_write(dns_fd, dns_fd, "\0", 1);
|
||||
dns_write(dns_fd, dns_fd, "", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
dnsd.c
4
dnsd.c
|
@ -285,6 +285,10 @@ dnsd_read(int fd, char *buf, int buflen)
|
|||
packetlen++;
|
||||
}
|
||||
dnsd_respond(fd, id, from);
|
||||
if (lastblock && packetlen == 0) {
|
||||
// Skipping ping packet
|
||||
return 0;
|
||||
}
|
||||
if (lastblock) {
|
||||
datalen = MIN(packetlen, buflen);
|
||||
memcpy(buf, activepacket, datalen);
|
||||
|
|
Loading…
Reference in a new issue