bgpd: fix printed value of last-update timestamp
* bgp_route.c: (route_vty_out_detail) calculate time value
in a way, which works regardless of monotonic clock
being used or not
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 2391f74..1cfc451 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6145,7 +6145,8 @@
bgp_damp_info_vty (vty, binfo);
/* Line 7 display Uptime */
- vty_out (vty, " Last update: %s", ctime (&binfo->uptime));
+ time_t tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
+ vty_out (vty, " Last update: %s", ctime(&tbuf));
}
vty_out (vty, "%s", VTY_NEWLINE);
}