case NB_EV_ABORT:
break;
case NB_EV_APPLY:
- router->register_suppress_time =
- yang_dnode_get_uint16(args->dnode, NULL);
+ pim_update_suppress_timers(
+ yang_dnode_get_uint16(args->dnode, NULL));
break;
}
&up->t_join_timer);
}
+void pim_update_suppress_timers(uint32_t suppress_time)
+{
+ struct pim_instance *pim;
+ struct vrf *vrf;
+ unsigned int old_rp_ka_time;
+
+ /* stash the old one so we know which values were manually configured */
+ old_rp_ka_time = (3 * router->register_suppress_time
+ + router->register_probe_time);
+ router->register_suppress_time = suppress_time;
+
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ pim = vrf->info;
+ if (!pim)
+ continue;
+
+ /* Only adjust if not manually configured */
+ if (pim->rp_keep_alive_time == old_rp_ka_time)
+ pim->rp_keep_alive_time = PIM_RP_KEEPALIVE_PERIOD;
+ }
+}
+
void pim_upstream_join_suppress(struct pim_upstream *up,
struct in_addr rpf_addr, int holdtime)
{
void pim_upstream_update_join_desired(struct pim_instance *pim,
struct pim_upstream *up);
+void pim_update_suppress_timers(uint32_t suppress_time);
void pim_upstream_join_suppress(struct pim_upstream *up,
struct in_addr rpf_addr, int holdtime);