summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2013-05-31 23:10:14 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2013-05-31 23:10:14 +0000
commit7b6cc6e3662097e39e14114ffd61fd2bde3ed1a6 (patch)
treef4ff55f7fe5925b913c1a84f6262c99893379360 /usr.sbin
parent9e39b81759b7bd53f2f8f12d09f11f99dea4787e (diff)
Unfuck BGP MPLS VPNs that got broken by the last few reload related commits.
OK henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/bgpd.c18
-rw-r--r--usr.sbin/bgpd/rde.c9
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;
}
}