Skip to content

Commit

Permalink
Merge pull request #14846 from FRRouting/mergify/bp/stable/9.1/pr-14710
Browse files Browse the repository at this point in the history
ospfd:fix show_ip_ospf_gr_helper (backport #14710)
  • Loading branch information
donaldsharp authored Nov 21, 2023
2 parents bd0ccd3 + 515a545 commit b06ce4e
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions ospfd/ospf_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b06ce4e

Please sign in to comment.