Appropriately handle the return code for the
zapi_nexthop_update_decode call.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
return;
}
- zapi_nexthop_update_decode(zclient->ibuf, &nhr);
+ if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
+ if (BGP_DEBUG(nht, NHT))
+ zlog_debug("%s: Failure to decode nexthop update",
+ __PRETTY_FUNCTION__);
+ return;
+ }
if (command == ZEBRA_NEXTHOP_UPDATE)
rn = bgp_node_lookup(
return 0;
pim = vrf->info;
- zapi_nexthop_update_decode(zclient->ibuf, &nhr);
+ if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
+ if (PIM_DEBUG_PIM_NHT)
+ zlog_debug("%s: Decode of nexthop update from zebra failed",
+ __PRETTY_FUNCTION__);
+ return 0;
+ }
if (command == ZEBRA_NEXTHOP_UPDATE) {
prefix_copy(&rpf.rpf_addr, &nhr.prefix);