From 86bd3e152b682eafa81daf72080ee5d2786add58 Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 4 Jan 2022 18:16:09 +0000 Subject: [PATCH] Fix -n mode by setting repository states to REPO_DONE instead of the more correct REPO_FAILED. The problem is that with REPO_FAILED the repo no longer matches a subsequent rrdp_get lookup and as a result the repo uses rsync which wrong in this case. OK benno@ tb@ --- usr.sbin/rpki-client/repo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index 3e7a4131f4c..3edb098bd86 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.18 2021/12/29 11:35:23 claudio Exp $ */ +/* $OpenBSD: repo.c,v 1.19 2022/01/04 18:16:09 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -447,7 +447,7 @@ ta_get(struct tal *tal) tal->uri = NULL; if (noop) { - tr->state = REPO_FAILED; + tr->state = REPO_DONE; logx("ta/%s: using cache", tr->descr); repo_done(tr, 0); } else { @@ -512,7 +512,7 @@ rsync_get(const char *uri, int nofetch) rr->basedir = repo_dir(repo, "rsync", 0); if (noop || nofetch) { - rr->state = REPO_FAILED; + rr->state = REPO_DONE; logx("%s: using cache", rr->basedir); repo_done(rr, 0); } else { @@ -582,7 +582,7 @@ rrdp_get(const char *uri, int nofetch) RB_INIT(&rr->deleted); if (noop || nofetch) { - rr->state = REPO_FAILED; + rr->state = REPO_DONE; logx("%s: using cache", rr->notifyuri); repo_done(rr, 0); } else { -- 2.20.1