mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 10:09:19 +02:00
Ignore ping packet on server
This commit is contained in:
parent
51bdcd9656
commit
5e7385a0ea
2
dns.c
2
dns.c
|
@ -185,7 +185,7 @@ dns_ping(int dns_fd)
|
||||||
printf("No reply on chunk, resending\n");
|
printf("No reply on chunk, resending\n");
|
||||||
dns_send_chunk(dns_fd);
|
dns_send_chunk(dns_fd);
|
||||||
} else {
|
} 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++;
|
packetlen++;
|
||||||
}
|
}
|
||||||
dnsd_respond(fd, id, from);
|
dnsd_respond(fd, id, from);
|
||||||
|
if (lastblock && packetlen == 0) {
|
||||||
|
// Skipping ping packet
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (lastblock) {
|
if (lastblock) {
|
||||||
datalen = MIN(packetlen, buflen);
|
datalen = MIN(packetlen, buflen);
|
||||||
memcpy(buf, activepacket, datalen);
|
memcpy(buf, activepacket, datalen);
|
||||||
|
|
Loading…
Reference in New Issue