bgpd: Show LLGR timers under show bgp neighbor

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-09-07 10:14:45 +03:00
parent 47dc0f1354
commit 00b365d67f

View File

@ -12622,6 +12622,8 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(
if (json) { if (json) {
json_object_int_add(json_timer, "stalePathTimer", json_object_int_add(json_timer, "stalePathTimer",
peer->bgp->stalepath_time); peer->bgp->stalepath_time);
json_object_int_add(json_timer, "llgrStaleTime",
peer->llgr[afi][safi].stale_time);
if (peer->connection->t_gr_stale != NULL) { if (peer->connection->t_gr_stale != NULL) {
json_object_int_add(json_timer, json_object_int_add(json_timer,
@ -12672,6 +12674,9 @@ static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(
" Configured Selection Deferral Time(sec): %u\n", " Configured Selection Deferral Time(sec): %u\n",
peer->bgp->select_defer_time); peer->bgp->select_defer_time);
vty_out(vty, " LLGR Stale Path Time(sec): %u\n",
peer->llgr[afi][safi].stale_time);
if (peer->bgp->gr_info[afi][safi].t_select_deferral != if (peer->bgp->gr_info[afi][safi].t_select_deferral !=
NULL) NULL)
vty_out(vty, vty_out(vty,
@ -12703,6 +12708,8 @@ static void bgp_show_neighbor_graceful_restart_time(struct vty *vty,
json_object_int_add(json_timer, "configuredRestartTimer", json_object_int_add(json_timer, "configuredRestartTimer",
p->bgp->restart_time); p->bgp->restart_time);
json_object_int_add(json_timer, "configuredLlgrStaleTime",
p->bgp->llgr_stale_time);
json_object_int_add(json_timer, "receivedRestartTimer", json_object_int_add(json_timer, "receivedRestartTimer",
p->v_gr_restart); p->v_gr_restart);
@ -12721,6 +12728,8 @@ static void bgp_show_neighbor_graceful_restart_time(struct vty *vty,
vty_out(vty, " Received Restart Time(sec): %u\n", vty_out(vty, " Received Restart Time(sec): %u\n",
p->v_gr_restart); p->v_gr_restart);
vty_out(vty, " Configured LLGR Stale Path Time(sec): %u\n",
p->bgp->llgr_stale_time);
if (p->connection->t_gr_restart != NULL) if (p->connection->t_gr_restart != NULL)
vty_out(vty, " Restart Time Remaining(sec): %ld\n", vty_out(vty, " Restart Time Remaining(sec): %ld\n",
event_timer_remain_second( event_timer_remain_second(