From: claudio Date: Thu, 11 Jan 2024 13:09:41 +0000 (+0000) Subject: Display the exported rtr session state and fix a missing indent. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8167eafe74f7686db6fecefb3d814fd82247ba19;p=openbsd Display the exported rtr session state and fix a missing indent. OK tb@ --- diff --git a/usr.sbin/bgpctl/output.c b/usr.sbin/bgpctl/output.c index f68b73d60a6..b17813f0696 100644 --- a/usr.sbin/bgpctl/output.c +++ b/usr.sbin/bgpctl/output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output.c,v 1.44 2024/01/10 14:59:41 claudio Exp $ */ +/* $OpenBSD: output.c,v 1.45 2024/01/11 13:09:41 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer @@ -1171,12 +1171,13 @@ show_rtr(struct ctl_show_rtr *rtr) printf("RTR neighbor is %s, port %u\n", log_addr(&rtr->remote_addr), rtr->remote_port); + printf(" State: %s\n", rtr->state); if (rtr->descr[0]) printf(" Description: %s\n", rtr->descr); if (rtr->local_addr.aid != AID_UNSPEC) printf(" Local Address: %s\n", log_addr(&rtr->local_addr)); if (rtr->session_id != -1) - printf("Version: %u Session ID: %d Serial #: %u\n", + printf(" Version: %u Session ID: %d Serial #: %u\n", rtr->version, rtr->session_id, rtr->serial); printf(" Refresh: %u, Retry: %u, Expire: %u\n", rtr->refresh, rtr->retry, rtr->expire); diff --git a/usr.sbin/bgpctl/output_json.c b/usr.sbin/bgpctl/output_json.c index eb049b09e5b..25c3950f9da 100644 --- a/usr.sbin/bgpctl/output_json.c +++ b/usr.sbin/bgpctl/output_json.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output_json.c,v 1.37 2023/12/19 10:32:20 claudio Exp $ */ +/* $OpenBSD: output_json.c,v 1.38 2024/01/11 13:09:41 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -1007,6 +1007,7 @@ json_rtr(struct ctl_show_rtr *rtr) json_do_uint("remote_port", rtr->remote_port); if (rtr->local_addr.aid != AID_UNSPEC) json_do_string("local_addr", log_addr(&rtr->local_addr)); + json_do_string("state", rtr->state); if (rtr->session_id != -1) { json_do_uint("version", rtr->version);