-.\" $OpenBSD: bgplgd.8,v 1.6 2023/02/03 15:51:09 jmc Exp $
+.\" $OpenBSD: bgplgd.8,v 1.7 2023/03/13 17:31:28 claudio Exp $
.\"
.\" Copyright (c) 2021 Claudio Jeker <claudio@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: February 3 2023 $
+.Dd $Mdocdate: March 13 2023 $
.Dt BGPLGD 8
.Os
.Sh NAME
Show only selected routes.
.It Cm error Ns = Ns 1
Show only prefixes which are marked invalid and were treated as withdrawn.
+.It Cm invalid Ns = Ns 1
+Show only prefixes which are not eligible.
+.It Cm leaked Ns = Ns 1
+Show only prefixes where a route leak was detected.
.It Cm prefix Ns = Ns Ar addr
Show only entries that match prefix either as the best matching route or
show the entry for this CIDR prefix.
-/* $OpenBSD: bgplgd.h,v 1.2 2023/02/03 10:10:36 job Exp $ */
+/* $OpenBSD: bgplgd.h,v 1.3 2023/03/13 17:31:28 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
*
#define QS_SHORTER 13
#define QS_ERROR 14
#define QS_AVS 15
-#define QS_MAX 16
+#define QS_INVALID 16
+#define QS_LEAKED 17
+#define QS_MAX 18
/* too add: empty-as, in, out, peer-as, source-as, transit-as */
(1 << QS_EXTCOMMUNITY) | (1 << QS_LARGECOMMUNITY) | \
(1 << QS_AF) | (1 << QS_RIB) | (1 << QS_OVS) | \
(1 << QS_BEST) | (1 << QS_ALL) | (1 << QS_SHORTER) | \
- (1 << QS_ERROR) | (1 << QS_AVS))
+ (1 << QS_ERROR) | (1 << QS_AVS) | (1 << QS_INVALID) | \
+ (1 << QS_LEAKED))
struct cmd;
struct lg_ctx {
-/* $OpenBSD: qs.c,v 1.3 2023/02/03 10:10:36 job Exp $ */
+/* $OpenBSD: qs.c,v 1.4 2023/03/13 17:31:28 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
*
{ QS_SHORTER, "or-shorter", ONE },
{ QS_ERROR, "error", ONE },
{ QS_AVS, "avs", AVS },
+ { QS_INVALID, "invalid", ONE },
+ { QS_LEAKED, "leaked", ONE },
{ 0, NULL }
};
if (argc < len)
argv[argc++] = ctx->qs_args[QS_AVS].string;
}
- /* BEST and ERROR are exclusive */
+ /* BEST, ERROR, INVALID and LEAKED are exclusive */
if (ctx->qs_args[QS_BEST].one) {
if (argc < len)
argv[argc++] = "best";
} else if (ctx->qs_args[QS_ERROR].one) {
if (argc < len)
argv[argc++] = "error";
+ } else if (ctx->qs_args[QS_INVALID].one) {
+ if (argc < len)
+ argv[argc++] = "invalid";
+ } else if (ctx->qs_args[QS_LEAKED].one) {
+ if (argc < len)
+ argv[argc++] = "leaked";
}
/* prefix must be last for show rib */