summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_debug.c6
-rw-r--r--bgpd/bgp_debug.h4
-rw-r--r--bgpd/bgp_route.c9
-rw-r--r--bgpd/bgp_route.h7
-rw-r--r--bgpd/bgp_table.h2
-rw-r--r--bgpd/bgp_zebra.c4
-rw-r--r--bgpd/bgp_zebra.h2
7 files changed, 18 insertions, 16 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index b552b8811c..bae1079a1d 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -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;
@@ -2540,7 +2540,7 @@ bool bgp_debug_bestpath(struct prefix *p)
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,
diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h
index 73007fe819..51f939692e 100644
--- a/bgpd/bgp_debug.h
+++ b/bgpd/bgp_debug.h
@@ -166,10 +166,10 @@ extern void bgp_notify_print(struct peer *, struct bgp_notify *, const char *);
extern const struct message bgp_status_msg[];
extern int bgp_debug_neighbor_events(struct peer *peer);
extern int bgp_debug_keepalive(struct peer *peer);
-extern bool bgp_debug_update(struct peer *peer, struct prefix *p,
+extern bool bgp_debug_update(struct peer *peer, const struct prefix *p,
struct update_group *updgrp, unsigned int inbound);
extern bool bgp_debug_bestpath(struct prefix *p);
-extern bool bgp_debug_zebra(struct prefix *p);
+extern bool bgp_debug_zebra(const struct prefix *p);
extern const char *bgp_debug_rdpfxpath2str(afi_t, safi_t, struct prefix_rd *,
union prefixconstptr, mpls_label_t *,
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 265f122c23..6154513a53 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -1241,7 +1241,8 @@ static enum filter_type bgp_input_filter(struct peer *peer, struct prefix *p,
#undef FILTER_EXIST_WARN
}
-static enum filter_type bgp_output_filter(struct peer *peer, struct prefix *p,
+static enum filter_type bgp_output_filter(struct peer *peer,
+ const struct prefix *p,
struct attr *attr, afi_t afi,
safi_t safi)
{
@@ -1544,8 +1545,8 @@ static void subgroup_announce_reset_nhop(uint8_t family, struct attr *attr)
}
bool subgroup_announce_check(struct bgp_node *rn, struct bgp_path_info *pi,
- struct update_subgroup *subgrp, struct prefix *p,
- struct attr *attr)
+ struct update_subgroup *subgrp,
+ const struct prefix *p, struct attr *attr)
{
struct bgp_filter *filter;
struct peer *from;
@@ -12296,7 +12297,7 @@ static int bgp_distance_unset(struct vty *vty, const char *distance_str,
}
/* Apply BGP information to distance method. */
-uint8_t bgp_distance_apply(struct prefix *p, struct bgp_path_info *pinfo,
+uint8_t bgp_distance_apply(const struct prefix *p, struct bgp_path_info *pinfo,
afi_t afi, safi_t safi, struct bgp *bgp)
{
struct bgp_node *rn;
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index 628c933c07..6be9e45c94 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -590,8 +590,9 @@ extern void bgp_aggregate_decrement(struct bgp *bgp, struct prefix *p,
struct bgp_path_info *path, afi_t afi,
safi_t safi);
-extern uint8_t bgp_distance_apply(struct prefix *p, struct bgp_path_info *path,
- afi_t afi, safi_t safi, struct bgp *bgp);
+extern uint8_t bgp_distance_apply(const struct prefix *p,
+ struct bgp_path_info *path, afi_t afi,
+ safi_t safi, struct bgp *bgp);
extern afi_t bgp_node_afi(struct vty *);
extern safi_t bgp_node_safi(struct vty *);
@@ -622,7 +623,7 @@ extern void subgroup_process_announce_selected(struct update_subgroup *subgrp,
extern bool subgroup_announce_check(struct bgp_node *rn,
struct bgp_path_info *pi,
struct update_subgroup *subgrp,
- struct prefix *p, struct attr *attr);
+ const struct prefix *p, struct attr *attr);
extern void bgp_peer_clear_node_queue_drain_immediate(struct peer *peer);
extern void bgp_process_queues_drain_immediate(void);
diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h
index 69cca9eee4..222af12183 100644
--- a/bgpd/bgp_table.h
+++ b/bgpd/bgp_table.h
@@ -226,7 +226,7 @@ static inline struct bgp_node *bgp_node_get(struct bgp_table *const table,
* bgp_node_lookup
*/
static inline struct bgp_node *
-bgp_node_lookup(const struct bgp_table *const table, struct prefix *p)
+bgp_node_lookup(const struct bgp_table *const table, const struct prefix *p)
{
return bgp_node_from_rnode(route_node_lookup(table->route_table, p));
}
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 1c0f3c99b7..3daef20067 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -928,7 +928,7 @@ bgp_path_info_to_ipv6_nexthop(struct bgp_path_info *path, ifindex_t *ifindex)
return nexthop;
}
-static bool bgp_table_map_apply(struct route_map *map, struct prefix *p,
+static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p,
struct bgp_path_info *path)
{
route_map_result_t ret;
@@ -1148,7 +1148,7 @@ static bool update_ipv6nh_for_route_install(int nh_othervrf, struct bgp *nh_bgp,
return true;
}
-void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
+void bgp_zebra_announce(struct bgp_node *rn, const struct prefix *p,
struct bgp_path_info *info, struct bgp *bgp, afi_t afi,
safi_t safi)
{
diff --git a/bgpd/bgp_zebra.h b/bgpd/bgp_zebra.h
index 39c28c452c..b5b451092a 100644
--- a/bgpd/bgp_zebra.h
+++ b/bgpd/bgp_zebra.h
@@ -32,7 +32,7 @@ extern void bgp_zebra_destroy(void);
extern int bgp_zebra_get_table_range(uint32_t chunk_size,
uint32_t *start, uint32_t *end);
extern int bgp_if_update_all(void);
-extern void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
+extern void bgp_zebra_announce(struct bgp_node *rn, const struct prefix *p,
struct bgp_path_info *path, struct bgp *bgp,
afi_t afi, safi_t safi);
extern void bgp_zebra_announce_table(struct bgp *, afi_t, safi_t);