summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stapp <mjs.ietf@gmail.com>2022-04-12 11:54:16 -0400
committerGitHub <noreply@github.com>2022-04-12 11:54:16 -0400
commit946fb036a3c3896fec76e823dd0ac44bdc279fac (patch)
treedcb1d8a2bbf4059bb250f28c7932b95b523178cc
parent8e53f35b5f6d952fa992c7b0e24a9899598799b9 (diff)
parent6e37924b05f3e81d368a4de6b2900c343119c48c (diff)
Merge pull request #11000 from opensourcerouting/feature/show_conditional_adv_timer_in_neighbor_cli
bgpd: Show conditional advertisement timers in neighbor CLI output
-rw-r--r--bgpd/bgp_vty.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 941696ab74..7c1c062d5e 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -12559,6 +12559,18 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
else
json_object_boolean_false_add(
json_neigh, "extendedOptionalParametersLength");
+
+ /* Conditional advertisements */
+ json_object_int_add(
+ json_neigh,
+ "bgpTimerConfiguredConditionalAdvertisementsSec",
+ bgp->condition_check_period);
+ if (thread_is_scheduled(bgp->t_condition_check))
+ json_object_int_add(
+ json_neigh,
+ "bgpTimerUntilConditionalAdvertisementsSec",
+ thread_timer_remain_second(
+ bgp->t_condition_check));
} else {
/* Administrative shutdown. */
if (CHECK_FLAG(p->flags, PEER_FLAG_SHUTDOWN)
@@ -12636,6 +12648,16 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,
if (BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(p))
vty_out(vty,
" Extended Optional Parameters Length is enabled\n");
+
+ /* Conditional advertisements */
+ vty_out(vty,
+ " Configured conditional advertisements interval is %d seconds\n",
+ bgp->condition_check_period);
+ if (thread_is_scheduled(bgp->t_condition_check))
+ vty_out(vty,
+ " Time until conditional advertisements begin is %lu seconds\n",
+ thread_timer_remain_second(
+ bgp->t_condition_check));
}
/* Capability. */
if (peer_established(p) &&