diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-11 01:44:42 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-11 01:44:42 -0400 |
| commit | 98572489ea2600cf11830a2af775dd98f572f936 (patch) | |
| tree | 322bdea0219501224a08283cb13a80e9592f9fb2 /zebra/zebra_rib.c | |
| parent | 764252d0ab48563eb171e09ce9d53e249e6e8a27 (diff) | |
zebra: Switch to using monotime(NULL) for re->uptime
The re->uptime usage of time(NULL) leaves it open to
timing changes from outside influence. Switching
to monotime allows us to ensure that we have a timestamp
that is always increasing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |
