summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-10-19 09:36:52 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-10-19 09:36:52 +0000
commit15306485712dd4be9fab34eee12c273539f916bd (patch)
tree00c209aaba81b7e1b90526a1f08311e423f7cfef /usr.sbin/bgpd/session.c
parent238bb9cede4c43697d23cbd594fcf8722c25309f (diff)
only allow connects in IDLE when the ConnectRetryTimer is running, aka
we intend to reconnect. fallout from fast reconnect. misbehaviour noticed by claudio
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 8dce21ff482..6922ff3573f 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.235 2005/09/20 13:31:53 henning Exp $ */
+/* $OpenBSD: session.c,v 1.236 2005/10/19 09:36:51 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -914,7 +914,8 @@ session_accept(int listenfd)
p = getpeerbyip((struct sockaddr *)&cliaddr);
- if (p != NULL && p->state == STATE_IDLE && p->errcnt < 2) {
+ if (p != NULL && p->state == STATE_IDLE && p->errcnt < 2 &&
+ p->ConnectRetryTimer > 0) {
/* fast reconnect after clear */
p->passive = 1;
bgp_fsm(p, EVNT_START);