From 15306485712dd4be9fab34eee12c273539f916bd Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 19 Oct 2005 09:36:52 +0000 Subject: only allow connects in IDLE when the ConnectRetryTimer is running, aka we intend to reconnect. fallout from fast reconnect. misbehaviour noticed by claudio --- usr.sbin/bgpd/session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd/session.c') 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 @@ -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); -- cgit v1.2.3