]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
Merge pointer-arith changes into cache-NSEC3
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 29 May 2018 09:44:15 +0000 (11:44 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 29 May 2018 09:44:15 +0000 (11:44 +0200)
1  2 
lib/cache/entry_rr.c
lib/cache/impl.h

Simple merge
index 59492a0fab32f8dd068b4b8278efd3702ceee010,8faf74c0603c8e5f71bac30bd242e02a0e197e89..d6287aac04776b749be8f4b95f0a92e634752340
@@@ -238,20 -168,13 +238,20 @@@ static inline int rdataset_dematerializ
  }
  
  /** Dematerialize a rdataset. */
- int rdataset_dematerialize(const knot_rdataset_t *rds, void * restrict data);
+ int rdataset_dematerialize(const knot_rdataset_t *rds, uint8_t * restrict data);
  
 +/** NSEC* parameters; almost nothing is meaningful for NSEC. */
 +struct nsec_p {
 +      const uint8_t *raw; /**< Pointer to raw NSEC3 parameters; NULL for NSEC. */
 +      nsec_p_hash_t hash; /**< Hash of `raw`, used for cache keys. */
 +      dnssec_nsec3_params_t libknot; /**< Format for libknot; owns malloced memory! */
 +};
 +
  /** Partially constructed answer when gathering RRsets from cache. */
  struct answer {
 -      int rcode;      /**< PKT_NODATA, etc. */
 -      uint8_t nsec_v; /**< 1 or 3 */
 -      knot_mm_t *mm;  /**< Allocator for rrsets */
 +      int rcode;              /**< PKT_NODATA, etc. */
 +      struct nsec_p nsec_p;   /**< Don't mix different NSEC* parameters in one answer. */
 +      knot_mm_t *mm;          /**< Allocator for rrsets */
        struct answer_rrset {
                ranked_rr_array_entry_t set;    /**< set+rank for the main data */
                knot_rdataset_t sig_rds;        /**< RRSIG data, if any */