summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorteletajp <teletajp@yandex.ru>2023-11-01 12:25:07 +0300
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-11-21 09:40:59 +0000
commit515a5450264ecaecd71626e0aaf6bf0db8e78732 (patch)
tree2d2ef257c576dab8edbfaf58d13f488fc1b961cb /ospfd
parentbd0ccd34202501cdeec2b595df74df0ecce19c3c (diff)
ospfd: fix show_ip_ospf_gr_helper
Fix for the command "show ip ospf vrf NAME graceful-restart helper". FRR did not show information by vrf's name. If i have router ospf vrf red, vtysh's command 'show ip ospf vrf red graceful-restart helper' will not show anything. But command 'show ip ospf vrf all graceful-restart helper' will work normally. This fix fixes the display of information by vrf's name. Example: frr1# show ip ospf vrf vrf-1 graceful-restart helper VRF Name: vrf-1 OSPF Router with ID (192.168.255.81) Graceful restart helper support enabled. Strict LSA check is enabled. Helper supported for Planned and Unplanned Restarts. Supported Graceful restart interval: 1800(in seconds). Signed-off-by: teletajp <teletajp@yandex.ru> (cherry picked from commit 62754e102965ed0cef1d0d8819514391e6629e3e)
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_vty.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 4f62e4f87f..355742a9ab 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -10807,38 +10807,23 @@ DEFPY (show_ip_ospf_gr_helper,
}
ospf = ospf_lookup_by_inst_name(inst, vrf_name);
-
- if (ospf == NULL || !ospf->oi_running) {
-
- if (uj)
- vty_json(vty, json);
- else
- vty_out(vty,
- "%% OSPF is not enabled in vrf %s\n",
- vrf_name);
-
- return CMD_SUCCESS;
- }
-
} else {
/* Default Vrf */
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
+ }
- if (ospf == NULL || !ospf->oi_running) {
-
- if (uj)
- vty_json(vty, json);
- else
- vty_out(vty,
- "%% OSPF is not enabled in vrf default\n");
+ if (ospf == NULL || !ospf->oi_running) {
- return CMD_SUCCESS;
- }
+ if (uj)
+ vty_json(vty, json);
+ else
+ vty_out(vty,
+ "%% OSPF is not enabled in vrf %s\n", vrf_name ? vrf_name : "default");
- ospf_show_gr_helper_details(vty, ospf, use_vrf, json, uj,
- detail);
+ return CMD_SUCCESS;
}
+ ospf_show_gr_helper_details(vty, ospf, use_vrf, json, uj, detail);
if (uj)
vty_json(vty, json);