summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_nht.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-05 14:34:47 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-05 14:34:47 +0100
commit7d30a95973ee3b5f28ce7315bc331fde694b1305 (patch)
tree281aa1f14c9ff558a8d7b2f1e763095356beeb0f /bgpd/bgp_nht.c
parentbgpd, lib, pimd: Make nexthop_update decoding common (diff)
downloadfrr-7d30a95973ee3b5f28ce7315bc331fde694b1305.tar.xz
frr-7d30a95973ee3b5f28ce7315bc331fde694b1305.zip
bgpd, pimd: Handle return code for nexthop_decode
Appropriately handle the return code for the zapi_nexthop_update_decode call. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_nht.c')
-rw-r--r--bgpd/bgp_nht.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index e595a1519..d39fbec86 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -338,7 +338,12 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
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(