]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Use qstate's region for IPSECKEY rrset (ipsecmod).
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 17 May 2017 13:22:06 +0000 (13:22 +0000)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 17 May 2017 13:22:06 +0000 (13:22 +0000)
git-svn-id: file:///svn/unbound/trunk@4169 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
ipsecmod/ipsecmod.c
ipsecmod/ipsecmod.h

index 09f369a306d62fb13272da771bc76ed8fe55ee3c..7899cdeefc5b84182861be7ecc358aec1754d284 100644 (file)
@@ -1,3 +1,6 @@
+16 May 2017: George
+       - Use qstate's region for IPSECKEY rrset (ipsecmod).
+
 16 May 2017: George
        - Implemented opportunistic IPsec support module (ipsecmod).
        - Some whitespace fixup.
index 8c5f21e63b7fe374789a3f63c1e3d9c61895c471..3e4ee6a535083a88365605890490d338b3552259 100644 (file)
@@ -112,7 +112,6 @@ ipsecmod_new(struct module_qstate* qstate, int id)
        iq->is_whitelisted = ipsecmod_domain_is_whitelisted(
                (struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname,
                qstate->qinfo.qname_len, qstate->qinfo.qclass);
-       iq->region = regional_create();
        return 1;
 }
 
@@ -471,7 +470,7 @@ ipsecmod_inform_super(struct module_qstate* qstate, int id,
                if(rrset_key) {
                        /* We have an answer. */
                        /* Copy to super's region. */
-                       rrset_key = packed_rrset_copy_region(rrset_key, siq->region, 0);
+                       rrset_key = packed_rrset_copy_region(rrset_key, super->region, 0);
                        siq->ipseckey_rrset = rrset_key;
                        if(!rrset_key) {
                                log_err("ipsecmod: out of memory.");
@@ -485,14 +484,8 @@ ipsecmod_inform_super(struct module_qstate* qstate, int id,
 void
 ipsecmod_clear(struct module_qstate* qstate, int id)
 {
-       struct ipsecmod_qstate* iq;
        if(!qstate)
                return;
-       iq = (struct ipsecmod_qstate*)qstate->minfo[id];
-       if(iq) {
-               /* free contents of iq. */
-               regional_destroy(iq->region);
-       }
        qstate->minfo[id] = NULL;
 }
 
index 89323a4f713262a0ef10993eef0cf5551a0c0597..eca92409591992b45fb17488a6c83c31f3d7010f 100644 (file)
@@ -66,8 +66,6 @@ struct ipsecmod_qstate {
        /** If the qname is whitelisted or not. */
        /** NOTE: No whitelist means all qnames are whitelisted. */
        int is_whitelisted;
-       /** Region to store the IPSECKEY rrset. */
-       struct regional* region;
        /** Pointer to IPSECKEY rrset allocated in the above region. NULL if there
         *  was no IPSECKEY reply from the subquery. */
        struct ub_packed_rrset_key* ipseckey_rrset;