]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_debug.c
Merge pull request #6017 from sarav511/ovrride
[mirror_frr.git] / bgpd / bgp_debug.c
index b552b8811cae1d49e66d398aade2b062dbe6f05b..5104e235156edcd8d55eecf4998cf5c2743f4930 100644 (file)
@@ -2404,7 +2404,7 @@ void bgp_debug_init(void)
 /* Return true if this prefix is on the per_prefix_list of prefixes to debug
  * for BGP_DEBUG_TYPE
  */
-static int bgp_debug_per_prefix(struct prefix *p,
+static int bgp_debug_per_prefix(const struct prefix *p,
                                unsigned long term_bgp_debug_type,
                                unsigned int BGP_DEBUG_TYPE,
                                struct list *per_prefix_list)
@@ -2489,7 +2489,7 @@ int bgp_debug_keepalive(struct peer *peer)
                                  bgp_debug_keepalive_peers);
 }
 
-bool bgp_debug_update(struct peer *peer, struct prefix *p,
+bool bgp_debug_update(struct peer *peer, const struct prefix *p,
                      struct update_group *updgrp, unsigned int inbound)
 {
        char *host = NULL;
@@ -2528,19 +2528,19 @@ bool bgp_debug_update(struct peer *peer, struct prefix *p,
        return false;
 }
 
-bool bgp_debug_bestpath(struct prefix *p)
+bool bgp_debug_bestpath(struct bgp_node *rn)
 {
        if (BGP_DEBUG(bestpath, BESTPATH)) {
-               if (bgp_debug_per_prefix(p, term_bgp_debug_bestpath,
-                                        BGP_DEBUG_BESTPATH,
-                                        bgp_debug_bestpath_prefixes))
+               if (bgp_debug_per_prefix(
+                           bgp_node_get_prefix(rn), term_bgp_debug_bestpath,
+                           BGP_DEBUG_BESTPATH, bgp_debug_bestpath_prefixes))
                        return true;
        }
 
        return false;
 }
 
-bool bgp_debug_zebra(struct prefix *p)
+bool bgp_debug_zebra(const struct prefix *p)
 {
        if (BGP_DEBUG(zebra, ZEBRA)) {
                if (bgp_debug_per_prefix(p, term_bgp_debug_zebra,
@@ -2553,7 +2553,7 @@ bool bgp_debug_zebra(struct prefix *p)
 }
 
 const char *bgp_debug_rdpfxpath2str(afi_t afi, safi_t safi,
-                                   struct prefix_rd *prd,
+                                   const struct prefix_rd *prd,
                                    union prefixconstptr pu,
                                    mpls_label_t *label, uint32_t num_labels,
                                    int addpath_valid, uint32_t addpath_id,