summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorVladimir L Ivanov <wawa@yandex-team.ru>2010-10-21 14:59:54 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2010-10-21 14:59:54 +0400
commit213b6cd9fb24381563d6d44c7ddc4700abfae676 (patch)
tree9ea3fcf3e773144f136c47db3236ecdd5d9a5e12 /bgpd
parent08a7a91646a1ee317c402b421e3a7036a640bcf4 (diff)
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
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 2391f740..1cfc4511 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6145,7 +6145,8 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
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);
}