diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-01-30 22:02:23 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-01-30 22:02:23 +0100 |
commit | 367b458cb444d005a6fc4606dcf7aca31c16e848 (patch) | |
tree | 5618d2ab48097f9a7c8992a95384da4bd3d241ec /bgpd/bgp_evpn_mh.c | |
parent | Merge pull request #12700 from taspelund/martian_tip_improvement (diff) | |
download | frr-367b458cb444d005a6fc4606dcf7aca31c16e848.tar.xz frr-367b458cb444d005a6fc4606dcf7aca31c16e848.zip |
bgpd: bgp_update and bgp_withdraw never return failures
These two functions always return 0. As such any and all
tests against this make no sense. Remove the return 0
to a void and follow the chain, logically, to remove all
the dead code.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_evpn_mh.c')
-rw-r--r-- | bgpd/bgp_evpn_mh.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c index 7b1c7cf47..7ad081663 100644 --- a/bgpd/bgp_evpn_mh.c +++ b/bgpd/bgp_evpn_mh.c @@ -706,7 +706,6 @@ int bgp_evpn_type4_route_process(struct peer *peer, afi_t afi, safi_t safi, struct attr *attr, uint8_t *pfx, int psize, uint32_t addpath_id) { - int ret; esi_t esi; uint8_t ipaddr_len; struct in_addr vtep_ip; @@ -750,15 +749,15 @@ int bgp_evpn_type4_route_process(struct peer *peer, afi_t afi, safi_t safi, build_evpn_type4_prefix(&p, &esi, vtep_ip); /* Process the route. */ if (attr) { - ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr, - afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, - &prd, NULL, 0, 0, NULL); + bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, + safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, + 0, 0, NULL); } else { - ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, - afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, - &prd, NULL, 0, NULL); + bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi, + safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, + NULL, 0, NULL); } - return ret; + return 0; } /* Check if a prefix belongs to the local ES */ @@ -1180,7 +1179,6 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi, struct attr *attr, uint8_t *pfx, int psize, uint32_t addpath_id) { - int ret; struct prefix_rd prd; esi_t esi; uint32_t eth_tag; @@ -1219,15 +1217,15 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi, build_evpn_type1_prefix(&p, eth_tag, &esi, vtep_ip); /* Process the route. */ if (attr) { - ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr, - afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, - &prd, NULL, 0, 0, NULL); + bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, + safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, + 0, 0, NULL); } else { - ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, - afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, - &prd, NULL, 0, NULL); + bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi, + safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, + NULL, 0, NULL); } - return ret; + return 0; } void bgp_evpn_mh_config_ead_export_rt(struct bgp *bgp, |