From: Donatas Abraitis Date: Mon, 20 Jun 2022 19:41:20 +0000 (+0300) Subject: bgpd: Generate RPKI CLI config even if no cache servers configured X-Git-Tag: base_8.4~326^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=11423e50297c731166d3ae02f7f0c326eea36492;p=matthieu%2Ffrr.git bgpd: Generate RPKI CLI config even if no cache servers configured If we have more CLI options configured and the last cache server is removed, then the whole RPKI section is dropped. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index 913bf510c9..0b3bef2d7d 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -1001,9 +1001,6 @@ static int config_write(struct vty *vty) struct listnode *cache_node; struct cache *cache; - if (!listcount(cache_list)) - return 0; - if (rpki_debug) vty_out(vty, "debug rpki\n"); @@ -1256,7 +1253,8 @@ DEFPY (no_rpki_cache, struct cache *cache_p = find_cache(preference); if (!cache_p) { - vty_out(vty, "Could not find cache %ld\n", preference); + vty_out(vty, "Could not find cache with preference %ld\n", + preference); return CMD_WARNING; } @@ -1264,9 +1262,9 @@ DEFPY (no_rpki_cache, stop(); } else if (is_running()) { if (rtr_mgr_remove_group(rtr_config, preference) == RTR_ERROR) { - vty_out(vty, "Could not remove cache %ld", preference); - - vty_out(vty, "\n"); + vty_out(vty, + "Could not remove cache with preference %ld\n", + preference); return CMD_WARNING; } }