From: Matthijs Mekking Date: Thu, 24 Jun 2021 14:22:22 +0000 (+0200) Subject: Add key metadata for DS published/withdrawn X-Git-Tag: v9.17.16~8^2~7 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=6e2c24be7cd476240879e22367f08fc25b7d882d;p=thirdparty%2Fbind9.git Add key metadata for DS published/withdrawn In order to keep track of how many parents have the DS for a given key published or withdrawn, keep a counter. --- diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 884537c2e41..f0af50f6d22 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -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); diff --git a/lib/dns/dst_parse.c b/lib/dns/dst_parse.c index 751180f462c..74dbd853035 100644 --- a/lib/dns/dst_parse.c +++ b/lib/dns/dst_parse.c @@ -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 { diff --git a/lib/dns/include/dst/dst.h b/lib/dns/include/dst/dst.h index 2f9877be432..f454ebbf783 100644 --- a/lib/dns/include/dst/dst.h +++ b/lib/dns/include/dst/dst.h @@ -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