mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-06 01:16:01 +00:00
pbrd: Prevent usage of c if it is null
It is possible, that a connected lookup from zebra_interface_address_read is null. Protect and Serve Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
b1ad7351a5
commit
964c3dba62
@ -111,8 +111,9 @@ static int interface_address_add(int command, struct zclient *zclient,
|
|||||||
c = zebra_interface_address_read(command, zclient->ibuf, vrf_id);
|
c = zebra_interface_address_read(command, zclient->ibuf, vrf_id);
|
||||||
|
|
||||||
DEBUGD(&pbr_dbg_zebra,
|
DEBUGD(&pbr_dbg_zebra,
|
||||||
"%s: %s added %s", __PRETTY_FUNCTION__, c->ifp->name,
|
"%s: %s added %s", __PRETTY_FUNCTION__,
|
||||||
prefix2str(c->address, buf, sizeof(buf)));
|
c ? c->ifp->name : "Unknown",
|
||||||
|
c ? prefix2str(c->address, buf, sizeof(buf)) : "Unknown");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user