Skip to content
Permalink
Browse files

net: trickle: Re-init trickle timer for multiple triggerings

We need to re-initialize the trickle->timer delayed work to use
trickle_timeout() if there are multiple triggerings.

Fixes #15606

Signed-off-by: ling wei <lingwei@cisco.com>
  • Loading branch information...
lingwei901011 authored and jukkar committed Apr 24, 2019
1 parent f65727a commit cdebd81994eaaf3309876b796edc41263c33c990
Showing with 3 additions and 1 deletion.
  1. +3 −1 subsys/net/ip/trickle.c
@@ -21,6 +21,8 @@ LOG_MODULE_REGISTER(net_trickle, CONFIG_NET_TRICKLE_LOG_LEVEL);

#define TICK_MAX ~0

static void trickle_timeout(struct k_work *work);

static inline bool is_suppression_disabled(struct net_trickle *trickle)
{
return trickle->k == NET_TRICKLE_INFINITE_REDUNDANCY;
@@ -77,7 +79,7 @@ static void double_interval_timeout(struct k_work *work)
NET_DBG("doubling time %u", rand_time);

trickle->Istart = k_uptime_get_32() + rand_time;

k_delayed_work_init(&trickle->timer, trickle_timeout);
k_delayed_work_submit(&trickle->timer, rand_time);

NET_DBG("last end %u new end %u for %u I %u",

0 comments on commit cdebd81

Please sign in to comment.
You can’t perform that action at this time.