summaryrefslogtreecommitdiffstats
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-18 11:34:28 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-12-01 17:25:56 +0100
commit8af5502876b9e6e0701f51ccdd2c708e6a971197 (patch)
treece9c2bf0d8012052d2c95a9085fed0660cc69858 /lib/command_match.c
parentlib: make DEFUN foobar_cmd symbols static (diff)
downloadfrr-8af5502876b9e6e0701f51ccdd2c708e6a971197.tar.xz
frr-8af5502876b9e6e0701f51ccdd2c708e6a971197.zip
lib: allow all characters in WORD tokens
WORD tokens (which are also used for "LINE..." input) should really accept all characters. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 06a50656b..93f898da7 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -855,14 +855,9 @@ match_word (struct cmd_token *token, const char *word)
return no_match;
}
-#define VARIABLE_ALPHABET \
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890:/._-"
-
static enum match_type
match_variable (struct cmd_token *token, const char *word)
{
assert (token->type == VARIABLE_TKN);
-
- return strlen (word) == strspn(word, VARIABLE_ALPHABET) ?
- exact_match : no_match;
+ return exact_match;
}