summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpctl
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2020-05-11 07:55:18 +0000
committerclaudio <claudio@openbsd.org>2020-05-11 07:55:18 +0000
commit3eb11dfc356471ba882e9d557bfabb603ac1057c (patch)
treebde051410716eaacfafbfcb2182ae646f5bd40c2 /usr.sbin/bgpctl
parentdrm/atomic: Take the atomic toys away from X (diff)
downloadwireguard-openbsd-3eb11dfc356471ba882e9d557bfabb603ac1057c.tar.xz
wireguard-openbsd-3eb11dfc356471ba882e9d557bfabb603ac1057c.zip
Add support for VPNv6 in the family keyword of show rib
OK benno@ phessler@
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r--usr.sbin/bgpctl/parser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c
index 7a4b478f6f8..def7229d620 100644
--- a/usr.sbin/bgpctl/parser.c
+++ b/usr.sbin/bgpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.102 2020/05/10 13:38:46 deraadt Exp $ */
+/* $OpenBSD: parser.c,v 1.103 2020/05/11 07:55:18 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -582,6 +582,11 @@ match_token(int *argc, char **argv[], const struct token table[])
t = &table[i];
res.aid = AID_VPN_IPv4;
}
+ if (!strcasecmp(word, "VPNv6")) {
+ match++;
+ t = &table[i];
+ res.aid = AID_VPN_IPv6;
+ }
break;
case ADDRESS:
if (parse_addr(word, &res.addr)) {
@@ -879,7 +884,8 @@ show_valid_args(const struct token table[])
fprintf(stderr, " <pftable>\n");
break;
case FAMILY:
- fprintf(stderr, " [ inet | inet6 | IPv4 | IPv6 | VPNv4 ]\n");
+ fprintf(stderr, " [ inet | inet6 | IPv4 | IPv6 | "
+ "VPNv4 | VPNv6 ]\n");
break;
case FILENAME:
fprintf(stderr, " <filename>\n");