-/* $OpenBSD: rde.c,v 1.570 2022/08/30 18:50:21 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.571 2022/08/31 11:25:36 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
switch (imsg.hdr.type) {
case IMSG_RECONF_ROA_SET:
/* start of update */
+ trie_free(&roa_new.th); /* clear new roa */
break;
case IMSG_RECONF_ROA_ITEM:
if (imsg.hdr.len - IMSG_HEADER_SIZE !=
}
}
+static int roa_update_pending;
+
static void
rde_roa_softreload_done(void *arg, uint8_t aid)
{
/* the roa update is done */
log_info("ROA softreload done");
+ roa_update_pending = 0;
}
static void
{
struct rde_prefixset roa_old;
+ if (roa_update_pending) {
+ log_info("ROA softreload skipped, old still running");
+ return;
+ }
+
roa_old = rde_roa;
rde_roa = roa_new;
memset(&roa_new, 0, sizeof(roa_new));
trie_free(&roa_old.th); /* old roa no longer needed */
log_debug("ROA change: reloading Adj-RIB-In");
+ roa_update_pending = 1;
if (rib_dump_new(RIB_ADJ_IN, AID_UNSPEC, RDE_RUNNER_ROUNDS,
rib_byid(RIB_ADJ_IN), rde_roa_softreload,
rde_roa_softreload_done, NULL) == -1)
-/* $OpenBSD: rde_trie.c,v 1.15 2022/05/23 13:40:12 deraadt Exp $ */
+/* $OpenBSD: rde_trie.c,v 1.16 2022/08/31 11:25:36 claudio Exp $ */
/*
* Copyright (c) 2018 Claudio Jeker <claudio@openbsd.org>
{
trie_free_v4(th->root_v4);
trie_free_v6(th->root_v6);
+ memset(th, 0, sizeof(*th));
}
static int
-/* $OpenBSD: rtr.c,v 1.6 2022/08/17 15:15:26 claudio Exp $ */
+/* $OpenBSD: rtr.c,v 1.7 2022/08/31 11:25:36 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
}
}
if (recalc != 0)
- log_warnx("%u roa-set entries expired", recalc);
+ log_info("%u roa-set entries expired", recalc);
return recalc;
}