summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:24 +0000
commit54de8bbe36d7d968c6367939277942518bd4e11f (patch)
tree924f8c16d9c8831679f355b88c620b9b356c9d5a /bgpd/bgp_updgrp.c
parentAdding debian version 10.0.1-0.1. (diff)
downloadfrr-54de8bbe36d7d968c6367939277942518bd4e11f.tar.xz
frr-54de8bbe36d7d968c6367939277942518bd4e11f.zip
Merging upstream version 10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_updgrp.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index d13515a..124e7a3 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -145,11 +145,12 @@ static void conf_copy(struct peer *dst, struct peer *src, afi_t afi,
dst->addpath_type[afi][safi] = src->addpath_type[afi][safi];
dst->addpath_best_selected[afi][safi] =
src->addpath_best_selected[afi][safi];
+ dst->addpath_paths_limit[afi][safi] =
+ src->addpath_paths_limit[afi][safi];
dst->local_as = src->local_as;
dst->change_local_as = src->change_local_as;
dst->shared_network = src->shared_network;
dst->local_role = src->local_role;
- dst->as_path_loop_detection = src->as_path_loop_detection;
if (src->soo[afi][safi]) {
ecommunity_free(&dst->soo[afi][safi]);
@@ -348,6 +349,8 @@ static unsigned int updgrp_hash_key_make(const void *p)
key = jhash_1word((flags & PEER_UPDGRP_AF_FLAGS), key);
key = jhash_1word((uint32_t)peer->addpath_type[afi][safi], key);
key = jhash_1word(peer->addpath_best_selected[afi][safi], key);
+ key = jhash_1word(peer->addpath_paths_limit[afi][safi].receive, key);
+ key = jhash_1word(peer->addpath_paths_limit[afi][safi].send, key);
key = jhash_1word((peer->cap & PEER_UPDGRP_CAP_FLAGS), key);
key = jhash_1word((peer->af_cap[afi][safi] & PEER_UPDGRP_AF_CAP_FLAGS),
key);
@@ -356,9 +359,12 @@ static unsigned int updgrp_hash_key_make(const void *p)
key = jhash_1word(peer->max_packet_size, key);
key = jhash_1word(peer->pmax_out[afi][safi], key);
- if (peer->as_path_loop_detection)
- key = jhash_2words(peer->as, peer->as_path_loop_detection, key);
+ if (CHECK_FLAG(peer->flags, PEER_FLAG_AS_LOOP_DETECTION))
+ key = jhash_2words(peer->as,
+ CHECK_FLAG(peer->flags,
+ PEER_FLAG_AS_LOOP_DETECTION),
+ key);
if (peer->group)
key = jhash_1word(jhash(peer->group->name,
strlen(peer->group->name), SEED1),
@@ -439,7 +445,7 @@ static unsigned int updgrp_hash_key_make(const void *p)
key = jhash_1word((peer->flags & PEER_FLAG_AIGP), key);
if (peer->soo[afi][safi]) {
- char *soo_str = ecommunity_str(peer->soo[afi][safi]);
+ const char *soo_str = ecommunity_str(peer->soo[afi][safi]);
key = jhash_1word(jhash(soo_str, strlen(soo_str), SEED1), key);
}
@@ -460,7 +466,11 @@ static unsigned int updgrp_hash_key_make(const void *p)
CHECK_FLAG(peer->af_cap[afi][safi],
PEER_UPDGRP_AF_CAP_FLAGS),
peer->v_routeadv, peer->change_local_as,
- peer->as_path_loop_detection);
+ !!CHECK_FLAG(peer->flags,
+ PEER_FLAG_AS_LOOP_DETECTION));
+ zlog_debug("%pBP Update Group Hash: addpath paths-limit: (send %u, receive %u)",
+ peer, peer->addpath_paths_limit[afi][safi].send,
+ peer->addpath_paths_limit[afi][safi].receive);
zlog_debug(
"%pBP Update Group Hash: max packet size: %u pmax_out: %u Peer Group: %s rmap out: %s",
peer, peer->max_packet_size, peer->pmax_out[afi][safi],
@@ -1722,18 +1732,6 @@ static int update_group_walkcb(struct hash_bucket *bucket, void *arg)
return ret;
}
-static int update_group_periodic_merge_walkcb(struct update_group *updgrp,
- void *arg)
-{
- struct update_subgroup *subgrp;
- struct update_subgroup *tmp_subgrp;
- const char *reason = arg;
-
- UPDGRP_FOREACH_SUBGRP_SAFE (updgrp, subgrp, tmp_subgrp)
- update_subgroup_check_merge(subgrp, reason);
- return UPDWALK_CONTINUE;
-}
-
/********************
* PUBLIC FUNCTIONS
********************/
@@ -2072,14 +2070,6 @@ void update_group_walk(struct bgp *bgp, updgrp_walkcb cb, void *ctx)
}
}
-void update_group_periodic_merge(struct bgp *bgp)
-{
- char reason[] = "periodic merge check";
-
- update_group_walk(bgp, update_group_periodic_merge_walkcb,
- (void *)reason);
-}
-
static int
update_group_default_originate_route_map_walkcb(struct update_group *updgrp,
void *arg)