diff options
author | Job Snijders <job@cvs.openbsd.org> | 2024-02-03 14:30:48 +0000 |
---|---|---|
committer | Job Snijders <job@cvs.openbsd.org> | 2024-02-03 14:30:48 +0000 |
commit | 011c864124184a3799bc5fd16a1ab380235cf803 (patch) | |
tree | 71fc1b84ae18e31b3c1583fc8afa5c8e475063f4 /usr.sbin/rpki-client/main.c | |
parent | b6ff21811ce94eeb76785882b57631d619281704 (diff) |
Refactor handling of stale manifests
No need to hoist a staleness indicator through the whole process and
count it explicitly.
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client/main.c')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index f91a9d69327..94ddc3d1c57 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.247 2023/10/13 12:06:49 job Exp $ */ +/* $OpenBSD: main.c,v 1.248 2024/02/03 14:30:47 job Exp $ */ /* * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -621,10 +621,7 @@ entity_process(struct ibuf *b, struct stats *st, struct vrp_tree *tree, break; } mft = mft_read(b); - if (!mft->stale) - queue_add_from_mft(mft); - else - repo_stat_inc(rp, talid, type, STYPE_STALE); + queue_add_from_mft(mft); mft_free(mft); break; case RTYPE_CRL: @@ -732,7 +729,6 @@ sum_stats(const struct repo *rp, const struct repotalstats *in, void *arg) out->mfts += in->mfts; out->mfts_fail += in->mfts_fail; - out->mfts_stale += in->mfts_stale; out->certs += in->certs; out->certs_fail += in->certs_fail; out->roas += in->roas; @@ -1451,9 +1447,8 @@ main(int argc, char *argv[]) stats.repo_tal_stats.certs, stats.repo_tal_stats.certs_fail); printf("Trust Anchor Locators: %u (%u invalid)\n", stats.tals, talsz - stats.tals); - printf("Manifests: %u (%u failed parse, %u stale)\n", - stats.repo_tal_stats.mfts, stats.repo_tal_stats.mfts_fail, - stats.repo_tal_stats.mfts_stale); + printf("Manifests: %u (%u failed parse)\n", + stats.repo_tal_stats.mfts, stats.repo_tal_stats.mfts_fail); printf("Certificate revocation lists: %u\n", stats.repo_tal_stats.crls); printf("Ghostbuster records: %u\n", stats.repo_tal_stats.gbrs); printf("Trust Anchor Keys: %u\n", stats.repo_tal_stats.taks); |