diff options
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 18 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.c | 9 |
2 files changed, 17 insertions, 10 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 86aaabca976..9c48bb3f4e2 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.171 2013/03/07 21:26:28 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.172 2013/05/31 23:10:13 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -545,13 +545,6 @@ reconfigure(char *conffile, struct bgpd_config *conf, struct mrt_head *mrt_l, if (imsg_compose(ibuf_se, IMSG_RECONF_DONE, 0, 0, -1, NULL, 0) == -1) return (-1); - /* fix kroute information */ - ktable_postload(); - - /* redistribute list needs to be reloaded too */ - if (kr_reload() == -1) - return (-1); - /* mrt changes can be sent out of bound */ mrt_reconfigure(mrt_l); return (0); @@ -706,9 +699,16 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx) case IMSG_RECONF_DONE: if (reconfpending == 0) log_warnx("unexpected RECONF_DONE received"); - else if (reconfpending == 2) + else if (reconfpending == 2) { imsg_compose(ibuf_rde, IMSG_RECONF_DONE, 0, 0, -1, NULL, 0); + + /* finally fix kroute information */ + ktable_postload(); + + /* redistribute list needs to be reloaded too */ + kr_reload(); + } reconfpending--; break; default: diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index f005e6ac4fa..dadd2cdb1db 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.321 2012/09/18 10:10:00 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.322 2013/05/31 23:10:12 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -3438,6 +3438,13 @@ network_add(struct network_config *nc, int flagstatic) filterset_free(&nc->attrset); return; } + break; + } + if (rd == NULL) { + log_warnx("network_add: " + "prefix %s/%u in non-existing rdomain %u", + log_addr(&nc->prefix), nc->prefixlen, nc->rtableid); + return; } } |