Commit 54e3529d authored by Mukund Sivaraman's avatar Mukund Sivaraman Committed by Evan Hunt
Browse files

Don't validate non-pending glue when adding to the additional section

(cherry picked from commit 31bd3147)
parent 2e2616d8
...@@ -1583,8 +1583,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) { ...@@ -1583,8 +1583,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
have_a = ISC_TRUE; have_a = ISC_TRUE;
#endif #endif
if (additionaltype == dns_rdatasetadditional_fromcache && if (additionaltype == dns_rdatasetadditional_fromcache &&
(DNS_TRUST_PENDING(rdataset->trust) || DNS_TRUST_PENDING(rdataset->trust) &&
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) !validate(client, db, fname, rdataset, sigrdataset))
{ {
dns_rdataset_disassociate(rdataset); dns_rdataset_disassociate(rdataset);
...@@ -1654,8 +1653,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) { ...@@ -1654,8 +1653,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
goto addname; goto addname;
#endif #endif
if (additionaltype == dns_rdatasetadditional_fromcache && if (additionaltype == dns_rdatasetadditional_fromcache &&
(DNS_TRUST_PENDING(rdataset->trust) || DNS_TRUST_PENDING(rdataset->trust) &&
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) !validate(client, db, fname, rdataset, sigrdataset))
{ {
dns_rdataset_disassociate(rdataset); dns_rdataset_disassociate(rdataset);
...@@ -2122,9 +2120,9 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) { ...@@ -2122,9 +2120,9 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/ */
if (result == ISC_R_SUCCESS && if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache && additionaltype == dns_rdatasetadditional_fromcache &&
(DNS_TRUST_PENDING(rdataset->trust) || DNS_TRUST_PENDING(rdataset->trust) &&
DNS_TRUST_GLUE(rdataset->trust)) && !validate(client, db, fname, rdataset, sigrdataset))
!validate(client, db, fname, rdataset, sigrdataset)) { {
dns_rdataset_disassociate(rdataset); dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset)) if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset); dns_rdataset_disassociate(sigrdataset);
...@@ -2164,9 +2162,9 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) { ...@@ -2164,9 +2162,9 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/ */
if (result == ISC_R_SUCCESS && if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache && additionaltype == dns_rdatasetadditional_fromcache &&
(DNS_TRUST_PENDING(rdataset->trust) || DNS_TRUST_PENDING(rdataset->trust) &&
DNS_TRUST_GLUE(rdataset->trust)) && !validate(client, db, fname, rdataset, sigrdataset))
!validate(client, db, fname, rdataset, sigrdataset)) { {
dns_rdataset_disassociate(rdataset); dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset)) if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset); dns_rdataset_disassociate(sigrdataset);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment