summaryrefslogtreecommitdiff
path: root/bgpd/bgp_updgrp.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-06-20 09:20:36 -0400
committerGitHub <noreply@github.com>2023-06-20 09:20:36 -0400
commit4d9fb376c8c4feab96a9ea53e5da9c7d3ba91da1 (patch)
tree3a50402c04d3883125c23614b8de1fb5ca63e6cf /bgpd/bgp_updgrp.c
parent554c2e0350f59bbdc4fb38fea91cafb13acdd319 (diff)
parent78981a80c7457b96e73c108280577d4cbb8aee03 (diff)
Merge pull request #13728 from opensourcerouting/fix/addpath_drop_non_best_addpaths
bgpd: Implement neighbor X addpath-tx-best-selected command
Diffstat (limited to 'bgpd/bgp_updgrp.c')
-rw-r--r--bgpd/bgp_updgrp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index a642be935d..0fe6180bea 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -142,6 +142,8 @@ static void conf_copy(struct peer *dst, struct peer *src, afi_t afi,
dst->afc_nego[afi][safi] = src->afc_nego[afi][safi];
dst->orf_plist[afi][safi] = src->orf_plist[afi][safi];
dst->addpath_type[afi][safi] = src->addpath_type[afi][safi];
+ dst->addpath_best_selected[afi][safi] =
+ src->addpath_best_selected[afi][safi];
dst->local_as = src->local_as;
dst->change_local_as = src->change_local_as;
dst->shared_network = src->shared_network;
@@ -307,6 +309,7 @@ static void *updgrp_hash_alloc(void *p)
* 16. Local-as should match, if configured.
* 17. maximum-prefix-out
* 18. Local-role should also match, if configured.
+ * 19. Add-Path best selected paths count should match as well
* )
*/
static unsigned int updgrp_hash_key_make(const void *p)
@@ -340,6 +343,7 @@ static unsigned int updgrp_hash_key_make(const void *p)
key = jhash_1word((peer->flags & PEER_UPDGRP_FLAGS), key);
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->cap & PEER_UPDGRP_CAP_FLAGS), key);
key = jhash_1word((peer->af_cap[afi][safi] & PEER_UPDGRP_AF_CAP_FLAGS),
key);