]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix "show rpki cache-server" for ssh caches
authorMarcel Röthke <marcel.roethke@haw-hamburg.de>
Thu, 7 Feb 2019 16:12:16 +0000 (17:12 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Feb 2019 17:45:45 +0000 (18:45 +0100)
Fix #3662

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
bgpd/bgp_rpki.c

index 2e0bb1ae6223ee7bbd7e51f47e6174f60919ae07..06fd4decea5e6eadbc452a6db512f7d8fd11cb4a 100644 (file)
@@ -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;