From 73a8ca21d41da9184060a561b4ff3a701be6ef5e Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 24 Apr 2023 17:11:33 +0000 Subject: [PATCH] If the two mfts in mft_compare() are the same do not prefer the first (DIR_VALID) but perfer the 2nd (DIR_TEMP) since this allows rpki-client to move the equal files from .rrdp back into the valid repo tree and so there are less unaccounted files for. Problem noticed by and OK job@ --- usr.sbin/rpki-client/mft.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpki-client/mft.c b/usr.sbin/rpki-client/mft.c index 4c87b993912..5173ec0ba1e 100644 --- a/usr.sbin/rpki-client/mft.c +++ b/usr.sbin/rpki-client/mft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mft.c,v 1.89 2023/03/13 19:54:36 job Exp $ */ +/* $OpenBSD: mft.c,v 1.90 2023/04/24 17:11:33 claudio Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2019 Kristaps Dzonsons @@ -545,7 +545,7 @@ mft_compare(const struct mft *a, const struct mft *b) return 0; r = strcmp(a->seqnum, b->seqnum); - if (r >= 0) /* a is greater or equal, prefer a */ + if (r > 0) /* a is greater, prefer a */ return 1; return 0; } -- 2.20.1