From: lihongguang Date: Wed, 3 Jan 2018 23:01:58 +0000 (+0800) Subject: ospfd: fix [no] area authentication command X-Git-Tag: frr-4.0-dev~75^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F1592%2Fhead;p=mirror%2Ffrr.git ospfd: fix [no] area authentication command Signed-off-by: lihongguang lhg803@163.com --- 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);