mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-17 20:20:12 +00:00
bgpd: Show Graceful Restart seconds remaining per prefix
``` exit1-debian-11# sh ip bgp 10.10.10.10/32 BGP routing table entry for 10.10.10.10/32, version 14 Paths: (1 available, best #1, table default) Not advertised to any peer 65000, (stale) 192.168.0.2 from 192.168.0.2 (0.0.0.0) Origin incomplete, metric 0, valid, external, best (First path received) Last update: Wed Jan 19 17:13:51 2022 Time until Graceful Restart stale route deleted: 117 ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
b542c4a3c7
commit
848e8cf6c6
@ -10725,6 +10725,21 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
|
||||
str, label2vni(&attr->label));
|
||||
}
|
||||
|
||||
if (path->peer->t_gr_restart &&
|
||||
CHECK_FLAG(path->flags, BGP_PATH_STALE)) {
|
||||
unsigned long gr_remaining =
|
||||
thread_timer_remain_second(path->peer->t_gr_restart);
|
||||
|
||||
if (json_paths) {
|
||||
json_object_int_add(json_path,
|
||||
"gracefulRestartSecondsRemaining",
|
||||
gr_remaining);
|
||||
} else
|
||||
vty_out(vty,
|
||||
" Time until Graceful Restart stale route deleted: %lu\n",
|
||||
gr_remaining);
|
||||
}
|
||||
|
||||
if (path->peer->t_llgr_stale[afi][safi] && attr->community &&
|
||||
community_include(attr->community, COMMUNITY_LLGR_STALE)) {
|
||||
unsigned long llgr_remaining = thread_timer_remain_second(
|
||||
|
Loading…
Reference in New Issue
Block a user