From 4ae31d1748f7609c928303fe695bf81f51178831 Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 9 May 2023 13:26:27 +0000 Subject: [PATCH] Rename 'invalid' to 'disqualified' in the 'show rib' table. 'invalid' conflicts with the 'in' keyword and the parser is not smart enough to handle this. As a secondary benefit the term 'invalid' is less overloaded. There are various reasons why prefixes are not eligible in the route decision process calling them all 'invalid' is a bit harsh. job@, tb@ and benno@ agree --- usr.sbin/bgpctl/bgpctl.8 | 10 +++++----- usr.sbin/bgpctl/parser.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bgpctl/bgpctl.8 b/usr.sbin/bgpctl/bgpctl.8 index 4935c029d3a..4f344f4d003 100644 --- a/usr.sbin/bgpctl/bgpctl.8 +++ b/usr.sbin/bgpctl/bgpctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgpctl.8,v 1.110 2023/04/23 11:42:45 claudio Exp $ +.\" $OpenBSD: bgpctl.8,v 1.111 2023/05/09 13:26:27 claudio Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" @@ -14,7 +14,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: April 23 2023 $ +.Dd $Mdocdate: May 9 2023 $ .Dt BGPCTL 8 .Os .Sh NAME @@ -404,12 +404,14 @@ Additionally, the following .Ar options are defined: .Pp -.Bl -tag -width "selected" -compact +.Bl -tag -width "disqualified" -compact .It Cm best Alias for .Ic selected . .It Cm detail Show more detailed output for matching routes. +.It Cm disqualified +Show only routes which are not eligible. .It Cm error Show only prefixes which are marked invalid and were treated as withdrawn. .It Ar family @@ -419,8 +421,6 @@ Show routes from the unfiltered Adj-RIB-In. The .Cm neighbor needs to be specified. -.It Cm invalid -Show only routes which are not eligible. .It Cm leaked Show only routes where a route leak was detected. .It Cm out diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index ff16473082c..ae9003fd7b7 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.132 2023/04/21 10:49:01 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.133 2023/05/09 13:26:27 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -179,11 +179,11 @@ static const struct token t_show_rib[] = { { FLAG, "best", F_CTL_BEST, t_show_rib}, { COMMUNITY, "community", NONE, t_show_rib}, { FLAG, "detail", F_CTL_DETAIL, t_show_rib}, + { FLAG, "disqualified", F_CTL_INELIGIBLE, t_show_rib}, { ASTYPE, "empty-as", AS_EMPTY, t_show_rib}, { FLAG, "error", F_CTL_INVALID, t_show_rib}, { EXTCOMMUNITY, "ext-community", NONE, t_show_rib}, { FLAG, "in", F_CTL_ADJ_IN, t_show_rib}, - { FLAG, "invalid", F_CTL_INELIGIBLE, t_show_rib}, { LRGCOMMUNITY, "large-community", NONE, t_show_rib}, { FLAG, "leaked", F_CTL_LEAKED, t_show_rib}, { KEYWORD, "memory", SHOW_RIB_MEM, NULL}, -- 2.20.1