]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: fix "show ip ospf database" issues
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 16 Mar 2021 19:09:27 +0000 (22:09 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 22 Mar 2021 20:37:41 +0000 (23:37 +0300)
commita11bce119707135010d5f56244a4f89244cd0d0a
tree2ef1d4ad37a3980e4aec2b0fc1055cfcdaa07c63
parent53ab0eacab29eac23285db12ced4d43f079912e3
ospfd: fix "show ip ospf database" issues

Current implementation of commands `show_ip_ospf_instance_database_cmd`
and `show_ip_ospf_instance_database_type_adv_router_cmd` have the
following problems:

- they doesn't have "vrf all" argument, however the processing of this
  argument is implemented,

- they incorrectly implement json output for instances - they don't
  output anything to the vty and don't release the json object.

To fix the problems, let's do the following:

1. Split `show_ip_ospf_instance_database_cmd` into two aliases to
   `show_ip_ospf_database_max_cmd` and `show_ip_ospf_instance_database_max_cmd`.
   The code is the same and doesn't need to be duplicated.

2. Split `show_ip_ospf_instance_database_type_adv_router_cmd` into two
   separate functions - one regular and one for instances, which now
   correctly implements the processing for json output.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
ospfd/ospf_vty.c