mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
zebra: Fix static route helper function
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
6011c1b213
commit
3c2caef9fd
@ -312,25 +312,25 @@ zebra_vty_ip_route_tdv_helper (int argc, struct cmd_token *argv[],
|
||||
int idx_curr, char **tag,
|
||||
char **distance, char **vrf)
|
||||
{
|
||||
if (argc > idx_curr)
|
||||
{
|
||||
if (strmatch (argv[idx_curr]->text, "tag"))
|
||||
{
|
||||
*tag = argv[idx_curr]->arg;
|
||||
idx_curr++;
|
||||
}
|
||||
|
||||
if (strmatch (argv[idx_curr]->text, "vrf"))
|
||||
{
|
||||
*distance = NULL;
|
||||
*vrf = argv[idx_curr]->arg;
|
||||
}
|
||||
else
|
||||
{
|
||||
*distance = argv[idx_curr]->arg;
|
||||
*vrf = argv[++idx_curr]->arg;
|
||||
}
|
||||
}
|
||||
*distance = NULL;
|
||||
while (idx_curr < argc)
|
||||
{
|
||||
if (strmatch (argv[idx_curr]->text, "tag"))
|
||||
{
|
||||
*tag = argv[idx_curr+1]->arg;
|
||||
idx_curr += 2;
|
||||
}
|
||||
else if (strmatch (argv[idx_curr]->text, "vrf"))
|
||||
{
|
||||
*vrf = argv[idx_curr+1]->arg;
|
||||
idx_curr += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
*distance = argv[idx_curr]->arg;
|
||||
idx_curr++;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user