Re: rpki-client: add rsync baseuri-based batching

Theo Buehler <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Wed, Jul 08, 2026 at 09:52:44AM +0000, Job Snijders wrote:
> On Tue, Jul 07, 2026 at 08:37:22PM +0200, Theo Buehler wrote:
> > > Why not simply use:
> > > 	LIST_FOREACH(fle, &batchlist, entry) {
> > > 		if (strcasecmp(uri, fle->fqdn,fle->fqdn) == 0)
> > > 			return 1;
> > > 	}
> > > 	return 0;
> > > 
> > > I don't understand why the strlen are needed here.
> > 
> > It's not needed here since we're dealing with full strings.
> > 
> > This comes from the code here being a copy of a copy of the skiplist and
> > shortlist dance in main.c, where the length check is needed since we
> > compare against a substring of the host.
> > 
> > If we're going to introduce such helpers, I think it would be worthwhile
> > to try covering skiplist and shortlist as well. It would then probably
> > be worth considering a fle->fqdn_len member.
> 
> OK, to table 'rsync base uri batching' for a moment...
> 
> Here is a refactor that introduces helpers for shortlist & skiplist. I
> don't think a 'len' member is needed if the needles used for search are
> right-sized.

I would prefer not strdup-ing and keeping the existing logic to be
honest. I also don't think this requires yet another file.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.