From ca19319b2e172a199efb8beeed4e3e222a5264ae Mon Sep 17 00:00:00 2001 From: lihongguang Date: Thu, 4 Jan 2018 07:01:58 +0800 Subject: [PATCH] ospfd: fix [no] area authentication command Signed-off-by: lihongguang lhg803@163.com --- ospfd/ospf_vty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index a5ea14793a..b1a0acf83c 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -1974,12 +1974,13 @@ DEFUN (ospf_area_authentication_message_digest, "Use message-digest authentication\n") { VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); - int idx_ipv4_number = 1; + int idx = 0; struct ospf_area *area; struct in_addr area_id; int format; - VTY_GET_OSPF_AREA_ID(area_id, format, argv[idx_ipv4_number]->arg); + argv_find(argv, argc, "area", &idx); + VTY_GET_OSPF_AREA_ID(area_id, format, argv[idx + 1]->arg); area = ospf_area_get(ospf, area_id); ospf_area_display_format_set(ospf, area, format); -- 2.39.5