mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
lib: make IPv6 prefix parser slightly more strict
This makes it possible to have both "show babel route A.B.C.D/M" and "show babel route X:X::X:X/M" commands at the same time without the parser complaining about ambiguity. * lib/command.c: only accept STATE_DOT after : was seen. Reported-by: Juliusz Chroboczek <jch@pps.jussieu.fr> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
ee1ac2d52a
commit
aa5cf24b9d
@ -954,7 +954,12 @@ cmd_ipv6_prefix_match (const char *str)
|
|||||||
if (*(str + 1) == ':')
|
if (*(str + 1) == ':')
|
||||||
state = STATE_COLON;
|
state = STATE_COLON;
|
||||||
else if (*(str + 1) == '.')
|
else if (*(str + 1) == '.')
|
||||||
state = STATE_DOT;
|
{
|
||||||
|
if (colons || double_colon)
|
||||||
|
state = STATE_DOT;
|
||||||
|
else
|
||||||
|
return no_match;
|
||||||
|
}
|
||||||
else if (*(str + 1) == '/')
|
else if (*(str + 1) == '/')
|
||||||
state = STATE_SLASH;
|
state = STATE_SLASH;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user