mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
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>
This commit is contained in:
parent
555a5bfe15
commit
8af5502876
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user