[API 0.506] GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS

return code for with the dnssec_return_only_secure extension
This commit is contained in:
Willem Toorop 2014-09-03 16:09:50 +02:00
parent f72a38b3cc
commit 772efb1186
6 changed files with 8 additions and 1 deletions

Binary file not shown.

BIN
spec/getdns-0.506.tgz Normal file

Binary file not shown.

View File

@ -900,6 +900,8 @@ will have zero length.</p>
<p class=descrip>All queries for the name timed out</p>
<p class=define>GETDNS_RESPSTATUS_NO_SECURE_ANSWERS</p>
<p class=descrip>The context setting for getting only secure responses was specified, and at least one DNS response was received, but no DNS response was determined to be secure through DNSSEC.</p>
<p class=define>GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS</p>
<p class=descrip>The context setting for getting only secure responses was specified, and at least one DNS reponse was received, but all received responses for the requested name were bogus.</p>
<p>The top level of <code>replies_tree</code> can optionally have the following names: <code>canonical_name</code> (a
@ -2446,7 +2448,7 @@ getdns_pretty_print_dict() for debugging.</li>
<h1>9. The Generated Files</h1>
<p>There is <a href="getdns-0.505.tgz">a tarball</a> that includes the .h files,
<p>There is <a href="getdns-0.506.tgz">a tarball</a> that includes the .h files,
the examples, and so on. The examples all make, even though there is no API implementation, based
on a pseudo-implementation in the tarball; see make-examples-PLATFORM.sh. Note that this currently builds fine
on the Macintosh and Ubuntu; help is definitely appreciated on making the build process

View File

@ -70,6 +70,7 @@ static struct const_info consts_info[] = {
{ 901, "GETDNS_RESPSTATUS_NO_NAME", GETDNS_RESPSTATUS_NO_NAME_TEXT },
{ 902, "GETDNS_RESPSTATUS_ALL_TIMEOUT", GETDNS_RESPSTATUS_ALL_TIMEOUT_TEXT },
{ 903, "GETDNS_RESPSTATUS_NO_SECURE_ANSWERS", GETDNS_RESPSTATUS_NO_SECURE_ANSWERS_TEXT },
{ 904, "GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS", GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS_TEXT },
{ 1000, "GETDNS_EXTENSION_TRUE", GETDNS_EXTENSION_TRUE_TEXT },
{ 1001, "GETDNS_EXTENSION_FALSE", GETDNS_EXTENSION_FALSE_TEXT },
{ 1100, "GETDNS_BAD_DNS_CNAME_IN_TARGET", GETDNS_BAD_DNS_CNAME_IN_TARGET_TEXT },

View File

@ -286,6 +286,8 @@ typedef enum getdns_callback_type_t {
#define GETDNS_RESPSTATUS_ALL_TIMEOUT_TEXT "All queries for the name timed out"
#define GETDNS_RESPSTATUS_NO_SECURE_ANSWERS 903
#define GETDNS_RESPSTATUS_NO_SECURE_ANSWERS_TEXT "The context setting for getting only secure responses was specified, and at least one DNS response was received, but no DNS response was determined to be secure through DNSSEC."
#define GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS 904
#define GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS_TEXT "The context setting for getting only secure responses was specified, and at least one DNS response was received, but all received responses for the requested name were bogus."
/** @}
*/

View File

@ -690,6 +690,8 @@ create_getdns_response(struct getdns_dns_req * completed_request)
nreplies == 0 ? GETDNS_RESPSTATUS_ALL_TIMEOUT :
dnssec_return_only_secure && nsecure == 0 && ninsecure > 0
? GETDNS_RESPSTATUS_NO_SECURE_ANSWERS :
dnssec_return_only_secure && nsecure == 0 && nbogus > 0
? GETDNS_RESPSTATUS_ALL_BOGUS_ANSWERS :
nanswers == 0 ? GETDNS_RESPSTATUS_NO_NAME
: GETDNS_RESPSTATUS_GOOD);
} while (0);