Skip to content

Commit

Permalink
Merge pull request #15857 from FRRouting/mergify/bp/stable/9.1/pr-15848
Browse files Browse the repository at this point in the history
pimd: fix crash unconfiguring rp keepalive timer (backport #15848)
  • Loading branch information
ton31337 committed Apr 27, 2024
2 parents 5a8fbce + 0d9ccb9 commit fe88c84
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pimd/pim_cmd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fe88c84

Please sign in to comment.