]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: fix wrong argv index in the "show ip ospf neighbor" command
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 31 Dec 2018 13:02:49 +0000 (11:02 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 29 Jan 2019 16:17:06 +0000 (14:17 -0200)
Fixes Issue #3661 (#3544 was fixed on master already).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ospfd/ospf_vty.c

index 513b437234e2aa5c535a8f31729ad058ec1eb7fe..7ae83c56a11f07a13cf738f46a1b14efcc5489b0 100644 (file)
@@ -5102,12 +5102,15 @@ DEFUN (show_ip_ospf_neighbor_id,
        uint8_t uj = use_json(argc, argv);
        struct listnode *node = NULL;
        int ret = CMD_SUCCESS;
+       int idx_router_id = 0;
+
+       argv_find(argv, argc, "A.B.C.D", &idx_router_id);
 
        for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
                if (!ospf->oi_running)
                        continue;
-               ret = show_ip_ospf_neighbor_id_common(vty, ospf, 0, argv, uj,
-                                                     0);
+               ret = show_ip_ospf_neighbor_id_common(vty, ospf, idx_router_id,
+                                                     argv, uj, 0);
        }
 
        return ret;