summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-04-08 17:52:57 -0300
committerQuentin Young <qlyoung@users.noreply.github.com>2017-04-08 17:37:05 -0400
commit2caafa8c6f815ae3018ce338c083fd75ff2a9102 (patch)
treed70dcfc6ec73cf9b0681b4e199c4eeedb81dd147
parente878f5cd6750c724ffc197ce7a3b8b8d64712833 (diff)
ripd: fix argv index numbers in the redistribute command
Fixes Issue#350 Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
-rw-r--r--ripd/rip_zebra.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c
index 7fa3baea7e..578c513c78 100644
--- a/ripd/rip_zebra.c
+++ b/ripd/rip_zebra.c
@@ -339,7 +339,7 @@ DEFUN (rip_redistribute_type,
for(i = 0; redist_type[i].str; i++)
{
- if (strncmp (redist_type[i].str, argv[2]->arg,
+ if (strncmp (redist_type[i].str, argv[1]->arg,
redist_type[i].str_min_len) == 0)
{
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient,
@@ -348,7 +348,7 @@ DEFUN (rip_redistribute_type,
}
}
- vty_out(vty, "Invalid type %s%s", argv[2]->arg,
+ vty_out(vty, "Invalid type %s%s", argv[1]->arg,
VTY_NEWLINE);
return CMD_WARNING;
@@ -365,7 +365,7 @@ DEFUN (no_rip_redistribute_type,
for (i = 0; redist_type[i].str; i++)
{
- if (strncmp(redist_type[i].str, argv[3]->arg,
+ if (strncmp(redist_type[i].str, argv[2]->arg,
redist_type[i].str_min_len) == 0)
{
rip_metric_unset (redist_type[i].type, DONT_CARE_METRIC_RIP);
@@ -375,7 +375,7 @@ DEFUN (no_rip_redistribute_type,
}
}
- vty_out(vty, "Invalid type %s%s", argv[3]->arg,
+ vty_out(vty, "Invalid type %s%s", argv[2]->arg,
VTY_NEWLINE);
return CMD_WARNING;