]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_vty.c
eigrpd: eigrp usage of uint32_t to struct in_addr for router_id data
[mirror_frr.git] / bgpd / bgp_vty.c
index f83b146175e91716ffb0e582c9392474c5431601..2a4421aa54d30089d77699025c5100ec70f8075e 100644 (file)
@@ -7213,7 +7213,9 @@ static int bgp_clear_prefix(struct vty *vty, const char *view_name,
                        if (prd && memcmp(rn->p.u.val, prd->val, 8) != 0)
                                continue;
 
-                       if ((table = rn->info) != NULL) {
+                       table = bgp_node_get_bgp_table_info(rn);
+                       if (table != NULL) {
+
                                if ((rm = bgp_node_match(table, &match))
                                    != NULL) {
                                        if (rm->p.prefixlen
@@ -10916,7 +10918,6 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
        if (use_json) {
                vty_out(vty, "%s\n", json_object_to_json_string_ext(
                                             json, JSON_C_TO_STRING_PRETTY));
-               json_object_free(json);
        } else {
                vty_out(vty, "\n");
        }
@@ -10991,8 +10992,10 @@ static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
                }
        }
 
-       if (use_json)
+       if (use_json) {
                vty_out(vty, "}\n");
+               json_object_free(json);
+       }
        else if (!nbr_output)
                vty_out(vty, "%% BGP instance not found\n");
 }