From c18e7f817dadbadb3be821b7f0942555be7e188e Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 14 Sep 2021 11:38:45 +0000 Subject: Do not download more than 300 deltas to sync a RRDP repo. Somewhere around 300 the time it takes to fetch and process all the deltas is higher than fetching just a snapshot. OK job@ sthen@ --- usr.sbin/rpki-client/rrdp_notification.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.sbin/rpki-client') diff --git a/usr.sbin/rpki-client/rrdp_notification.c b/usr.sbin/rpki-client/rrdp_notification.c index d110896b806..57918d93bff 100644 --- a/usr.sbin/rpki-client/rrdp_notification.c +++ b/usr.sbin/rpki-client/rrdp_notification.c @@ -371,6 +371,10 @@ notification_done(struct notification_xml *nxml, char *last_mod) return NOTIFICATION; } + /* it makes no sense to process too many deltas */ + if (nxml->serial - nxml->repository->serial > 300) + goto snapshot; + /* check that all needed deltas are available */ s = nxml->repository->serial + 1; TAILQ_FOREACH(d, &nxml->delta_q, q) { -- cgit v1.2.3