diff options
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r-- | bgpd/bgp_zebra.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 73f03f6a9..5d43645c6 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -3051,7 +3051,8 @@ void bgp_send_pbr_rule_action(struct bgp_pbr_action *pbra, bgp_encode_pbr_rule_action(s, pbra, pbr); stream_putw_at(s, 0, stream_get_endp(s)); - if (!zclient_send_message(zclient) && install) { + if ((zclient_send_message(zclient) != ZCLIENT_SEND_FAILURE) + && install) { if (!pbr) pbra->install_in_progress = true; else @@ -3082,7 +3083,7 @@ void bgp_send_pbr_ipset_match(struct bgp_pbr_match *pbrim, bool install) bgp_encode_pbr_ipset_match(s, pbrim); stream_putw_at(s, 0, stream_get_endp(s)); - if (!zclient_send_message(zclient) && install) + if ((zclient_send_message(zclient) != ZCLIENT_SEND_FAILURE) && install) pbrim->install_in_progress = true; } @@ -3110,7 +3111,7 @@ void bgp_send_pbr_ipset_entry_match(struct bgp_pbr_match_entry *pbrime, bgp_encode_pbr_ipset_entry_match(s, pbrime); stream_putw_at(s, 0, stream_get_endp(s)); - if (!zclient_send_message(zclient) && install) + if ((zclient_send_message(zclient) != ZCLIENT_SEND_FAILURE) && install) pbrime->install_in_progress = true; } @@ -3185,7 +3186,7 @@ void bgp_send_pbr_iptable(struct bgp_pbr_action *pba, stream_putw_at(s, 0, stream_get_endp(s)); ret = zclient_send_message(zclient); if (install) { - if (ret) + if (ret != ZCLIENT_SEND_FAILURE) pba->refcnt++; else pbm->install_iptable_in_progress = true; @@ -3319,7 +3320,7 @@ int bgp_zebra_send_capabilities(struct bgp *bgp, bool disable) } if (zclient_capabilities_send(ZEBRA_CLIENT_CAPABILITIES, zclient, &api) - < 0) { + == ZCLIENT_SEND_FAILURE) { zlog_err("error sending capability"); ret = BGP_GR_FAILURE; } else { @@ -3361,7 +3362,7 @@ int bgp_zebra_update(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type) api.cap = type; if (zclient_capabilities_send(ZEBRA_CLIENT_CAPABILITIES, zclient, &api) - < 0) { + == ZCLIENT_SEND_FAILURE) { if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("error sending capability"); return BGP_GR_FAILURE; @@ -3393,7 +3394,7 @@ int bgp_zebra_stale_timer_update(struct bgp *bgp) api.stale_removal_time = bgp->rib_stale_time; api.vrf_id = bgp->vrf_id; if (zclient_capabilities_send(ZEBRA_CLIENT_CAPABILITIES, zclient, &api) - < 0) { + == ZCLIENT_SEND_FAILURE) { if (BGP_DEBUG(zebra, ZEBRA)) zlog_debug("error sending capability"); return BGP_GR_FAILURE; |