From a8481ad3532fe4a3535724e65b1cbc6bee441010 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 28 Jan 2022 14:11:27 +0000 Subject: [PATCH] Do not skip .rrdp cache cleanup if rrdp is off (option -R). The sync via rsync alters the cache and rrdp can only recover by downloading a snapshot. By doing the cleanup here it will make sure this happens. Noticed by job@ OK tb@ --- usr.sbin/rpki-client/repo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index d68540b2bfe..fe4c2a1606f 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.28 2022/01/26 13:57:56 claudio Exp $ */ +/* $OpenBSD: repo.c,v 1.29 2022/01/28 14:11:27 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -1389,7 +1389,7 @@ repo_cleanup(struct filepath_tree *tree) * clear them if they are not used anymore but * only if rrdp is active. */ - if (e->fts_pointer == RRDP_DIR && !noop && rrdpon && + if (e->fts_pointer == RRDP_DIR && !noop && e->fts_level == 2) { if (!rrdp_is_active(path)) e->fts_pointer = NULL; -- 2.20.1