api_msg.c, dns.h, dns.c: Implement DNS_DOES_NAME_CHECK option (check if name received match the name query), implement DNS_USES_STATIC_BUF (the place where copy dns payload to parse the response), return an error if there is no place for a new query, and fix some minor problems.

This commit is contained in:
fbernon
2007-11-19 22:42:01 +00:00
parent da4df1f414
commit f58515b51e
4 changed files with 209 additions and 88 deletions

View File

@@ -1032,6 +1032,9 @@ do_gethostbyname(void *arg)
if (res == DNS_COMPLETE) {
/* name was already in octet notation or cached */
*msg->err = ERR_OK;
} else if (res == DNS_ERR_MEM) {
/* memory allocation error */
*msg->err = ERR_MEM;
} else {
/* some error occurred */
*msg->err = ERR_ARG;