Merge pull request #13921 from donaldsharp/ospf_vty_guard_json

ospfd: Ensure `show ip ospf interface` json code is guarded
This commit is contained in:
Donatas Abraitis 2023-07-04 08:51:51 +03:00 committed by GitHub
commit 18dd36596e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -424,7 +424,7 @@ static void display_l3vni(struct vty *vty, struct bgp *bgp_vrf,
}
vty_out(vty, " Advertise-gw-macip : %s\n", "n/a");
vty_out(vty, " Advertise-svi-macip : %s\n", "n/a");
if (bgp_vrf && bgp_vrf->evpn_info) {
if (bgp_vrf->evpn_info) {
vty_out(vty, " Advertise-pip: %s\n",
bgp_vrf->evpn_info->advertise_pip ? "Yes"
: "No");

View File

@ -3690,7 +3690,8 @@ static void show_ip_ospf_interface_sub(struct vty *vty, struct ospf *ospf,
"Use all fields following ospfEnabled from interfaceIp hierarchy")
#endif
json_oi = json_object_new_object();
if (use_json)
json_oi = json_object_new_object();
if (CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED)) {
if (use_json) {