mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 17:13:46 +00:00
pimd: Unchecked return value
In tib_sg_oil_setup: Value returned from a function is not checked for errors before being used. If the function returns an error value, the error value may be mistaken for a normal value. Here, only the nexthop value is being used. So casted the return type to void. Coverity CID-1519816 Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
parent
d5850a1b6a
commit
f13530f23a
@ -49,7 +49,8 @@ tib_sg_oil_setup(struct pim_instance *pim, pim_sgaddr sg, struct interface *oif)
|
|||||||
if (up) {
|
if (up) {
|
||||||
memcpy(&nexthop, &up->rpf.source_nexthop,
|
memcpy(&nexthop, &up->rpf.source_nexthop,
|
||||||
sizeof(struct pim_nexthop));
|
sizeof(struct pim_nexthop));
|
||||||
pim_ecmp_nexthop_lookup(pim, &nexthop, vif_source, &grp, 0);
|
(void)pim_ecmp_nexthop_lookup(pim, &nexthop, vif_source, &grp,
|
||||||
|
0);
|
||||||
if (nexthop.interface)
|
if (nexthop.interface)
|
||||||
input_iface_vif_index = pim_if_find_vifindex_by_ifindex(
|
input_iface_vif_index = pim_if_find_vifindex_by_ifindex(
|
||||||
pim, nexthop.interface->ifindex);
|
pim, nexthop.interface->ifindex);
|
||||||
|
Loading…
Reference in New Issue
Block a user