diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 01:31:50 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 01:31:50 +0000 |
commit | 504d173a1cdbb761341aa9687af1a88a46aeb12b (patch) | |
tree | 36a022fc91909ac4cd3bf955695c26b5ff6d4cf5 /usr.sbin | |
parent | 3c9445f6671a8183e4518dd7a8594d6be2886c72 (diff) |
on reconfigure, check wether the "no fib-update" statement presence/absence
changed.
if it is absent but was present before, call kroute_fib_couple
if it is present but was absent before, call kroute_fib_decouple
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 42b50fded7c..522f2b94671 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.42 2003/12/27 00:53:51 henning Exp $ */ +/* $OpenBSD: bgpd.c,v 1.43 2003/12/27 01:31:49 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -299,12 +299,21 @@ 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(rfd); + else + kroute_fib_decouple(rfd); + } + if (imsg_compose(&ibuf_se, IMSG_RECONF_CONF, 0, conf, sizeof(struct bgpd_config)) == -1) return (-1); |