summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Röthke <marcel.roethke@haw-hamburg.de>2019-08-16 12:52:47 +0200
committerMarcel Röthke <marcel.roethke@haw-hamburg.de>2019-08-16 16:39:03 +0200
commit798df969aae46409a2768cdcaacd21c4f8ad8fb2 (patch)
tree5a36070cc64650c9019a13ff4e400d20f76e3306
parent9a48b3afadfa34d90fde4f57f5b1bcfe2010b820 (diff)
bgpd: remove initial sync timeout in rpki startup code
The initial sync timeout breaks config load and is not necessary anyway. Fix #4827 Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
-rw-r--r--bgpd/bgp_rpki.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c
index 408d423aac..5414e2ef15 100644
--- a/bgpd/bgp_rpki.c
+++ b/bgpd/bgp_rpki.c
@@ -142,7 +142,6 @@ static struct rtr_mgr_config *rtr_config;
static struct list *cache_list;
static int rtr_is_running;
static int rtr_is_stopping;
-static int rtr_is_starting;
static _Atomic int rtr_update_overflow;
static int rpki_debug;
static unsigned int polling_period;
@@ -478,7 +477,7 @@ static void rpki_update_cb_sync_rtr(struct pfx_table *p __attribute__((unused)),
const struct pfx_record rec,
const bool added __attribute__((unused)))
{
- if (rtr_is_stopping || rtr_is_starting
+ if (rtr_is_stopping
|| atomic_load_explicit(&rtr_update_overflow, memory_order_seq_cst))
return;
@@ -570,11 +569,9 @@ static int bgp_rpki_module_init(void)
static int start(void)
{
- unsigned int waiting_time = 0;
int ret;
rtr_is_stopping = 0;
- rtr_is_starting = 1;
rtr_update_overflow = 0;
if (list_isempty(cache_list)) {
@@ -603,23 +600,6 @@ static int start(void)
return ERROR;
}
rtr_is_running = 1;
- RPKI_DEBUG("Waiting for rtr connection to synchronize.");
- while (waiting_time++ <= initial_synchronisation_timeout) {
- if (rtr_mgr_conf_in_sync(rtr_config))
- break;
-
- sleep(1);
- }
- if (rtr_mgr_conf_in_sync(rtr_config)) {
- RPKI_DEBUG("Got synchronisation with at least one RPKI cache!");
- RPKI_DEBUG("Forcing revalidation.");
- rtr_is_starting = 0;
- revalidate_all_routes();
- } else {
- RPKI_DEBUG(
- "Timeout expired! Proceeding without RPKI validation data.");
- rtr_is_starting = 0;
- }
XFREE(MTYPE_BGP_RPKI_CACHE_GROUP, groups);