diff options
Diffstat (limited to 'pimd/pim_upstream.c')
| -rw-r--r-- | pimd/pim_upstream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 982fb7e5a5..cf5ea2fa53 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -29,6 +29,7 @@ #include "hash.h" #include "jhash.h" #include "wheel.h" +#include "network.h" #include "pimd.h" #include "pim_pim.h" @@ -1762,7 +1763,7 @@ void pim_upstream_start_register_stop_timer(struct pim_upstream *up, if (!null_register) { uint32_t lower = (0.5 * PIM_REGISTER_SUPPRESSION_PERIOD); uint32_t upper = (1.5 * PIM_REGISTER_SUPPRESSION_PERIOD); - time = lower + (random() % (upper - lower + 1)) + time = lower + (frr_weak_random() % (upper - lower + 1)) - PIM_REGISTER_PROBE_PERIOD; } else time = PIM_REGISTER_PROBE_PERIOD; @@ -2164,8 +2165,7 @@ void pim_upstream_init(struct pim_instance *pim) { char name[64]; - snprintf(name, 64, "PIM %s Timer Wheel", - pim->vrf->name); + snprintf(name, sizeof(name), "PIM %s Timer Wheel", pim->vrf->name); pim->upstream_sg_wheel = wheel_init(router->master, 31000, 100, pim_upstream_hash_key, pim_upstream_sg_running, name); |
