This commit is contained in:
Erik Ekman 2006-11-02 06:38:16 +00:00
parent 18cb02f90f
commit 4588aab71a
2 changed files with 5 additions and 4 deletions

3
README
View File

@ -67,7 +67,7 @@ If you have problems, try inspecting the traffic with network monitoring tools
and make sure that the relaying DNS server has not cached the response. A
cached error message could mean that you started the client before the server.
The upstream data is sent gzipped encoded in hexadecimal. DNS protocol allows
The upstream data is sent gzipped encoded with Base32. DNS protocol allows
one query per packet, and one query can be max 256 chars. Each domain name part
can be max 63 chars. So your domain name and subdomain should be as short as
possible to allow maximum throughput.
@ -91,6 +91,7 @@ iodine has atomic number 53, which happens to be the DNS port number.
THANKS:
- To kuxien for FreeBSD and OS X testing
- To poplix for code audit
AUTHORS & LICENSE:

6
dns.c
View File

@ -320,11 +320,11 @@ dns_parse_reply(char *outbuf, int buflen, char *packet, int packetlen)
readshort(packet, &data, &class);
readlong(packet, &data, &ttl);
readshort(packet, &data, &rlen);
readdata(packet, &data, rdata, rlen);
rv = MIN(rlen, sizeof(rdata));
readdata(packet, &data, rdata, rv);
}
if(type == T_NULL && rlen > 2) {
rv = MIN(rlen, sizeof(rdata));
if(type == T_NULL && rv > 2) {
memcpy(outbuf, rdata, rv);
}
}