-.\" $OpenBSD: bgpctl.8,v 1.111 2023/05/09 13:26:27 claudio Exp $
+.\" $OpenBSD: bgpctl.8,v 1.112 2024/08/14 19:10:51 claudio Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 9 2023 $
+.Dd $Mdocdate: August 14 2024 $
.Dt BGPCTL 8
.Os
.Sh NAME
Show only prefixes which are marked invalid and were treated as withdrawn.
.It Ar family
Limit the output to the given address family.
+.It Cm filtered
+Show only routes which were filtered out.
+Requires
+.Ic rde rib Loc-RIB include filtered
+to be set in the config.
.It Cm in
Show routes from the unfiltered Adj-RIB-In.
The
-/* $OpenBSD: bgpctl.c,v 1.306 2024/05/22 08:42:34 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.307 2024/08/14 19:10:51 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
char *p = flagstr;
if (sum) {
+ if (flags & F_PREF_FILTERED)
+ *p++ = 'F';
if (flags & F_PREF_INVALID)
*p++ = 'E';
if (flags & F_PREF_OTC_LEAK)
else
strlcpy(buf, "external", sizeof(buf));
+ if (flags & F_PREF_FILTERED)
+ strlcat(buf, ", filtered", sizeof(buf));
if (flags & F_PREF_INVALID)
strlcat(buf, ", invalid", sizeof(buf));
if (flags & F_PREF_OTC_LEAK)
-/* $OpenBSD: output.c,v 1.52 2024/08/12 09:05:28 claudio Exp $ */
+/* $OpenBSD: output.c,v 1.53 2024/08/14 19:10:51 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
break;
printf("flags: "
"* = Valid, > = Selected, I = via IBGP, A = Announced,\n"
- " S = Stale, E = Error\n");
+ " S = Stale, E = Error, F = Filtered\n");
printf("origin validation state: "
"N = not-found, V = valid, ! = invalid\n");
printf("aspa validation state: "
-/* $OpenBSD: output_json.c,v 1.45 2024/08/12 09:05:28 claudio Exp $ */
+/* $OpenBSD: output_json.c,v 1.46 2024/08/14 19:10:51 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
/* flags */
json_do_bool("valid", r->flags & F_PREF_ELIGIBLE);
+ if (r->flags & F_PREF_FILTERED)
+ json_do_bool("filtered", 1);
if (r->flags & F_PREF_BEST)
json_do_bool("best", 1);
if (r->flags & F_PREF_ECMP)
-/* $OpenBSD: parser.c,v 1.134 2023/11/20 14:18:21 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.135 2024/08/14 19:10:51 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
{ ASTYPE, "empty-as", AS_EMPTY, t_show_rib},
{ FLAG, "error", F_CTL_INVALID, t_show_rib},
{ EXTCOMMUNITY, "ext-community", NONE, t_show_rib},
+ { FLAG, "filtered", F_CTL_FILTERED, t_show_rib},
{ FLAG, "in", F_CTL_ADJ_IN, t_show_rib},
{ LRGCOMMUNITY, "large-community", NONE, t_show_rib},
{ FLAG, "leaked", F_CTL_LEAKED, t_show_rib},