From: Heiner Kallweit <heiner.kallweit@web.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: Avoid unnecessary temporary addresses being generated
Date: Wed, 12 Mar 2014 22:16:08 +0100 [thread overview]
Message-ID: <5320CE98.6010701@web.de> (raw)
In-Reply-To: <20140312.164814.33998602249906578.davem@davemloft.net>
You're right. Fixed it and submitted v2 of patch.
> From: Heiner Kallweit <heiner.kallweit@web.de>
> Date: Wed, 12 Mar 2014 20:53:48 +0100
>
>> @@ -1103,8 +1103,11 @@ retry:
>> * Lifetime is greater than REGEN_ADVANCE time units. In particular,
>> * an implementation must not create a temporary address with a zero
>> * Preferred Lifetime.
>> + * Use age calculation as in addrconf_verify to avoid unnecessary
>> + * temporary addresses being generated.
>> */
>> - if (tmp_prefered_lft <= regen_advance) {
>> + age = (now - ifp->tstamp + ADDRCONF_TIMER_FUZZ_MINUS) / HZ;
>> + if (tmp_prefered_lft <= regen_advance + age) {
> I think you must use tmp_tstamp here, we snapshot all of the values
> above into local variables while holding the lock so that we calculate
> a consistent set of values and tests.
>
prev parent reply other threads:[~2014-03-12 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 19:53 [PATCH] ipv6: Avoid unnecessary temporary addresses being generated Heiner Kallweit
2014-03-12 20:48 ` David Miller
2014-03-12 21:16 ` Heiner Kallweit [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5320CE98.6010701@web.de \
--to=heiner.kallweit@web.de \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).