diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-03 14:22:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-09 20:26:30 +0200 |
commit | 121e245d4f478ab9cb8a01900d8659380d2149f4 (patch) | |
tree | d5b274cec9744d147c2f8f2e1d7c1cfbe39d12ba | |
parent | bgpd: Rename various variable names to something more appropriate (diff) | |
download | frr-121e245d4f478ab9cb8a01900d8659380d2149f4.tar.xz frr-121e245d4f478ab9cb8a01900d8659380d2149f4.zip |
bgpd: Cleanup warnings issued by CI system from these changes
Modify code to cleanup warnings issued by the CI system from
this series of changes.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r-- | bgpd/bgp_route.c | 36 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi.c | 3 | ||||
-rw-r--r-- | tests/bgpd/test_mpath.c | 6 |
3 files changed, 22 insertions, 23 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index ea107ae13..218b1de1c 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1899,28 +1899,25 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_node *rn, != Established) continue; - if (aspath_cmp_left(pi1->attr->aspath, - pi2->attr->aspath) - || aspath_cmp_left_confed( + if (!aspath_cmp_left(pi1->attr->aspath, + pi2->attr->aspath) + && !aspath_cmp_left_confed( pi1->attr->aspath, - pi2->attr->aspath)) { - if (bgp_path_info_cmp( - bgp, pi2, - new_select, - &paths_eq, - mpath_cfg, debug, - pfx_buf, afi, - safi)) { - bgp_path_info_unset_flag( - rn, new_select, - BGP_PATH_DMED_SELECTED); - new_select = pi2; - } + pi2->attr->aspath)) + continue; - bgp_path_info_set_flag( - rn, pi2, - BGP_PATH_DMED_CHECK); + if (bgp_path_info_cmp( + bgp, pi2, new_select, + &paths_eq, mpath_cfg, debug, + pfx_buf, afi, safi)) { + bgp_path_info_unset_flag( + rn, new_select, + BGP_PATH_DMED_SELECTED); + new_select = pi2; } + + bgp_path_info_set_flag( + rn, pi2, BGP_PATH_DMED_CHECK); } } bgp_path_info_set_flag(rn, new_select, @@ -8047,6 +8044,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p, if (path->extra && bgp_is_valid_label(&path->extra->label[0]) && safi != SAFI_EVPN) { mpls_label_t label = label_pton(&path->extra->label[0]); + if (json_paths) json_object_int_add(json_path, "remoteLabel", label); diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 0595700bb..6978dd145 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -483,9 +483,8 @@ void del_vnc_route(struct rfapi_descriptor *rfd, /* * Delete local_nexthops list */ - if (bpi->extra && bpi->extra->vnc.export.local_nexthops) { + if (bpi->extra && bpi->extra->vnc.export.local_nexthops) list_delete(&bpi->extra->vnc.export.local_nexthops); - } bgp_aggregate_decrement(bgp, p, bpi, afi, safi); bgp_path_info_delete(bn, bpi); diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c index 193cbc2b7..f0797827c 100644 --- a/tests/bgpd/test_mpath.c +++ b/tests/bgpd/test_mpath.c @@ -317,7 +317,8 @@ static int run_bgp_path_info_mpath_update(testcase_t *t) bgp_mp_list_add(&mp_list, &test_mp_list_info[1]); new_best = &test_mp_list_info[3]; old_best = NULL; - bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, &mp_cfg); + bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, + &mp_cfg); bgp_mp_list_clear(&mp_list); EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 2, test_result); mpath = bgp_path_info_mpath_first(new_best); @@ -331,7 +332,8 @@ static int run_bgp_path_info_mpath_update(testcase_t *t) bgp_mp_list_add(&mp_list, &test_mp_list_info[1]); new_best = &test_mp_list_info[0]; old_best = &test_mp_list_info[3]; - bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, &mp_cfg); + bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, + &mp_cfg); bgp_mp_list_clear(&mp_list); EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 1, test_result); mpath = bgp_path_info_mpath_first(new_best); |