mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-29 16:24:55 +00:00
Merge pull request #7216 from qlyoung/fix-nht-update-decode-wrong-return-code
Fix nht update decode wrong return code
This commit is contained in:
commit
0b1dc328a9
@ -441,8 +441,7 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
||||||
if (BGP_DEBUG(nht, NHT))
|
zlog_err("%s[%s]: Failure to decode nexthop update",
|
||||||
zlog_debug("%s[%s]: Failure to decode nexthop update",
|
|
||||||
__PRETTY_FUNCTION__, bgp->name_pretty);
|
__PRETTY_FUNCTION__, bgp->name_pretty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1765,7 +1765,7 @@ bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr)
|
|||||||
|
|
||||||
for (i = 0; i < nhr->nexthop_num; i++) {
|
for (i = 0; i < nhr->nexthop_num; i++) {
|
||||||
if (zapi_nexthop_decode(s, &(nhr->nexthops[i]), 0, 0) != 0)
|
if (zapi_nexthop_decode(s, &(nhr->nexthops[i]), 0, 0) != 0)
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -401,7 +401,7 @@ static int pbr_zebra_nexthop_update(ZAPI_CALLBACK_ARGS)
|
|||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
||||||
zlog_warn("Failure to decode Nexthop update message");
|
zlog_err("Failure to decode Nexthop update message");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,9 +735,7 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS)
|
|||||||
pim = vrf->info;
|
pim = vrf->info;
|
||||||
|
|
||||||
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
||||||
if (PIM_DEBUG_PIM_NHT)
|
zlog_err("%s: Decode of nexthop update from zebra failed",
|
||||||
zlog_debug(
|
|
||||||
"%s: Decode of nexthop update from zebra failed",
|
|
||||||
__func__);
|
__func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -547,8 +547,7 @@ static int sharp_nexthop_update(ZAPI_CALLBACK_ARGS)
|
|||||||
struct zapi_route nhr;
|
struct zapi_route nhr;
|
||||||
|
|
||||||
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
||||||
zlog_warn("%s: Decode of update failed", __func__);
|
zlog_err("%s: Decode of update failed", __func__);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static int static_zebra_nexthop_update(ZAPI_CALLBACK_ARGS)
|
|||||||
afi_t afi = AFI_IP;
|
afi_t afi = AFI_IP;
|
||||||
|
|
||||||
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
|
||||||
zlog_warn("Failure to decode nexthop update message");
|
zlog_err("Failure to decode nexthop update message");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user