mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-12-06 22:01:51 +00:00
bgpd: Show conditional advertisement timers in neighbor CLI output
```
spine1-debian-11# sh ip bgp neighbors 192.168.0.1
BGP neighbor is 192.168.0.1, remote AS 65001, local AS 65000, external link
Hostname: exit1-debian-11
BGP version 4, remote router ID 192.168.10.123, local router ID 192.168.100.1
BGP state = Established, up for 00:00:32
Last read 00:00:30, Last write 00:00:30
Hold time is 180, keepalive interval is 60 seconds
Configured conditional advertisements interval is 5 seconds
Time until conditional advertisements begin is 4 seconds
```
```
"bgpTimerConfiguredConditionalAdvertisementsSec":5,
"bgpTimerUntilConditionalAdvertisementsSec":1,
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
ef362a5156
commit
6e37924b05
@ -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) &&
|
||||
|
||||
Loading…
Reference in New Issue
Block a user