summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2019-10-29 06:47:04 +0000
committerclaudio <claudio@openbsd.org>2019-10-29 06:47:04 +0000
commit074a3d3fce39e9bc8a2de0e53b29325c6f6d60a1 (patch)
treeaf83b7c6712f5be0938061dd186b1aa5fc10d437 /usr.sbin/bgpd
parentFix two cases where the nexthop_runners tail queue can get corrupted. (diff)
downloadwireguard-openbsd-074a3d3fce39e9bc8a2de0e53b29325c6f6d60a1.tar.xz
wireguard-openbsd-074a3d3fce39e9bc8a2de0e53b29325c6f6d60a1.zip
Replace the fatal non existing prefix call with a pt_add() call that
actually inserts the missing prefix in the prefix tree. While for regular updates to the Adj-RIB-Out this case is indeed not reachable it is reachable when using 'export default-route'. Problem reported and fix tested by Esa Kuusisto. OK benno@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index b3d444f4751..e7a4afae87d 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.208 2019/10/29 06:42:05 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.209 2019/10/29 06:47:04 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -1191,7 +1191,7 @@ prefix_adjout_update(struct rde_peer *peer, struct filterstate *state,
p->pt = pt_get(prefix, prefixlen);
if (p->pt == NULL)
- fatalx("%s: update for non existing prefix", __func__);
+ p->pt = pt_add(prefix, prefixlen);
pt_ref(p->pt);
p->peer = peer;