mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 13:17:49 +00:00
bgpd: Show which RPKI server we are connected to
Before we just showed always the first server which is wrong. Now we have: ``` spine1-debian-11# show rpki cache-connection Connected to group 1 rpki tcp cache 192.168.10.17 8283 pref 1 rpki tcp cache 192.168.10.17 8282 pref 2 (connected) ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
8f14ae47c1
commit
c1a68b6245
@ -1332,34 +1332,35 @@ DEFUN (show_rpki_cache_connection,
|
|||||||
}
|
}
|
||||||
vty_out(vty, "Connected to group %d\n", group->preference);
|
vty_out(vty, "Connected to group %d\n", group->preference);
|
||||||
for (ALL_LIST_ELEMENTS_RO(cache_list, cache_node, cache)) {
|
for (ALL_LIST_ELEMENTS_RO(cache_list, cache_node, cache)) {
|
||||||
if (cache->preference == group->preference) {
|
|
||||||
struct tr_tcp_config *tcp_config;
|
struct tr_tcp_config *tcp_config;
|
||||||
#if defined(FOUND_SSH)
|
#if defined(FOUND_SSH)
|
||||||
struct tr_ssh_config *ssh_config;
|
struct tr_ssh_config *ssh_config;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (cache->type) {
|
switch (cache->type) {
|
||||||
case TCP:
|
case TCP:
|
||||||
tcp_config = cache->tr_config.tcp_config;
|
tcp_config = cache->tr_config.tcp_config;
|
||||||
vty_out(vty, "rpki tcp cache %s %s pref %hhu\n",
|
vty_out(vty, "rpki tcp cache %s %s pref %hhu%s\n",
|
||||||
tcp_config->host, tcp_config->port,
|
tcp_config->host, tcp_config->port,
|
||||||
cache->preference);
|
cache->preference,
|
||||||
|
cache->rtr_socket->state == RTR_ESTABLISHED
|
||||||
|
? " (connected)"
|
||||||
|
: "");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(FOUND_SSH)
|
#if defined(FOUND_SSH)
|
||||||
case SSH:
|
case SSH:
|
||||||
ssh_config = cache->tr_config.ssh_config;
|
ssh_config = cache->tr_config.ssh_config;
|
||||||
vty_out(vty, "rpki ssh cache %s %u pref %hhu\n",
|
vty_out(vty, "rpki ssh cache %s %u pref %hhu%s\n",
|
||||||
ssh_config->host, ssh_config->port,
|
ssh_config->host, ssh_config->port,
|
||||||
cache->preference);
|
cache->preference,
|
||||||
|
cache->rtr_socket->state == RTR_ESTABLISHED
|
||||||
|
? " (connected)"
|
||||||
|
: "");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user