]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add key metadata for DS published/withdrawn
authorMatthijs Mekking <matthijs@isc.org>
Thu, 24 Jun 2021 14:22:22 +0000 (16:22 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 30 Jun 2021 15:28:48 +0000 (17:28 +0200)
In order to keep track of how many parents have the DS for a given key
published or withdrawn, keep a counter.

lib/dns/dst_api.c
lib/dns/dst_parse.c
lib/dns/include/dst/dst.h

index 884537c2e417f32f4cfa4787ae2e101945184e78..f0af50f6d22df464ceeddb6750e2a8146e68b7fc 100644 (file)
@@ -97,7 +97,8 @@
 
 #define NUMERIC_NTAGS (DST_MAX_NUMERIC + 1)
 static const char *numerictags[NUMERIC_NTAGS] = {
-       "Predecessor:", "Successor:", "MaxTTL:", "RollPeriod:", "Lifetime:"
+       "Predecessor:", "Successor:",  "MaxTTL:",    "RollPeriod:",
+       "Lifetime:",    "DSPubCount:", "DSRemCount:"
 };
 
 #define BOOLEAN_NTAGS (DST_MAX_BOOLEAN + 1)
@@ -2014,6 +2015,9 @@ write_key_state(const dst_key_t *key, int type, const char *directory) {
                printtime(key, DST_TIME_SYNCPUBLISH, "PublishCDS", fp);
                printtime(key, DST_TIME_SYNCDELETE, "DeleteCDS", fp);
 
+               printnum(key, DST_NUM_DSPUBCOUNT, "DSPubCount", fp);
+               printnum(key, DST_NUM_DSDELCOUNT, "DSDelCount", fp);
+
                printtime(key, DST_TIME_DNSKEY, "DNSKEYChange", fp);
                printtime(key, DST_TIME_ZRRSIG, "ZRRSIGChange", fp);
                printtime(key, DST_TIME_KRRSIG, "KRRSIGChange", fp);
index 751180f462caa4d417fde4247c7e0b648d62603d..74dbd85303566c0edb73d4198f2b50ba5eabbd10 100644 (file)
@@ -61,7 +61,7 @@ static const char *timetags[TIMING_NTAGS] = {
 
 #define NUMERIC_NTAGS (DST_MAX_NUMERIC + 1)
 static const char *numerictags[NUMERIC_NTAGS] = {
-       "Predecessor:", "Successor:", "MaxTTL:", "RollPeriod:", NULL
+       "Predecessor:", "Successor:", "MaxTTL:", "RollPeriod:", NULL, NULL, NULL
 };
 
 struct parse_map {
index 2f9877be432fc345d8fab4aa6df4a1334797af4e..f454ebbf783ba93083b5e8630c818ab17187cb2c 100644 (file)
@@ -142,7 +142,9 @@ typedef enum dst_key_state {
 #define DST_NUM_MAXTTL     2
 #define DST_NUM_ROLLPERIOD  3
 #define DST_NUM_LIFETIME    4
-#define DST_MAX_NUMERIC            4
+#define DST_NUM_DSPUBCOUNT  5
+#define DST_NUM_DSDELCOUNT  6
+#define DST_MAX_NUMERIC            6
 
 /* Boolean metadata definitions */
 #define DST_BOOL_KSK   0