From a49ec66fd844f246515acacd490e5b688274b02e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcel=20R=C3=B6thke?= Date: Thu, 7 Feb 2019 17:12:16 +0100 Subject: [PATCH] bgpd: fix "show rpki cache-server" for ssh caches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix #3662 Signed-off-by: Marcel Röthke --- bgpd/bgp_rpki.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index 2e0bb1ae62..06fd4decea 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -1189,9 +1189,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; -- 2.39.5