untrusted comment: verify with openbsd-65-base.pub
RWSZaRmt1LEQT8/ATk9tnilH6wyjykitB1H/ggOtEDL8TQNUnKaU8i4ylv1rp1OLILixSriPRDAU9eN2hNuJJhrV6MB4sk1FsQ4=
OpenBSD 6.5 errata 004, June 10, 2019:
Several issues were corrected in bgpd: "network" statements with no fixed
prefix were incorrectly removed when configuration was reloaded, "export
default-route" did not work, and "network 0.0.0.0/0" could not be used
in some cases.
xr = RB_INSERT(kredist_tree, &kt->kredist, r);
if (xr != NULL) {
- if (dynamic == xr->dynamic || dynamic) {
+ free(r);
+
+ if (dynamic != xr->dynamic && dynamic) {
/*
- * ignore update, equal announcement already present,
- * or a non-dynamic announcement is already present
- * which has preference.
+ * ignore update a non-dynamic announcement is
+ * already present which has preference.
*/
- free(r);
return 0;
}
/*
- * only the case where xr->dynamic == 1 and dynamic == 0
- * ends up here and in this case non-dynamic announcments
- * are preferred. Override dynamic flag.
+ * only equal or non-dynamic announcement ends up here.
+ * In both cases reset the dynamic flag (nop for equal) and
+ * redistribute.
*/
xr->dynamic = dynamic;
}
@@ -1281,7 +1281,6 @@ int
kr_net_match(struct ktable *kt, struct network_config *net, u_int16_t flags)
{
struct network *xn;
- int matched = 0;
TAILQ_FOREACH(xn, &kt->krn, entry) {
if (xn->net.prefix.aid != net->prefix.aid)
@@ -1316,9 +1315,9 @@ kr_net_match(struct ktable *kt, struct n