summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/timer.c b/usr.sbin/bgpd/timer.c
index 8b30fae7adf..41ccede8d54 100644
--- a/usr.sbin/bgpd/timer.c
+++ b/usr.sbin/bgpd/timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: timer.c,v 1.12 2008/06/11 05:30:35 henning Exp $ */
+/* $OpenBSD: timer.c,v 1.13 2009/01/21 20:32:53 henning Exp $ */
/*
* Copyright (c) 2003-2007 Henning Brauer <henning@openbsd.org>
@@ -65,7 +65,7 @@ timer_nextduein(struct peer *p)
struct peer_timer *pt;
if ((pt = TAILQ_FIRST(&p->timers)) != NULL && pt->val > 0)
- return (pt->val);
+ return (MAX(pt->val - getmonotime(), 0));
return (-1);
}