mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 13:51:53 +00:00
bgpd: Cleanup indentation a tiny bit
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
6d1ac638f6
commit
924c3f6ae9
124
bgpd/bgp_route.c
124
bgpd/bgp_route.c
@ -10180,70 +10180,72 @@ static void show_adj_route(struct vty *vty, struct peer *peer, afi_t afi,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (adj = rn->adj_out; adj; adj = adj->next)
|
for (adj = rn->adj_out; adj; adj = adj->next)
|
||||||
SUBGRP_FOREACH_PEER (adj->subgroup, paf)
|
SUBGRP_FOREACH_PEER (adj->subgroup, paf) {
|
||||||
if (paf->peer == peer) {
|
if (paf->peer != peer)
|
||||||
if (header1) {
|
continue;
|
||||||
if (use_json) {
|
|
||||||
json_object_int_add(
|
|
||||||
json,
|
|
||||||
"bgpTableVersion",
|
|
||||||
table->version);
|
|
||||||
json_object_string_add(
|
|
||||||
json,
|
|
||||||
"bgpLocalRouterId",
|
|
||||||
inet_ntoa(
|
|
||||||
bgp->router_id));
|
|
||||||
json_object_object_add(
|
|
||||||
json,
|
|
||||||
"bgpStatusCodes",
|
|
||||||
json_scode);
|
|
||||||
json_object_object_add(
|
|
||||||
json,
|
|
||||||
"bgpOriginCodes",
|
|
||||||
json_ocode);
|
|
||||||
} else {
|
|
||||||
vty_out(vty,
|
|
||||||
"BGP table version is %" PRIu64
|
|
||||||
", local router ID is %s\n",
|
|
||||||
table->version,
|
|
||||||
inet_ntoa(
|
|
||||||
bgp->router_id));
|
|
||||||
vty_out(vty,
|
|
||||||
BGP_SHOW_SCODE_HEADER);
|
|
||||||
vty_out(vty,
|
|
||||||
BGP_SHOW_OCODE_HEADER);
|
|
||||||
}
|
|
||||||
header1 = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (header2) {
|
if (header1) {
|
||||||
if (!use_json)
|
if (use_json) {
|
||||||
vty_out(vty,
|
json_object_int_add(
|
||||||
BGP_SHOW_HEADER);
|
json,
|
||||||
header2 = 0;
|
"bgpTableVersion",
|
||||||
}
|
table->version);
|
||||||
|
json_object_string_add(
|
||||||
if (adj->attr) {
|
json,
|
||||||
bgp_attr_dup(&attr,
|
"bgpLocalRouterId",
|
||||||
adj->attr);
|
inet_ntoa(
|
||||||
ret = bgp_output_modifier(
|
bgp->router_id));
|
||||||
peer, &rn->p,
|
json_object_object_add(
|
||||||
&attr, afi,
|
json,
|
||||||
safi,
|
"bgpStatusCodes",
|
||||||
rmap_name);
|
json_scode);
|
||||||
if (ret != RMAP_DENY) {
|
json_object_object_add(
|
||||||
route_vty_out_tmp(
|
json,
|
||||||
vty,
|
"bgpOriginCodes",
|
||||||
&rn->p,
|
json_ocode);
|
||||||
&attr,
|
} else {
|
||||||
safi,
|
vty_out(vty,
|
||||||
use_json,
|
"BGP table version is %" PRIu64
|
||||||
json_ar);
|
", local router ID is %s\n",
|
||||||
output_count++;
|
table->version,
|
||||||
} else
|
inet_ntoa(
|
||||||
filtered_count++;
|
bgp->router_id));
|
||||||
|
vty_out(vty,
|
||||||
|
BGP_SHOW_SCODE_HEADER);
|
||||||
|
vty_out(vty,
|
||||||
|
BGP_SHOW_OCODE_HEADER);
|
||||||
}
|
}
|
||||||
|
header1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header2) {
|
||||||
|
if (!use_json)
|
||||||
|
vty_out(vty,
|
||||||
|
BGP_SHOW_HEADER);
|
||||||
|
header2 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adj->attr) {
|
||||||
|
bgp_attr_dup(&attr,
|
||||||
|
adj->attr);
|
||||||
|
ret = bgp_output_modifier(
|
||||||
|
peer, &rn->p,
|
||||||
|
&attr, afi,
|
||||||
|
safi,
|
||||||
|
rmap_name);
|
||||||
|
if (ret != RMAP_DENY) {
|
||||||
|
route_vty_out_tmp(
|
||||||
|
vty,
|
||||||
|
&rn->p,
|
||||||
|
&attr,
|
||||||
|
safi,
|
||||||
|
use_json,
|
||||||
|
json_ar);
|
||||||
|
output_count++;
|
||||||
|
} else
|
||||||
|
filtered_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (use_json)
|
if (use_json)
|
||||||
|
Loading…
Reference in New Issue
Block a user