summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2015-04-25 21:44:26 +0000
committerphessler <phessler@openbsd.org>2015-04-25 21:44:26 +0000
commit17248ae1c3996b0d6bb414908c175b857a5103a8 (patch)
tree1836fc24e7503f5d9c64f8f97ade339194b0e875
parentCut the aliases part of /etc/rpc lines before feeding them to strtonum(), for (diff)
downloadwireguard-openbsd-17248ae1c3996b0d6bb414908c175b857a5103a8.tar.xz
wireguard-openbsd-17248ae1c3996b0d6bb414908c175b857a5103a8.zip
some people are capitalizing keywords, so ignore case when we test the tokens
OK henning@ benno@
-rw-r--r--usr.sbin/bgpctl/irr_parser.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/bgpctl/irr_parser.c b/usr.sbin/bgpctl/irr_parser.c
index 0c21209d518..e5598c35643 100644
--- a/usr.sbin/bgpctl/irr_parser.c
+++ b/usr.sbin/bgpctl/irr_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: irr_parser.c,v 1.13 2015/04/25 13:23:01 phessler Exp $ */
+/* $OpenBSD: irr_parser.c,v 1.14 2015/04/25 21:44:26 phessler Exp $ */
/*
* Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -231,22 +231,22 @@ parse_policy(char *key, char *val)
while ((tok = strsep(&val, " ")) != NULL) {
nextst = PO_NONE;
if (dir == IMPORT) {
- if (!strcmp(tok, "from"))
+ if (!strcasecmp(tok, "from"))
nextst = PO_PEER_KEY;
- else if (!strcmp(tok, "at"))
+ else if (!strcasecmp(tok, "at"))
nextst = PO_RTR_KEY;
- else if (!strcmp(tok, "action"))
+ else if (!strcasecmp(tok, "action"))
nextst = PO_ACTION_KEY;
- else if (!strcmp(tok, "accept"))
+ else if (!strcasecmp(tok, "accept"))
nextst = PO_FILTER_KEY;
} else if (dir == EXPORT) {
- if (!strcmp(tok, "to"))
+ if (!strcasecmp(tok, "to"))
nextst = PO_PEER_KEY;
- else if (!strcmp(tok, "at"))
+ else if (!strcasecmp(tok, "at"))
nextst = PO_RTR_KEY;
- else if (!strcmp(tok, "action"))
+ else if (!strcasecmp(tok, "action"))
nextst = PO_ACTION_KEY;
- else if (!strcmp(tok, "announce"))
+ else if (!strcasecmp(tok, "announce"))
nextst = PO_FILTER_KEY;
}