Send more random pings

This commit is contained in:
Erik Ekman 2006-06-06 14:18:32 +00:00
parent bed0b63bf6
commit 0edb934775

4
dns.c
View file

@ -183,13 +183,15 @@ dns_handle_tun(int fd, char *data, int len)
void
dns_ping(int dns_fd)
{
char data[3];
if (dns_sending()) {
printf("No reply on chunk, discarding\n");
lastlen = 0;
packetpos = 0;
packetlen = 0;
}
dns_write(dns_fd, ++pingid, "", 0);
snprintf(data, 3, "%02X", pingid);
dns_write(dns_fd, ++pingid, data, 2);
}
void