/* Prefix and num paths displayed once per prefix. */
route_vty_out_detail_header(vty, bgp, dest, bgp_dest_get_prefix(dest),
- NULL, afi, safi, json, false);
+ NULL, afi, safi, json, false, true);
/* Display each path for this prefix. */
for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) {
/* Prefix and num paths displayed once per prefix. */
route_vty_out_detail_header(vty, bgp, dest, (struct prefix *)&p, NULL,
- afi, safi, json, false);
+ afi, safi, json, false, true);
evp = (const struct prefix_evpn *)bgp_dest_get_prefix(dest);
/* Prefix and num paths displayed once per prefix. */
route_vty_out_detail_header(vty, bgp, dest, bgp_dest_get_prefix(dest),
- prd, afi, safi, json, false);
+ prd, afi, safi, json, false, false);
if (json)
json_paths = json_object_new_array();
}
/* Prefix and num paths displayed once per prefix. */
- route_vty_out_detail_header(
- vty, bgp, dest, bgp_dest_get_prefix(dest), prd,
- afi, safi, json_prefix, false);
+ route_vty_out_detail_header(vty, bgp, dest,
+ bgp_dest_get_prefix(dest),
+ prd, afi, safi, json_prefix,
+ false, false);
prefix_cnt++;
}
p->prefixlen);
} else
/* Prefix and num paths displayed once per prefix. */
- route_vty_out_detail_header(
- vty, bgp, dest, p, (struct prefix_rd *)rd_destp,
- AFI_L2VPN, SAFI_EVPN, json_prefix, false);
+ route_vty_out_detail_header(vty, bgp, dest, p,
+ (struct prefix_rd *)rd_destp,
+ AFI_L2VPN, SAFI_EVPN,
+ json_prefix, false, false);
/* For EVPN, the prefix is displayed for each path (to
* fit in with code that already exists).
/* Prefix and num paths displayed once per prefix. */
if (detail)
- route_vty_out_detail_header(
- vty, bgp, dest,
- bgp_dest_get_prefix(dest),
- (struct prefix_rd *)rd_destp, AFI_L2VPN,
- SAFI_EVPN, json_prefix, false);
+ route_vty_out_detail_header(vty, bgp, dest,
+ bgp_dest_get_prefix(
+ dest),
+ (struct prefix_rd *)
+ rd_destp,
+ AFI_L2VPN, SAFI_EVPN,
+ json_prefix, false,
+ false);
/* For EVPN, the prefix is displayed for each path (to
* fit in
if (!use_json)
route_vty_out_detail_header(
vty, bgp, dest,
- bgp_dest_get_prefix(
- dest),
+ bgp_dest_get_prefix(dest),
prd, table->afi, safi,
- NULL, false);
+ NULL, false, false);
route_vty_out_detail(
vty, bgp, dest, dest_p, pi,
prd = bgp_rd_from_dest(dest, safi);
- route_vty_out_detail_header(
- vty, bgp, dest,
- bgp_dest_get_prefix(dest), prd,
- table->afi, safi, json_paths, true);
+ route_vty_out_detail_header(vty, bgp, dest,
+ bgp_dest_get_prefix(
+ dest),
+ prd, table->afi,
+ safi, json_paths,
+ true, false);
vty_out(vty, "\"paths\": ");
json_detail_header_used = true;
struct bgp_dest *dest, const struct prefix *p,
const struct prefix_rd *prd, afi_t afi,
safi_t safi, json_object *json,
- bool incremental_print)
+ bool incremental_print, bool local_table)
{
struct bgp_path_info *pi;
struct peer *peer;
json_object_object_add(json, "advertisedTo",
json_adv_to);
} else {
- if (!json && first)
- vty_out(vty, " Not advertised to any peer");
+ if (!json && first) {
+ if (!local_table)
+ vty_out(vty,
+ " Not advertised to any peer");
+ else
+ vty_out(vty,
+ " Local BGP table not advertised");
+ }
vty_out(vty, "\n");
}
}
}
if (header) {
- route_vty_out_detail_header(
- vty, bgp, bgp_node,
- bgp_dest_get_prefix(bgp_node), pfx_rd, AFI_IP,
- safi, json_header, false);
+ route_vty_out_detail_header(vty, bgp, bgp_node,
+ bgp_dest_get_prefix(bgp_node),
+ pfx_rd, AFI_IP, safi,
+ json_header, false, false);
header = 0;
}
(*display)++;