summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-04-27 21:15:20 +0300
committerGitHub <noreply@github.com>2024-04-27 21:15:20 +0300
commitfe88c8425fcf4740624fa0d7a489a0ed6514ae7c (patch)
tree3d3c83efab6a14fe7d4b42c1ef5aceab73fc4f45
parent5a8fbcedeeacf52cc32f7403b48bbe934031b943 (diff)
parent0d9ccb99186c52263cda6db956a26d7249905a66 (diff)
Merge pull request #15857 from FRRouting/mergify/bp/stable/9.1/pr-15848
pimd: fix crash unconfiguring rp keepalive timer (backport #15848)
-rw-r--r--pimd/pim_cmd_common.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c
index c3eb49d5f3..9fb06ec8ab 100644
--- a/pimd/pim_cmd_common.c
+++ b/pimd/pim_cmd_common.c
@@ -286,8 +286,15 @@ int pim_process_no_rp_kat_cmd(struct vty *vty)
sizeof(rs_timer_xpath));
/* RFC4601 */
- v = yang_dnode_get_uint16(vty->candidate_config->dnode, "%s",
- rs_timer_xpath);
+ /* Check if register suppress time is configured or assigned
+ * the default register suppress time.
+ */
+ if (yang_dnode_exists(vty->candidate_config->dnode, rs_timer_xpath))
+ v = yang_dnode_get_uint16(vty->candidate_config->dnode, "%s",
+ rs_timer_xpath);
+ else
+ v = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
+
v = 3 * v + PIM_REGISTER_PROBE_TIME_DEFAULT;
if (v > UINT16_MAX)
v = UINT16_MAX;