mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 20:34:33 +00:00
2003-07-11 Vsevolod Sipakov <zebra@vs.megalink.ru>
* lib/command.c: Add missing HAVE_IPV6 defines. see bug id #23: http://bugzilla.dishone.st/show_bug.cgi?id=23
This commit is contained in:
parent
53db0feeb8
commit
22e0a9e6c7
@ -715,6 +715,8 @@ cmd_ipv4_prefix_match (char *str)
|
|||||||
#define STATE_SLASH 6
|
#define STATE_SLASH 6
|
||||||
#define STATE_MASK 7
|
#define STATE_MASK 7
|
||||||
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
|
|
||||||
enum match_type
|
enum match_type
|
||||||
cmd_ipv6_match (char *str)
|
cmd_ipv6_match (char *str)
|
||||||
{
|
{
|
||||||
@ -952,6 +954,8 @@ cmd_ipv6_prefix_match (char *str)
|
|||||||
return exact_match;
|
return exact_match;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_IPV6 */
|
||||||
|
|
||||||
#define DECIMAL_STRLEN_MAX 10
|
#define DECIMAL_STRLEN_MAX 10
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1046,6 +1050,7 @@ cmd_filter_by_completion (char *command, vector v, int index)
|
|||||||
matched++;
|
matched++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
else if (CMD_IPV6 (str))
|
else if (CMD_IPV6 (str))
|
||||||
{
|
{
|
||||||
if (cmd_ipv6_match (command))
|
if (cmd_ipv6_match (command))
|
||||||
@ -1066,6 +1071,7 @@ cmd_filter_by_completion (char *command, vector v, int index)
|
|||||||
matched++;
|
matched++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_IPV6 */
|
||||||
else if (CMD_IPV4 (str))
|
else if (CMD_IPV4 (str))
|
||||||
{
|
{
|
||||||
if (cmd_ipv4_match (command))
|
if (cmd_ipv4_match (command))
|
||||||
@ -1160,6 +1166,7 @@ cmd_filter_by_string (char *command, vector v, int index)
|
|||||||
matched++;
|
matched++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
else if (CMD_IPV6 (str))
|
else if (CMD_IPV6 (str))
|
||||||
{
|
{
|
||||||
if (cmd_ipv6_match (command) == exact_match)
|
if (cmd_ipv6_match (command) == exact_match)
|
||||||
@ -1178,6 +1185,7 @@ cmd_filter_by_string (char *command, vector v, int index)
|
|||||||
matched++;
|
matched++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_IPV6 */
|
||||||
else if (CMD_IPV4 (str))
|
else if (CMD_IPV4 (str))
|
||||||
{
|
{
|
||||||
if (cmd_ipv4_match (command) == exact_match)
|
if (cmd_ipv4_match (command) == exact_match)
|
||||||
@ -1272,6 +1280,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type)
|
|||||||
match++;
|
match++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
case ipv6_match:
|
case ipv6_match:
|
||||||
if (CMD_IPV6 (str))
|
if (CMD_IPV6 (str))
|
||||||
match++;
|
match++;
|
||||||
@ -1285,6 +1294,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type)
|
|||||||
match++;
|
match++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif /* HAVE_IPV6 */
|
||||||
case ipv4_match:
|
case ipv4_match:
|
||||||
if (CMD_IPV4 (str))
|
if (CMD_IPV4 (str))
|
||||||
match++;
|
match++;
|
||||||
@ -1350,6 +1360,7 @@ cmd_entry_function_desc (char *src, char *dst)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_IPV6
|
||||||
if (CMD_IPV6 (dst))
|
if (CMD_IPV6 (dst))
|
||||||
{
|
{
|
||||||
if (cmd_ipv6_match (src))
|
if (cmd_ipv6_match (src))
|
||||||
@ -1365,6 +1376,7 @@ cmd_entry_function_desc (char *src, char *dst)
|
|||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_IPV6 */
|
||||||
|
|
||||||
if (CMD_IPV4 (dst))
|
if (CMD_IPV4 (dst))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user