]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/utils: added flags field to ranked_rr_array_entry
authorMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 9 Jun 2018 02:13:19 +0000 (19:13 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 7 Sep 2018 17:45:21 +0000 (10:45 -0700)
This uses 4 bits of space that were lost for alignment.
It doesn't have any direct use, but modules can use it to tag
entries.

daemon/lua/kres-gen.lua
lib/utils.h

index 7827e78090018ab1b1b086107e1a1e1d1a9efa00..3a3ad30373e0d08b4d18143f83ca1cdb3e30941f 100644 (file)
@@ -140,6 +140,7 @@ struct ranked_rr_array_entry {
        _Bool yielded : 1;
        _Bool to_wire : 1;
        _Bool expiring : 1;
+       uint8_t flags : 4;
        knot_rrset_t *rr;
 };
 typedef struct ranked_rr_array_entry ranked_rr_array_entry_t;
index ef2465c575f97df6253f296d2bb9664057df7304..6fe408c405c42bfcdce3bbf5d5ac6c06201f0129 100644 (file)
@@ -168,6 +168,7 @@ struct ranked_rr_array_entry {
        bool yielded : 1;
        bool to_wire : 1; /**< whether to be put into the answer */
        bool expiring : 1; /**< low remaining TTL; see is_expiring; only used in cache ATM */
+       uint8_t flags : 4; /**< Alignment of the full u8 (can be used for other flags) */
        knot_rrset_t *rr;
 };
 typedef struct ranked_rr_array_entry ranked_rr_array_entry_t;