From 674680df699a6a0ff995457492d4c7fb05dd0a53 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 10 Jul 2018 10:25:38 -0300 Subject: [PATCH] bfdd: show the correct transmission speed When configured transmission speed doesn't match the actual speed, show the difference in the output. Signed-off-by: Rafael Zalamena --- bfdd/bfdd_vty.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 73ce067618..6bd488f677 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -396,8 +396,13 @@ static void _display_peer(struct vty *vty, struct bfd_session *bs) vty_out(vty, "\t\tLocal timers:\n"); vty_out(vty, "\t\t\tReceive interval: %" PRIu32 "ms\n", bs->timers.required_min_rx / 1000); - vty_out(vty, "\t\t\tTransmission interval: %" PRIu32 "ms\n", + vty_out(vty, "\t\t\tTransmission interval: %" PRIu32 "ms", bs->timers.desired_min_tx / 1000); + if (bs->up_min_tx != bs->timers.desired_min_tx) + vty_out(vty, " (configured %" PRIu32 "ms)\n", + bs->up_min_tx / 1000); + else + vty_out(vty, "\n"); vty_out(vty, "\t\t\tEcho transmission interval: "); if (BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_ECHO)) @@ -783,9 +788,9 @@ static void _bfdd_peer_write_config(struct hash_backet *hb, void *arg) if (bs->timers.required_min_rx != (BPC_DEF_RECEIVEINTERVAL * 1000)) vty_out(vty, " receive-interval %" PRIu32 "\n", bs->timers.required_min_rx / 1000); - if (bs->timers.desired_min_tx != (BPC_DEF_TRANSMITINTERVAL * 1000)) + if (bs->up_min_tx != (BPC_DEF_TRANSMITINTERVAL * 1000)) vty_out(vty, " transmit-interval %" PRIu32 "\n", - bs->timers.desired_min_tx / 1000); + bs->up_min_tx / 1000); if (bs->timers.required_min_echo != (BPC_DEF_ECHOINTERVAL * 1000)) vty_out(vty, " echo-interval %" PRIu32 "\n", bs->timers.required_min_echo / 1000); -- 2.39.5