From 995b4011b4e4f978c5a0a32fc030f14568cdfc28 Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 29 Mar 2023 17:03:29 +0000 Subject: [PATCH] Instead of storing the short TAL name as repouri use the first TAL URI for that. This is more in line with the other uses of repouri. OK 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 059fbfceff6..0a2513c202e 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.41 2022/12/28 21:30:18 jmc Exp $ */ +/* $OpenBSD: repo.c,v 1.42 2023/03/29 17:03:29 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -1012,18 +1012,18 @@ ta_lookup(int id, struct tal *tal) /* Look up in repository table. (Lookup should actually fail here) */ SLIST_FOREACH(rp, &repos, entry) { - if (strcmp(rp->repouri, tal->descr) == 0) + if (strcmp(rp->repouri, tal->uri[0]) == 0) return rp; } rp = repo_alloc(id); rp->basedir = repo_dir(tal->descr, "ta", 0); - if ((rp->repouri = strdup(tal->descr)) == NULL) + if ((rp->repouri = strdup(tal->uri[0])) == NULL) err(1, NULL); /* check if sync disabled ... */ if (noop) { - logx("ta/%s: using cache", rp->repouri); + logx("%s: using cache", rp->basedir); entityq_flush(&rp->queue, rp); return rp; } -- 2.20.1