summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client
diff options
context:
space:
mode:
authorJob Snijders <job@cvs.openbsd.org>2022-02-14 14:46:17 +0000
committerJob Snijders <job@cvs.openbsd.org>2022-02-14 14:46:17 +0000
commit06f10241b656aeac1be7ecf99d4e4eac005162e7 (patch)
treed6fa94986804740ea3c79e474aeaaa38d420ba25 /usr.sbin/rpki-client
parentbc5a65f27eb230ed24e45c6530f8a7e099958a3c (diff)
Name the maximum number of deltas permitted in a RRDP Notification file
OK claudio@ tb@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r--usr.sbin/rpki-client/extern.h5
-rw-r--r--usr.sbin/rpki-client/rrdp_notification.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/extern.h b/usr.sbin/rpki-client/extern.h
index 69d2872dd94..b17595d732f 100644
--- a/usr.sbin/rpki-client/extern.h
+++ b/usr.sbin/rpki-client/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.120 2022/02/10 17:33:28 claudio Exp $ */
+/* $OpenBSD: extern.h,v 1.121 2022/02/14 14:46:16 job Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -652,4 +652,7 @@ int mkpath(const char *);
/* Maximum allowd repositories per tal */
#define MAX_REPO_PER_TAL 1000
+/* Maximum number of delta files per RRDP notification file. */
+#define MAX_RRDP_DELTAS 300
+
#endif /* ! EXTERN_H */
diff --git a/usr.sbin/rpki-client/rrdp_notification.c b/usr.sbin/rpki-client/rrdp_notification.c
index c6cdb0bbf82..d2a3d26b030 100644
--- a/usr.sbin/rpki-client/rrdp_notification.c
+++ b/usr.sbin/rpki-client/rrdp_notification.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrdp_notification.c,v 1.13 2022/02/03 18:19:32 claudio Exp $ */
+/* $OpenBSD: rrdp_notification.c,v 1.14 2022/02/14 14:46:16 job Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -390,7 +390,7 @@ notification_done(struct notification_xml *nxml, char *last_mod)
}
/* it makes no sense to process too many deltas */
- if (nxml->serial - nxml->repository->serial > 300)
+ if (nxml->serial - nxml->repository->serial > MAX_RRDP_DELTAS)
goto snapshot;
/* check that all needed deltas are available */