summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/extern.h
diff options
context:
space:
mode:
authorJob Snijders <job@cvs.openbsd.org>2024-08-29 09:53:05 +0000
committerJob Snijders <job@cvs.openbsd.org>2024-08-29 09:53:05 +0000
commit49299e5fd31f96b06f18c36026307474eb0e14b6 (patch)
tree80ed616fe3471944fe7cd4bded3a84e29878c069 /usr.sbin/rpki-client/extern.h
parentc53b6c5af5370e8b250c76e92b30906ffe73099d (diff)
Periodically reinitialize RRDP sessions to snapshot at random intervals
It is technically possible for a series of RRDP deltas and a snapshot to diverge. An RRDP server could distribute files via Deltas and then forget about those files, causing copies to remain stuck in the caches of RRDP clients. Resetting RRDP sessions once every few weeks helps with garbage collection. In week 0 the probability of triggering re-initialization is ~0.025% and doubles every week, in week 11 its 50% and always after week 12. Thus, RPs will reinitialize at least once every 3 months. OK tb@ claudio@
Diffstat (limited to 'usr.sbin/rpki-client/extern.h')
-rw-r--r--usr.sbin/rpki-client/extern.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/rpki-client/extern.h b/usr.sbin/rpki-client/extern.h
index 298585f6520..8d5d9c2983a 100644
--- a/usr.sbin/rpki-client/extern.h
+++ b/usr.sbin/rpki-client/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.226 2024/08/21 19:35:31 job Exp $ */
+/* $OpenBSD: extern.h,v 1.227 2024/08/29 09:53:04 job Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -985,6 +985,9 @@ int mkpathat(int, const char *);
#define DEFAULT_SKIPLIST_FILE "/etc/rpki/skiplist"
+/* Interval in which random reinitialization to an RRDP snapshot happens. */
+#define RRDP_RANDOM_REINIT_MAX 12 /* weeks */
+
/* Maximum number of TAL files we'll load. */
#define TALSZ_MAX 8
#define CERTID_MAX 1000000