mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 06:50:25 +00:00
ospfd: check for NULLs in vty code
There were a couple of cli paths that NULL-checked in the
vtysh output path, but not in the json path.
Signed-off-by: Mark Stapp <mjs@labn.net>
(cherry picked from commit 864a3bc185
)
This commit is contained in:
parent
c9a420b9c1
commit
5ec72f9560
@ -637,6 +637,9 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty,
|
|||||||
rn = route_next(rn)) {
|
rn = route_next(rn)) {
|
||||||
oi = rn->info;
|
oi = rn->info;
|
||||||
|
|
||||||
|
if (oi == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
json_interface_sub =
|
json_interface_sub =
|
||||||
json_object_new_object();
|
json_object_new_object();
|
||||||
@ -672,6 +675,9 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty,
|
|||||||
rn = route_next(rn)) {
|
rn = route_next(rn)) {
|
||||||
oi = rn->info;
|
oi = rn->info;
|
||||||
|
|
||||||
|
if (oi == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (use_json)
|
if (use_json)
|
||||||
json_interface_sub =
|
json_interface_sub =
|
||||||
json_object_new_object();
|
json_object_new_object();
|
||||||
|
@ -4175,6 +4175,9 @@ static int show_ip_ospf_interface_traffic_common(
|
|||||||
rn = route_next(rn)) {
|
rn = route_next(rn)) {
|
||||||
oi = rn->info;
|
oi = rn->info;
|
||||||
|
|
||||||
|
if (oi == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (use_json) {
|
if (use_json) {
|
||||||
json_interface_sub =
|
json_interface_sub =
|
||||||
json_object_new_object();
|
json_object_new_object();
|
||||||
|
Loading…
Reference in New Issue
Block a user