mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-11 09:30:48 +00:00
Merge pull request #2498 from pacovn/Coverity_1470098_Logically_dead_code
bgpd: json output fix (Coverity 1470098)
This commit is contained in:
commit
76cd18c9dd
@ -223,20 +223,26 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
|
|||||||
}
|
}
|
||||||
rd_header = 0;
|
rd_header = 0;
|
||||||
}
|
}
|
||||||
route_vty_out_tmp(vty, &rm->p, attr,
|
if (use_json) {
|
||||||
SAFI_MPLS_VPN,
|
|
||||||
use_json, json_array);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (use_json && rm) {
|
|
||||||
char buf_a[BUFSIZ];
|
char buf_a[BUFSIZ];
|
||||||
char buf_b[BUFSIZ];
|
char buf_b[BUFSIZ];
|
||||||
|
|
||||||
sprintf(buf_a, "%s/%d",
|
sprintf(buf_a, "%s/%d",
|
||||||
inet_ntop(rm->p.family, rm->p.u.val,
|
inet_ntop(rm->p.family,
|
||||||
buf_b, BUFSIZ),
|
rm->p.u.val,
|
||||||
|
buf_b,
|
||||||
|
BUFSIZ),
|
||||||
rm->p.prefixlen);
|
rm->p.prefixlen);
|
||||||
json_object_object_add(json_routes, buf_a,
|
json_object_object_add(
|
||||||
|
json_routes, buf_a,
|
||||||
json_array);
|
json_array);
|
||||||
|
} else {
|
||||||
|
route_vty_out_tmp(
|
||||||
|
vty, &rm->p, attr,
|
||||||
|
SAFI_MPLS_VPN, use_json,
|
||||||
|
json_array);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user