From e5067d275459143e8beccdac1ec9dda222ec477e Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 21 Jul 2022 12:34:19 +0000 Subject: [PATCH] Relax the config of add-path send and rde evaluate all add-path send is kind of like rde evaluate all (at least if plus is used) and so it kind of implies 'rde evaluate all' in that case. Removing the check in neighbor_consistent() allows to setup sessions so that 'either or' are used. This makes sense since peers may opt out of add-path by disabling the capability on their side. Based on report from Pier Carlo Chiodi OK tb@ cvs: ---------------------------------------------------------------------- --- usr.sbin/bgpd/bgpd.conf.5 | 9 +++++++-- usr.sbin/bgpd/parse.y | 10 +--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bgpd/bgpd.conf.5 b/usr.sbin/bgpd/bgpd.conf.5 index a47de10e0c4..58d9ad90388 100644 --- a/usr.sbin/bgpd/bgpd.conf.5 +++ b/usr.sbin/bgpd/bgpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgpd.conf.5,v 1.225 2022/07/12 17:49:33 tb Exp $ +.\" $OpenBSD: bgpd.conf.5,v 1.226 2022/07/21 12:34:19 claudio Exp $ .\" .\" Copyright (c) 2004 Claudio Jeker .\" Copyright (c) 2003, 2004 Henning Brauer @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 12 2022 $ +.Dd $Mdocdate: July 21 2022 $ .Dt BGPD.CONF 5 .Os .Sh NAME @@ -893,6 +893,11 @@ and are equivalent. The default is .Ic no . +If +.Ic add-path Ic send +is active then the setting of +.Ic rde Ic evaluate +is ignored. .Pp .It Xo .Ic announce as-4byte diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index baa36e6c20f..676c3d18593 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.432 2022/07/11 17:08:21 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.433 2022/07/21 12:34:19 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -4665,14 +4665,6 @@ neighbor_consistent(struct peer *p) return (-1); } - /* bail if add-path send and rde evaluate all is used together */ - if ((p->conf.flags & PEERFLAG_EVALUATE_ALL) && - (p->conf.capabilities.add_path[0] & CAPA_AP_SEND)) { - yyerror("neighbors with add-path send cannot use " - "'rde evaluate all'"); - return (-1); - } - return (0); } -- 2.20.1