]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Make debug a passed in variable for bgp_evpn_path_info_cmp 14445/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 19 Sep 2023 19:51:05 +0000 (15:51 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 19 Sep 2023 19:51:05 +0000 (15:51 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_evpn.c
bgpd/bgp_route.c
bgpd/bgp_route.h

index aa23f0676256bc4a278a15411c0eb0bb2b068253..ad101f171a7f4b605e923eb98b8465c289d34cc3 100644 (file)
@@ -1722,8 +1722,8 @@ static void bgp_evpn_get_sync_info(struct bgp *bgp, esi_t *esi,
                                continue;
                }
 
-               if (bgp_evpn_path_info_cmp(bgp, tmp_pi,
-                               second_best_path, &paths_eq))
+               if (bgp_evpn_path_info_cmp(bgp, tmp_pi, second_best_path,
+                                          &paths_eq, false))
                        second_best_path = tmp_pi;
        }
 
index df3397af999ec562aa438f179128e1db073a657a..1e4334ed5f433edbf7cdbd0472aae77125126b54 100644 (file)
@@ -1493,11 +1493,11 @@ int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
 
 
 int bgp_evpn_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
-                            struct bgp_path_info *exist, int *paths_eq)
+                          struct bgp_path_info *exist, int *paths_eq,
+                          bool debug)
 {
        enum bgp_path_selection_reason reason;
        char pfx_buf[PREFIX2STR_BUFFER] = {};
-       bool debug = false;
 
        if (debug)
                prefix2str(bgp_dest_get_prefix(new->net), pfx_buf,
index 7470954bf7aeaa4ffe4467a3aabda42d46aacd6b..54fad03e6d4e5369483762bba197e1b2d8f263f6 100644 (file)
@@ -896,7 +896,8 @@ 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);
 extern int bgp_evpn_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
-                            struct bgp_path_info *exist, int *paths_eq);
+                                 struct bgp_path_info *exist, int *paths_eq,
+                                 bool debug);
 extern void bgp_aggregate_toggle_suppressed(struct bgp_aggregate *aggregate,
                                            struct bgp *bgp,
                                            const struct prefix *p, afi_t afi,