summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-10-19 10:26:22 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-10-19 10:26:22 +0000
commitb79f89b4549b69f0f486aca1b268f78d40e64ad0 (patch)
tree8365c3166c9fa78dcf59316e64b04e7e22f2b7cf /usr.sbin/bgpd
parent15306485712dd4be9fab34eee12c273539f916bd (diff)
on "bgpctl neighbor foo clear", we used to send a STOP event immediately
followed by a START event. Instead of sending START immediately, start the IdleHoldTimer with a very low value (5 seconds) so that we restart the session these seconds later. some other implementations deal poorly with our previously superfast reconnects, namely, that commercial one from san jose, claudio ok
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/control.c5
-rw-r--r--usr.sbin/bgpd/session.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c
index c277867224d..aa39dc8d5de 100644
--- a/usr.sbin/bgpd/control.c
+++ b/usr.sbin/bgpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.43 2005/03/11 15:48:58 deraadt Exp $ */
+/* $OpenBSD: control.c,v 1.44 2005/10/19 10:26:21 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -266,7 +266,8 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt)
break;
case IMSG_CTL_NEIGHBOR_CLEAR:
bgp_fsm(p, EVNT_STOP);
- bgp_fsm(p, EVNT_START);
+ p->IdleHoldTimer = time(NULL) +
+ SESSION_CLEAR_DELAY;
break;
default:
fatal("king bula wants more humppa");
diff --git a/usr.sbin/bgpd/session.h b/usr.sbin/bgpd/session.h
index 7f613364c72..8b3b1aff8cf 100644
--- a/usr.sbin/bgpd/session.h
+++ b/usr.sbin/bgpd/session.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.h,v 1.78 2005/09/19 16:15:54 henning Exp $ */
+/* $OpenBSD: session.h,v 1.79 2005/10/19 10:26:21 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -35,6 +35,7 @@
#define MSGSIZE_KEEPALIVE MSGSIZE_HEADER
#define MSGSIZE_RREFRESH MSGSIZE_HEADER + 4
#define MSG_PROCESS_LIMIT 25
+#define SESSION_CLEAR_DELAY 5
enum session_state {
STATE_NONE,