From 5b4fd51c4deff09e0aca27169ab780cf5186f086 Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 14 Sep 2021 11:38:44 +0000 Subject: [PATCH] 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(+) 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) { -- 2.20.1