[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140312.164814.33998602249906578.davem@davemloft.net>
Date: Wed, 12 Mar 2014 16:48:14 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: heiner.kallweit@....de
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: Avoid unnecessary temporary addresses being
generated
From: Heiner Kallweit <heiner.kallweit@....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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists