diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 14:58:23 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 14:58:23 +0000 |
commit | 7baeadb7e2460532f6a9c3e37d3848324456b4b9 (patch) | |
tree | d1100394201767a6c18d00d76582a45c8fcfcc39 /usr.sbin | |
parent | 4fcccdabcc6808606cce79b0b76ca7e8ab53feb1 (diff) |
move the fib couple/decouple to the config merge where it belongs
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 10 | ||||
-rw-r--r-- | usr.sbin/bgpd/config.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index ad726d6b280..95e3c0ba3f0 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.44 2003/12/27 14:24:42 henning Exp $ */ +/* $OpenBSD: bgpd.c,v 1.45 2003/12/27 14:58:22 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -299,20 +299,12 @@ int reconfigure(char *conffile, struct bgpd_config *conf, struct mrt_config *mrtc) { struct peer *p; - int fib_synced; - fib_synced = ! (conf->flags & BGPD_FLAG_NO_FIB_UPDATE); if (parse_config(conffile, conf, mrtc)) { logit(LOG_CRIT, "config file %s has errors, not reloading", conffile); return (-1); } - if (fib_synced != !(conf->flags & BGPD_FLAG_NO_FIB_UPDATE)) { - if (!(conf->flags & BGPD_FLAG_NO_FIB_UPDATE)) - kroute_fib_couple(); - else - kroute_fib_decouple(); - } if (imsg_compose(&ibuf_se, IMSG_RECONF_CONF, 0, conf, sizeof(struct bgpd_config)) == -1) diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c index 6f229d13b87..a90437edd98 100644 --- a/usr.sbin/bgpd/config.c +++ b/usr.sbin/bgpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.9 2003/12/26 20:52:14 jakob Exp $ */ +/* $OpenBSD: config.c,v 1.10 2003/12/27 14:58:22 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -70,6 +70,14 @@ merge_config(struct bgpd_config *xconf, struct bgpd_config *conf) memcpy(&xconf->listen_addr, &conf->listen_addr, sizeof(xconf->listen_addr)); + if ((xconf->flags & BGPD_FLAG_NO_FIB_UPDATE) != + (conf->flags & BGPD_FLAG_NO_FIB_UPDATE)) { + if (!(conf->flags & BGPD_FLAG_NO_FIB_UPDATE)) + kroute_fib_couple(); + else + kroute_fib_decouple(); + } + xconf->flags = conf->flags; xconf->log = conf->log; |