[ospfd] Fix address qualified 'ip ospf auth' commands
2007-05-09 Milan Kocian <milon@wq.cz>
* ospf_vty.c: Fix commands: 'ip ospf authentication A.B.C.D',
'no ip ospf authentication A.B.C.D', 'no ip ospf
authentication-key A.B.C.D'. Simply fix argv's indexes and
argc check in DEFUN functions.
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index dd700b0..5f9fa2c 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -4403,7 +4403,7 @@
if (argc == 1)
{
- ret = inet_aton(argv[1], &addr);
+ ret = inet_aton(argv[0], &addr);
if (!ret)
{
vty_out (vty, "Please specify interface address by A.B.C.D%s",
@@ -4447,7 +4447,7 @@
if (argc == 1)
{
- ret = inet_aton(argv[1], &addr);
+ ret = inet_aton(argv[0], &addr);
if (!ret)
{
vty_out (vty, "Please specify interface address by A.B.C.D%s",
@@ -4551,9 +4551,9 @@
ifp = vty->index;
params = IF_DEF_PARAMS (ifp);
- if (argc == 2)
+ if (argc == 1)
{
- ret = inet_aton(argv[1], &addr);
+ ret = inet_aton(argv[0], &addr);
if (!ret)
{
vty_out (vty, "Please specify interface address by A.B.C.D%s",