summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
diff options
context:
space:
mode:
authordenis <denis@cvs.openbsd.org>2018-10-03 11:36:40 +0000
committerdenis <denis@cvs.openbsd.org>2018-10-03 11:36:40 +0000
commit43b7223bd47a13b057291651be4539c5ae974873 (patch)
tree3547d5d2931bf737fbb05b95f365dae076b0e53e /usr.sbin/bgpctl
parent889a9e1ccd4df5a0c6d83d4ad69caa64e8a4acc8 (diff)
add filter option based on origin validation state
OK claudio@
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r--usr.sbin/bgpctl/bgpctl.86
-rw-r--r--usr.sbin/bgpctl/parser.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.8 b/usr.sbin/bgpctl/bgpctl.8
index 13ebeba96d0..5471f5664d5 100644
--- a/usr.sbin/bgpctl/bgpctl.8
+++ b/usr.sbin/bgpctl/bgpctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bgpctl.8,v 1.82 2018/09/09 12:53:00 benno Exp $
+.\" $OpenBSD: bgpctl.8,v 1.83 2018/10/03 11:36:39 denis Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\"
@@ -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: September 9 2018 $
+.Dd $Mdocdate: October 3 2018 $
.Dt BGPCTL 8
.Os
.Sh NAME
@@ -357,6 +357,8 @@ Show only entries from the specified RIB table.
Show all entries with
.Ar as
anywhere but rightmost.
+.It Cm ovs Pq Ic valid | not-found | invalid
+Show all entries with matching Origin Validation State (OVS).
.El
.Pp
Additionally, the following
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c
index 7f79c822aba..150a05d7a03 100644
--- a/usr.sbin/bgpctl/parser.c
+++ b/usr.sbin/bgpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.85 2018/09/07 05:47:02 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.86 2018/10/03 11:36:39 denis Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -81,6 +81,7 @@ static const struct token t_show[];
static const struct token t_show_summary[];
static const struct token t_show_fib[];
static const struct token t_show_rib[];
+static const struct token t_show_ovs[];
static const struct token t_show_mrt[];
static const struct token t_show_mrt_file[];
static const struct token t_show_rib_neigh[];
@@ -185,11 +186,18 @@ static const struct token t_show_rib[] = {
{ KEYWORD, "table", NONE, t_show_rib_rib},
{ KEYWORD, "summary", SHOW_SUMMARY, t_show_summary},
{ KEYWORD, "memory", SHOW_RIB_MEM, NULL},
+ { KEYWORD, "ovs", NONE, t_show_ovs},
{ FAMILY, "", NONE, t_show_rib},
{ PREFIX, "", NONE, t_show_prefix},
{ ENDTOKEN, "", NONE, NULL}
};
+static const struct token t_show_ovs[] = {
+ { FLAG, "valid" , F_CTL_OVS_VALID, t_show_rib},
+ { FLAG, "invalid", F_CTL_OVS_INVALID, t_show_rib},
+ { FLAG, "not-found", F_CTL_OVS_NOTFOUND, t_show_rib},
+ { ENDTOKEN, "", NONE, NULL}
+};
static const struct token t_show_mrt[] = {
{ NOTOKEN, "", NONE, NULL},