summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2025-01-11 21:36:45 +0100
committerJafar Al-Gharaibeh <jafar@atcorp.com>2025-01-13 17:18:24 +0100
commitc30a3ad8908fe81f825261ef9654cf3dc7d25301 (patch)
tree101fa52bbd19cab8d4949fa85e01974b9c1eb610 /pimd
parentMerge pull request #17829 from Jafaral/static-metric (diff)
downloadfrr-c30a3ad8908fe81f825261ef9654cf3dc7d25301.tar.xz
frr-c30a3ad8908fe81f825261ef9654cf3dc7d25301.zip
pimd: fix BSR RPs timing out
On the BSR node itself, RPs shouldn't timeout, becase we know the node is the BSR, and it is active! fixes:#17587 Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_bsm.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 6c4d64923..672cdffaa 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -354,24 +354,29 @@ static void pim_on_g2rp_timer(struct event *t)
bsrp = EVENT_ARG(t);
EVENT_OFF(bsrp->g2rp_timer);
bsgrp_node = bsrp->bsgrp_node;
-
- /* elapse time is the hold time of expired node */
- elapse = bsrp->rp_holdtime;
+ pim = bsgrp_node->scope->pim;
bsrp_addr = bsrp->rp_address;
- /* update elapse for all bsrp nodes */
- frr_each_safe (bsm_rpinfos, bsgrp_node->bsrp_list, bsrp_node) {
- bsrp_node->elapse_time += elapse;
-
- if (is_hold_time_elapsed(bsrp_node)) {
- bsm_rpinfos_del(bsgrp_node->bsrp_list, bsrp_node);
- pim_bsm_rpinfo_free(bsrp_node);
+ /*
+ * Update elapse for all bsrp nodes except on the BSR itself.
+ * The timer is meant to remove any bsr RPs learned from the BSR that
+ * we don't hear from anymore. on the BSR itself, no need to do this.
+ */
+ if (pim->global_scope.state != BSR_ELECTED) {
+ /* elapse time is the hold time of expired node */
+ elapse = bsrp->rp_holdtime;
+ frr_each_safe (bsm_rpinfos, bsgrp_node->bsrp_list, bsrp_node) {
+ bsrp_node->elapse_time += elapse;
+
+ if (is_hold_time_elapsed(bsrp_node)) {
+ bsm_rpinfos_del(bsgrp_node->bsrp_list, bsrp_node);
+ pim_bsm_rpinfo_free(bsrp_node);
+ }
}
}
/* Get the next elected rp node */
bsrp = bsm_rpinfos_first(bsgrp_node->bsrp_list);
- pim = bsgrp_node->scope->pim;
rn = route_node_lookup(pim->rp_table, &bsgrp_node->group);
if (!rn) {