diff options
author | 2009-01-21 20:32:53 +0000 | |
---|---|---|
committer | 2009-01-21 20:32:53 +0000 | |
commit | 13fba73cec6be16d64c86e03a04dc4a8a26d46f6 (patch) | |
tree | ab657b632726f1830c7bfc56c347b1b2e0b603e4 /usr.sbin/bgpd/timer.c | |
parent | It turns out that Sun USB keyboards really follow the HID specification for (diff) | |
download | wireguard-openbsd-13fba73cec6be16d64c86e03a04dc4a8a26d46f6.tar.xz wireguard-openbsd-13fba73cec6be16d64c86e03a04dc4a8a26d46f6.zip |
timer_nextduein returned crap. fix it. so obvious... how could that happen.
found out the hard way by Marc Runkel <MRunkel@untangle.com>
Diffstat (limited to 'usr.sbin/bgpd/timer.c')
-rw-r--r-- | usr.sbin/bgpd/timer.c | 4 |
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); } |