From 5ef4eea0c1dd3880f47f57146ce751539bd2736a Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 5 Jan 2010 08:49:58 +0000 Subject: Make sure that all important config variables are synced on a reload in the SE. This got more important since we use the reload all the time now. Found out the hard way and fix tested by Laurent CARON --- usr.sbin/bgpd/rde.c | 5 ++++- usr.sbin/bgpd/session.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'usr.sbin/bgpd') diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 4526de2410d..1ac402e010a 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.279 2009/12/31 15:34:02 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.280 2010/01/05 08:49:57 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -619,6 +619,9 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf) nconf->flags &= ~BGPD_FLAG_NO_EVALUATE; } memcpy(conf, nconf, sizeof(struct bgpd_config)); + conf->listen_addrs = NULL; + conf->csock = NULL; + conf->rcsock = NULL; free(nconf); nconf = NULL; parent_set = NULL; diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index ece3b1eb1b7..1edbebf406f 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.303 2009/12/31 15:34:02 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.304 2010/01/05 08:49:57 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -2360,10 +2360,16 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt) fatalx("reconf request not from parent"); if (nconf == NULL) fatalx("got IMSG_RECONF_DONE but no config"); + conf->flags = nconf->flags; + conf->log = nconf->log; + conf->rtableid = nconf->rtableid; + conf->bgpid = nconf->bgpid; + conf->clusterid = nconf->clusterid; conf->as = nconf->as; + conf->short_as = nconf->short_as; conf->holdtime = nconf->holdtime; - conf->bgpid = nconf->bgpid; conf->min_holdtime = nconf->min_holdtime; + conf->connectretry = nconf->connectretry; /* add new peers */ for (p = npeers; p != NULL; p = next) { -- cgit v1.2.3