Skip to content

Commit

Permalink
ospfd: fix wrong argv index in the "show ip ospf neighbor" command
Browse files Browse the repository at this point in the history
Fixes Issue #3544.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
  • Loading branch information
rwestphal committed Dec 31, 2018
1 parent 71c4e0c commit f4f4b6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ospfd/ospf_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -5162,12 +5162,15 @@ DEFUN (show_ip_ospf_neighbor_id,
bool 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;
Expand Down

0 comments on commit f4f4b6b

Please sign in to comment.