summaryrefslogtreecommitdiff
path: root/proto/rpki/rpki.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-05-21 16:03:08 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2022-05-21 16:03:08 +0200
commit7bb06b34a110bbf40e7308eb19f32202a66d58ba (patch)
tree5610bd1bbca2cb646c49de67acdf85dc005d558d /proto/rpki/rpki.c
parent9a9439d5e1d3b1372dadb25207d67d83a2e1e98c (diff)
RPKI: Display cache server port on show protocol
Thanks to Luiz Amaral for the idea.
Diffstat (limited to 'proto/rpki/rpki.c')
-rw-r--r--proto/rpki/rpki.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index ab0837f3..4ccb38e3 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -828,16 +828,27 @@ rpki_show_proto_info(struct proto *P)
if (cache)
{
const char *transport_name = "---";
+ uint default_port = 0;
switch (cf->tr_config.type)
{
#if HAVE_LIBSSH
- case RPKI_TR_SSH: transport_name = "SSHv2"; break;
+ case RPKI_TR_SSH:
+ transport_name = "SSHv2";
+ default_port = RPKI_SSH_PORT;
+ break;
#endif
- case RPKI_TR_TCP: transport_name = "Unprotected over TCP"; break;
+ case RPKI_TR_TCP:
+ transport_name = "Unprotected over TCP";
+ default_port = RPKI_TCP_PORT;
+ break;
};
cli_msg(-1006, " Cache server: %s", cf->hostname);
+
+ if (cf->port != default_port)
+ cli_msg(-1006, " Cache port: %u", cf->port);
+
cli_msg(-1006, " Status: %s", rpki_cache_state_to_str(cache->state));
cli_msg(-1006, " Transport: %s", transport_name);
cli_msg(-1006, " Protocol version: %u", cache->version);