From: claudio Date: Thu, 12 Oct 2023 14:16:28 +0000 (+0000) Subject: In up_generate_addpath_all() ensure that the new prefix is valid. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e17c4daaf7f127ebd6cd320e57709b2183e1008d;p=openbsd In up_generate_addpath_all() ensure that the new prefix is valid. This should fix a fatal error reported by Arend Brouwer (arend at eritap com) when "announce add-path send all" is used. As a workaround "announce add-path send best plus 500" can used. OK tb@ --- diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index 70d3fa27d7f..10d031d6335 100644 --- a/usr.sbin/bgpd/rde_update.c +++ b/usr.sbin/bgpd/rde_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_update.c,v 1.163 2023/07/12 14:45:43 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.164 2023/10/12 14:16:28 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker @@ -352,6 +352,11 @@ up_generate_addpath_all(struct rde_peer *peer, struct rib_entry *re, all = 1; } + if (new != NULL && !prefix_eligible(new)) { + /* only allow valid prefixes */ + new = NULL; + } + if (old != NULL) { /* withdraw stale paths */ p = prefix_adjout_get(peer, old->path_id_tx, old->pt);