1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-25 22:46:05 +03:00

fixed changing ping domain

This commit is contained in:
Erik Ekman 2006-06-06 17:17:05 +00:00
parent 3440a3f378
commit cbfab201b8

5
dns.c
View File

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