mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-02 14:40:53 +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);
|
||||
|
||||
DEBUGD(&pbr_dbg_zebra,
|
||||
"%s: %s added %s", __PRETTY_FUNCTION__, c->ifp->name,
|
||||
prefix2str(c->address, buf, sizeof(buf)));
|
||||
"%s: %s added %s", __PRETTY_FUNCTION__,
|
||||
c ? c->ifp->name : "Unknown",
|
||||
c ? prefix2str(c->address, buf, sizeof(buf)) : "Unknown");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user