summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/rde.c
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2006-01-05 15:10:58 +0000
committerEsben Norby <norby@cvs.openbsd.org>2006-01-05 15:10:58 +0000
commit291d0d6bfca94e0d57c1d7f5d787851e515ae079 (patch)
tree4174cd0505157fda7ad6d2cd0f468fb9e3ce2186 /usr.sbin/ospfd/rde.c
parent12d46410b24594e86a66a75c67a567031633a8ee (diff)
Improve how ospfd copes with time changes.
ok claudio@
Diffstat (limited to 'usr.sbin/ospfd/rde.c')
-rw-r--r--usr.sbin/ospfd/rde.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c
index 63ad1e9a7ff..b3cfe3d1204 100644
--- a/usr.sbin/ospfd/rde.c
+++ b/usr.sbin/ospfd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.35 2005/12/29 13:58:49 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.36 2006/01/05 15:10:57 norby Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -219,6 +219,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
struct ls_req_hdr req_hdr;
struct lsa_hdr lsa_hdr, *db_hdr;
struct rde_nbr rn, *nbr;
+ struct timespec tp;
struct lsa *lsa;
struct area *area;
struct vertex *v;
@@ -243,7 +244,8 @@ rde_dispatch_imsg(int fd, short event, void *bula)
fatalx("unknown event");
}
- now = time(NULL);
+ clock_gettime(CLOCK_MONOTONIC, &tp);
+ now = tp.tv_sec;
for (;;) {
if ((n = imsg_get(ibuf, &imsg)) == -1)