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 FRRouting#3661 (FRRouting#3544 was fixed on master already).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
  • Loading branch information
rwestphal committed Jan 29, 2019
1 parent 5a21228 commit c18acf9
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 @@ -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;
Expand Down

0 comments on commit c18acf9

Please sign in to comment.