From 9f4fa17629d056ee201173a68cc8b97eee3d14fa Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 4 Nov 2022 14:46:14 +0200 Subject: [PATCH] bgpd: Always show estimated RTT to the peer It's very annoying when flapping between 0 (missing the output) and non-zero. Signed-off-by: Donatas Abraitis --- bgpd/bgp_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1f66080e93..dcbd157e75 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -14565,7 +14565,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, if (use_json) { json_object_int_add(json_neigh, "connectRetryTimer", p->v_connect); - if (peer_established(p) && p->rtt) + if (peer_established(p)) json_object_int_add(json_neigh, "estimatedRttInMsecs", p->rtt); if (p->t_start) @@ -14602,7 +14602,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json, } else { vty_out(vty, "BGP Connect Retry Timer in Seconds: %d\n", p->v_connect); - if (peer_established(p) && p->rtt) + if (peer_established(p)) vty_out(vty, "Estimated round trip time: %d ms\n", p->rtt); if (p->t_start) -- 2.39.5