diff options
| author | 2010-01-13 06:04:00 +0000 | |
|---|---|---|
| committer | 2010-01-13 06:04:00 +0000 | |
| commit | e6cfebe91badf2153e331248ddbc3801c0465b70 (patch) | |
| tree | 8f1f4eddc5203390752eb2d46fec5d43131907df /usr.sbin/bgpctl/parser.c | |
| parent | Add support for BGP MPLS VPN aka RFC 4364. This is only the RDE part so (diff) | |
| download | wireguard-openbsd-e6cfebe91badf2153e331248ddbc3801c0465b70.tar.xz wireguard-openbsd-e6cfebe91badf2153e331248ddbc3801c0465b70.zip | |
Add VPNv4 to the understood address families in bgpctl.
OK henning@, reyk@
Diffstat (limited to 'usr.sbin/bgpctl/parser.c')
| -rw-r--r-- | usr.sbin/bgpctl/parser.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 335f3f53883..52499e9bcfa 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.59 2010/01/10 00:16:23 claudio Exp $ */ +/* $OpenBSD: parser.c,v 1.60 2010/01/13 06:04:00 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -413,16 +413,23 @@ match_token(int *argc, char **argv[], const struct token table[]) case FAMILY: if (word == NULL) break; - if (!strcmp(word, "inet") || !strcmp(word, "IPv4")) { + if (!strcmp(word, "inet") || + !strcasecmp(word, "IPv4")) { match++; t = &table[i]; res.aid = AID_INET; } - if (!strcmp(word, "inet6") || !strcmp(word, "IPv6")) { + if (!strcmp(word, "inet6") || + !strcasecmp(word, "IPv6")) { match++; t = &table[i]; res.aid = AID_INET6; } + if (!strcasecmp(word, "VPNv4")) { + match++; + t = &table[i]; + res.aid = AID_VPN_IPv4; + } break; case ADDRESS: if (parse_addr(word, &res.addr)) { @@ -593,7 +600,7 @@ show_valid_args(const struct token table[]) fprintf(stderr, " <pftable>\n"); break; case FAMILY: - fprintf(stderr, " [ inet | inet6 | IPv4 | IPv6 ]\n"); + fprintf(stderr, " [ inet | inet6 | IPv4 | IPv6 | VPNv4 ]\n"); break; case GETOPT: fprintf(stderr, " <options>\n"); |
