diff options
| author | Russ White <russ@riw.us> | 2022-01-24 07:51:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-24 07:51:19 -0500 |
| commit | 6ab0d40e87e80331e878f3160f388a8384f208d9 (patch) | |
| tree | 8f176ea0295b3a4580c7ea0410281b8545756488 | |
| parent | 1f2c4ddecb2b12749f98db77b68b8eb083b93679 (diff) | |
| parent | d92646a4b795f843e84e790ee7533d11d2cc31cb (diff) | |
Merge pull request #10380 from ton31337/feature/show_graceful_restart_timer_per_prefix
bgpd: Show Graceful Restart seconds remaining per prefix
| -rw-r--r-- | bgpd/bgp_route.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 23631d89cb..309699fdf4 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10696,10 +10696,26 @@ 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( path->peer->t_llgr_stale[afi][safi]); + if (json_paths) { json_object_int_add(json_path, "llgrSecondsRemaining", llgr_remaining); |
