summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-02-14 15:37:46 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-02-14 15:37:46 +0000
commitfa9316b1db7b0826b2e1bd55b18b9c9531350ba8 (patch)
treec686004aeceabe4361a9439a0557fe0a9e4be571 /usr.sbin
parent3e75f8e42163513d4984736f09e437756bb2cd83 (diff)
When initalizing a new peer, wait an extra 5 seconds before connecting
eo the remote end. With this the RDE has a chance to finish config reload before the session to a new peer is established. OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/session.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 9c91aff8c43..1ef5c6422cc 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.440 2023/02/09 13:43:23 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.441 2023/02/14 15:37:45 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -259,14 +259,6 @@ session_main(int debug, int verbose)
if (p->state == STATE_NONE)
init_peer(p);
- /* reinit due? */
- if (p->reconf_action == RECONF_REINIT) {
- session_stop(p, ERR_CEASE_ADMIN_RESET);
- if (!p->conf.down)
- timer_set(&p->timers,
- Timer_IdleHold, 0);
- }
-
/* deletion due? */
if (p->reconf_action == RECONF_DELETE) {
if (p->demoted)
@@ -580,7 +572,7 @@ init_peer(struct peer *p)
if (p->conf.down)
timer_stop(&p->timers, Timer_IdleHold); /* no autostart */
else
- timer_set(&p->timers, Timer_IdleHold, 0); /* start ASAP */
+ timer_set(&p->timers, Timer_IdleHold, SESSION_CLEAR_DELAY);
p->stats.last_updown = getmonotime();