From 41d5fc13e0702a59c6a5c6d3ad952a43aa13fcd7 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 1 Sep 2021 12:26:27 +0000 Subject: RPKI only cares about *.{cer,crl,gbr,mft,roa} files. Use rsync --include and --exclude to only fetch those files from the CA repositories. OK job@ --- usr.sbin/rpki-client/rsync.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'usr.sbin/rpki-client/rsync.c') diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c index d2eb4c26c7a..740d0ada53b 100644 --- a/usr.sbin/rpki-client/rsync.c +++ b/usr.sbin/rpki-client/rsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsync.c,v 1.24 2021/04/19 17:04:35 deraadt Exp $ */ +/* $OpenBSD: rsync.c,v 1.25 2021/09/01 12:26:26 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -277,8 +277,14 @@ proc_rsync(char *prog, char *bind_addr, int fd) args[i++] = (char *)prog; args[i++] = "-rt"; args[i++] = "--no-motd"; - args[i++] = "--timeout"; - args[i++] = "180"; + args[i++] = "--timeout=180"; + args[i++] = "--include=*/"; + args[i++] = "--include=*.cer"; + args[i++] = "--include=*.crl"; + args[i++] = "--include=*.gbr"; + args[i++] = "--include=*.mft"; + args[i++] = "--include=*.roa"; + args[i++] = "--exclude=*"; if (bind_addr != NULL) { args[i++] = "--address"; args[i++] = (char *)bind_addr; -- cgit v1.2.3