diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-05 08:49:58 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-05 08:49:58 +0000 |
commit | 5ef4eea0c1dd3880f47f57146ce751539bd2736a (patch) | |
tree | 013b73939c7e264e7d0f2ae8fe975a830036a248 /usr.sbin/bgpd | |
parent | 477076752b7770cea6c16096132b1fb23d952479 (diff) |
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
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 5 | ||||
-rw-r--r-- | usr.sbin/bgpd/session.c | 10 |
2 files changed, 12 insertions, 3 deletions
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 <henning@openbsd.org> @@ -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 <henning@openbsd.org> @@ -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) { |