diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-09-14 11:38:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-09-14 11:38:45 +0000 |
commit | c18e7f817dadbadb3be821b7f0942555be7e188e (patch) | |
tree | c634ffa33cc9ac36e26b113f04167a987822d52a /usr.sbin/rpki-client | |
parent | a74833d554aaec1436d45da0a2f1a9a1ff281b4b (diff) |
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@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r-- | usr.sbin/rpki-client/rrdp_notification.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |