summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-12-23 16:42:46 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-12-23 16:42:46 +0000
commit5e36521c02b478f723713a6d49bc6395e5e856a3 (patch)
tree7b8171acd253a0e33e10459c2baf79374600cb87 /usr.sbin/bgpd
parent6f1441ea379721191626c9169af2ee22fe537bc1 (diff)
use timer_running (with left = NULL, which the last commit made possible)
instead of timer_get and checking manually
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index c80a1b0f4a5..f2d10f2046c 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.277 2007/12/20 17:08:48 henning Exp $ */
+/* $OpenBSD: session.c,v 1.278 2007/12/23 16:42:45 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -992,8 +992,7 @@ session_accept(int listenfd)
p = getpeerbyip((struct sockaddr *)&cliaddr);
if (p != NULL && p->state == STATE_IDLE && p->errcnt < 2) {
- time_t *t = timer_get(p, Timer_IdleHold);
- if (*t > 0) {
+ if (timer_running(p, Timer_IdleHold, NULL)) {
/* fast reconnect after clear */
p->passive = 1;
bgp_fsm(p, EVNT_START);