diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index f0b2ffdee522..375b041853c1 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -264,7 +264,8 @@ static void rpki_delete_all_cache_nodes(void) struct cache *cache; for (ALL_LIST_ELEMENTS(cache_list, cache_node, cache_next, cache)) { - rtr_mgr_remove_group(rtr_config, cache->preference); + if (is_running()) + rtr_mgr_remove_group(rtr_config, cache->preference); listnode_delete(cache_list, cache); } }