summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/redistribute.c2
-rw-r--r--zebra/rt_netlink.c2
-rw-r--r--zebra/zapi_msg.c2
-rw-r--r--zebra/zebra_rib.c2
-rw-r--r--zebra/zebra_vty.c4
5 files changed, 6 insertions, 6 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 0071e001c6..fe064f847a 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -614,7 +614,7 @@ int zebra_add_import_table_entry(struct route_node *rn, struct route_entry *re,
newre->mtu = re->mtu;
newre->table = 0;
newre->nexthop_num = 0;
- newre->uptime = time(NULL);
+ newre->uptime = monotime(NULL);
newre->instance = re->table;
route_entry_copy_nexthops(newre, re->ng.nexthop);
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 289ed5a15b..def5bf7d88 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -583,7 +583,7 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
re->vrf_id = vrf_id;
re->table = table;
re->nexthop_num = 0;
- re->uptime = time(NULL);
+ re->uptime = monotime(NULL);
re->tag = tag;
for (;;) {
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7f6af82018..974cc9de30 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1388,7 +1388,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
re->type = api.type;
re->instance = api.instance;
re->flags = api.flags;
- re->uptime = time(NULL);
+ re->uptime = monotime(NULL);
re->vrf_id = vrf_id;
if (api.tableid && vrf_id == VRF_DEFAULT)
re->table = api.tableid;
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 3623852afd..7232e0225e 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -3003,7 +3003,7 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
re->table = table_id;
re->vrf_id = vrf_id;
re->nexthop_num = 0;
- re->uptime = time(NULL);
+ re->uptime = monotime(NULL);
re->tag = tag;
/* Add nexthop. */
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 77795c6152..c4249b6366 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -230,7 +230,7 @@ static void vty_show_ip_route_detail(struct vty *vty, struct route_node *rn,
time_t uptime;
struct tm *tm;
- uptime = time(NULL);
+ uptime = monotime(NULL);
uptime -= re->uptime;
tm = gmtime(&uptime);
@@ -385,7 +385,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
struct tm *tm;
rib_dest_t *dest = rib_dest_from_rnode(rn);
- uptime = time(NULL);
+ uptime = monotime(NULL);
uptime -= re->uptime;
tm = gmtime(&uptime);