summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-07 01:15:55 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-07 01:15:55 +0000
commitd38975507c415470385ee1c501572ef0ca33800f (patch)
tree1108f6958d4e62ac14ebda482d27f2a77a247b11 /usr.sbin/bgpd/session.c
parent64688a737bdbc72fd19c48004f378b13fb5e9815 (diff)
don't try to be smart after config reloads and try to detect wether
a session needs a reinit for the new conf to kick in. the logic is condemned to fail, and implicitly taking sessions down is BAD. after discussion with mickey@, ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 16521ae93f4..104cf5cc510 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.72 2004/01/06 23:14:58 henning Exp $ */
+/* $OpenBSD: session.c,v 1.73 2004/01/07 01:15:54 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1365,35 +1365,8 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx)
} else
reconf = RECONF_KEEP;
- if (bcmp(&p->conf.remote_addr, &pconf->remote_addr,
- sizeof(struct sockaddr_in)))
- reconf = RECONF_REINIT;
- if (bcmp(&p->conf.local_addr, &pconf->local_addr,
- sizeof(struct sockaddr_in)))
- reconf = RECONF_REINIT;
- if (p->conf.remote_as != pconf->remote_as)
- reconf = RECONF_REINIT;
- if (p->conf.distance != pconf->distance)
- reconf = RECONF_REINIT;
-
- if (p->state <= STATE_ACTIVE &&
- p->conf.passive && !pconf->passive)
- reconf = RECONF_REINIT;
-
memcpy(&p->conf, pconf, sizeof(struct peer_config));
p->conf.reconf_action = reconf;
- if (pconf->reconf_action > reconf)
- p->conf.reconf_action = pconf->reconf_action;
-
- if (p->state >= STATE_OPENSENT) {
- if (p->holdtime == conf->holdtime &&
- nconf->holdtime > conf->holdtime)
- p->conf.reconf_action = RECONF_REINIT;
- if (p->holdtime > nconf->holdtime)
- p->conf.reconf_action = RECONF_REINIT;
- if (p->holdtime < nconf->min_holdtime)
- p->conf.reconf_action = RECONF_REINIT;
- }
break;
case IMSG_RECONF_DONE:
if (idx != PFD_PIPE_MAIN)