summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-01-13 15:30:16 +0100
committerGitHub <noreply@github.com>2022-01-13 15:30:16 +0100
commitacd26def043573ff10f662ada0b7809f4c2b49e6 (patch)
tree48e4aa65b2fc0eb9e72fc79f23735b97845a2a3b
parentMerge pull request #10314 from ckishimo/ospf6d_extstub (diff)
parentbgpd: Show Long-lived Graceful Restart timer remaining per prefix (diff)
downloadfrr-acd26def043573ff10f662ada0b7809f4c2b49e6.tar.xz
frr-acd26def043573ff10f662ada0b7809f4c2b49e6.zip
Merge pull request #10336 from ton31337/feature/show_gr_llgr_timers_per_neighbor
bgpd: Show Long-lived Graceful Restart seconds remaining per prefix
-rw-r--r--bgpd/bgp_route.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index e821c83ab..689e7a7fa 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -10725,6 +10725,19 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
str, label2vni(&attr->label));
}
+ 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);
+ } else
+ vty_out(vty,
+ " Time until Long-lived stale route deleted: %lu\n",
+ llgr_remaining);
+ }
+
/* Output some debug about internal state of the dest flags */
if (json_paths) {
if (CHECK_FLAG(bn->flags, BGP_NODE_PROCESS_SCHEDULED))
@@ -10741,12 +10754,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
json_object_boolean_true_add(json_path, "fibInstalled");
if (CHECK_FLAG(bn->flags, BGP_NODE_FIB_INSTALL_PENDING))
json_object_boolean_true_add(json_path, "fibPending");
- }
- /* We've constructed the json object for this path, add it to the json
- * array of paths
- */
- if (json_paths) {
if (json_nexthop_global || json_nexthop_ll) {
json_nexthops = json_object_new_array();