From: claudio Date: Tue, 14 Feb 2023 15:37:45 +0000 (+0000) Subject: When initalizing a new peer, wait an extra 5 seconds before connecting X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=69592b47a60bd3407891293c86f9423f066f7666;p=openbsd 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@ --- 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 @@ -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();