diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-05-08 07:45:22 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-05-08 07:45:22 +0000 |
commit | 5b3fa2bf37c5b8758cb2648615013ac7542bd862 (patch) | |
tree | dd95205de352cf291fb3d376f4040186998fa0d1 /usr.sbin | |
parent | 4f3dc0e49eac2418817b621b230b9de5bb1908b0 (diff) |
we can stopin timer_set if new timeout equals the oldone.
matters for stuff like the HoldTimer that gets reset often
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/timer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/timer.c b/usr.sbin/bgpd/timer.c index ad07f5da073..4100ce6922f 100644 --- a/usr.sbin/bgpd/timer.c +++ b/usr.sbin/bgpd/timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: timer.c,v 1.7 2008/05/08 07:43:03 henning Exp $ */ +/* $OpenBSD: timer.c,v 1.8 2008/05/08 07:45:21 henning Exp $ */ /* * Copyright (c) 2003-2007 Henning Brauer <henning@openbsd.org> @@ -94,6 +94,8 @@ timer_set(struct peer *p, enum Timer timer, u_int offset) fatal("timer_set"); pt->type = timer; } else { + if (pt->val == time(NULL) + offset) + return; TAILQ_REMOVE(&p->timers, pt, entry); } |