net/quagga: include another upstream patch
[openwrt/svn-archive/archive.git] / net / quagga / patches / 000-upstream-clock_fix.patch
1 From 213b6cd9fb24381563d6d44c7ddc4700abfae676 Mon Sep 17 00:00:00 2001
2 From: Vladimir L Ivanov <wawa@yandex-team.ru>
3 Date: Thu, 21 Oct 2010 14:59:54 +0400
4 Subject: [PATCH] bgpd: fix printed value of last-update timestamp
5
6 * bgp_route.c: (route_vty_out_detail) calculate time value
7 in a way, which works regardless of monotonic clock
8 being used or not
9 ---
10 bgpd/bgp_route.c | 3 ++-
11 1 files changed, 2 insertions(+), 1 deletions(-)
12
13 diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
14 index 2391f74..1cfc451 100644
15 --- a/bgpd/bgp_route.c
16 +++ b/bgpd/bgp_route.c
17 @@ -6145,7 +6145,8 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
18 bgp_damp_info_vty (vty, binfo);
19
20 /* Line 7 display Uptime */
21 - vty_out (vty, " Last update: %s", ctime (&binfo->uptime));
22 + time_t tbuf = time(NULL) - (bgp_clock() - binfo->uptime);
23 + vty_out (vty, " Last update: %s", ctime(&tbuf));
24 }
25 vty_out (vty, "%s", VTY_NEWLINE);
26 }
27 --
28 1.7.2.3
29