diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-13 06:04:01 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-01-13 06:04:01 +0000 |
commit | bfa014c0dabeec3a35eb0c8df41dc780b0b721aa (patch) | |
tree | a1326c62b7d26cdb3841f57bcf574cf437205fa6 /usr.sbin/bgpctl/parser.c | |
parent | f7dc5a43a2813528a29cf1f348f2dc7f8b2a8007 (diff) |
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"); |