bgpd: ensure rpki cache preference values are unique even if rtr mgr is not yet started

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
This commit is contained in:
Marcel Röthke 2019-08-22 15:48:05 +02:00
parent ad4c7e8d4e
commit a2ed7b2b18

View File

@ -1083,6 +1083,18 @@ DEFPY (rpki_cache,
"Preference value\n")
{
int return_value;
struct listnode *cache_node;
struct cache *current_cache;
for (ALL_LIST_ELEMENTS_RO(cache_list, cache_node, current_cache)) {
if (current_cache->preference == preference) {
vty_out(vty,
"Cache with preference %ld is already configured\n",
preference);
return CMD_WARNING;
}
}
// use ssh connection
if (ssh_uname) {