]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: bgp_best_path_select_defer never returns negative
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 3 Aug 2022 15:43:01 +0000 (18:43 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 3 Aug 2022 15:43:01 +0000 (18:43 +0300)
Just drop the test and convert to void.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_packet.c
bgpd/bgp_route.c
bgpd/bgp_route.h

index 45752a8ab6df3aaea449110c471caff57eaea88c..0bbf6f8a21130b51273bbbc53912b6d12d6805c2 100644 (file)
@@ -2006,10 +2006,8 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
                                        gr_info->eor_required = 0;
                                        gr_info->eor_received = 0;
                                        /* Best path selection */
-                                       if (bgp_best_path_select_defer(
-                                                   peer->bgp, afi, safi)
-                                           < 0)
-                                               return BGP_Stop;
+                                       bgp_best_path_select_defer(peer->bgp,
+                                                                  afi, safi);
                                }
                        }
 
index abc02ea76d8bf30d5cbc7e50bdfaf600816d79d8..99fbce4ec5085673abd16551e7bdc86bc34322aa 100644 (file)
@@ -3191,7 +3191,7 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
 }
 
 /* Process the routes with the flag BGP_NODE_SELECT_DEFER set */
-int bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi)
+void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi)
 {
        struct bgp_dest *dest;
        int cnt = 0;
@@ -3238,7 +3238,7 @@ int bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi)
                /* Send route processing complete message to RIB */
                bgp_zebra_update(afi, safi, bgp->vrf_id,
                                 ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE);
-               return 0;
+               return;
        }
 
        thread_info = XMALLOC(MTYPE_TMP, sizeof(struct afi_safi_info));
@@ -3253,7 +3253,6 @@ int bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi)
        thread_add_timer(bm->master, bgp_route_select_timer_expire, thread_info,
                        BGP_ROUTE_SELECT_DELAY,
                        &bgp->gr_info[afi][safi].t_route_select);
-       return 0;
 }
 
 static wq_item_status bgp_process_wq(struct work_queue *wq, void *data)
index 6e8ef746aa2841b885c5b1f44632f5bc522e56a6..8072b83b49c779e62a55738eed23c8b6ceaa4535 100644 (file)
@@ -828,7 +828,7 @@ extern int bgp_show_table_rd(struct vty *vty, struct bgp *bgp, safi_t safi,
                             struct bgp_table *table, struct prefix_rd *prd,
                             enum bgp_show_type type, void *output_arg,
                             bool use_json);
-extern int bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi);
+extern void bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi);
 extern bool bgp_update_martian_nexthop(struct bgp *bgp, afi_t afi, safi_t safi,
                                       uint8_t type, uint8_t stype,
                                       struct attr *attr, struct bgp_dest *dest);