From: Marcel Röthke Date: Thu, 7 Feb 2019 16:12:16 +0000 (+0100) Subject: bgpd: fix "show rpki cache-server" for ssh caches X-Git-Tag: 7.1_pulled~268^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=745ae9c08822de29c609c49c3179ac5628b3ffc7;p=matthieu%2Ffrr.git bgpd: fix "show rpki cache-server" for ssh caches Fix #3662 Signed-off-by: Marcel Röthke --- diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index b614e87d23..b2e7f04ece 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -1190,9 +1190,23 @@ DEFUN (show_rpki_cache_server, struct cache *cache; for (ALL_LIST_ELEMENTS_RO(cache_list, cache_node, cache)) { - vty_out(vty, "host: %s port: %s\n", - cache->tr_config.tcp_config->host, - cache->tr_config.tcp_config->port); + if (cache->type == TCP) { + vty_out(vty, "host: %s port: %s\n", + cache->tr_config.tcp_config->host, + cache->tr_config.tcp_config->port); + + } else if (cache->type == SSH) { + vty_out(vty, + "host: %s port: %d username: %s " + "server_hostkey_path: %s client_privkey_path: %s\n", + cache->tr_config.ssh_config->host, + cache->tr_config.ssh_config->port, + cache->tr_config.ssh_config->username, + cache->tr_config.ssh_config + ->server_hostkey_path, + cache->tr_config.ssh_config + ->client_privkey_path); + } } return CMD_SUCCESS;