On Wed, Nov 22, 2017 at 04:24:22PM +0100, Martin Pieuchot wrote: > Diff below implements 3/ because it seems the simplest approach to > me and reduce differences with ARP a bit further.
Yes. > void > -nd6_llinfo_settimer(struct llinfo_nd6 *ln, int secs) > +nd6_llinfo_settimer(struct llinfo_nd6 *ln, unsigned int secs) > { > - if (secs < 0) { > - ln->ln_rt->rt_expire = 0; > - timeout_del(&ln->ln_timer_ch); > - } else { > - ln->ln_rt->rt_expire = time_uptime + secs; > - timeout_add_sec(&ln->ln_timer_ch, secs); > + time_t expire = time_uptime + secs; > + > + ln->ln_rt->rt_expire = expire; > + if (!timeout_pending(&nd6_timer_to) || expire < nd6_timer_next) { > + nd6_timer_next = expire; > + timeout_add_sec(&nd6_timer_to, secs); > } > } The global nd6_timer_next is protected by the net lock. Should we put an NET_ASSERT_LOCKED() into nd6_llinfo_settimer()? OK bluhm@