[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2c2e4c0e5c0413c9697b8924d6ccae8fe357ee74.camel@redhat.com>
Date: Tue, 30 Jan 2024 11:46:14 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Alex Henrie <alexhenrie24@...il.com>, netdev@...r.kernel.org,
dan@...m.net, bagasdotme@...il.com, davem@...emloft.net,
dsahern@...nel.org, edumazet@...gle.com, kuba@...nel.org, jikos@...nel.org
Subject: Re: [PATCH net-next] net: ipv6/addrconf: make regen_advance
independent of retrans time
On Wed, 2024-01-24 at 20:57 -0700, Alex Henrie wrote:
> In RFC 4941, REGEN_ADVANCE is a constant value of 5 seconds, and the RFC
> does not permit the creation of temporary addresses with lifetimes
> shorter than that:
>
> > When processing a Router Advertisement with a Prefix
> > Information option carrying a global scope prefix for the purposes of
> > address autoconfiguration (i.e., the A bit is set), the node MUST
> > perform the following steps:
>
> > 5. A temporary address is created only if this calculated Preferred
> > Lifetime is greater than REGEN_ADVANCE time units.
>
> Moreover, using a non-constant regen_advance has undesirable side
> effects. If regen_advance swelled above temp_prefered_lft,
> ipv6_create_tempaddr would error out without creating any new address.
RFC 4941 has been obsoleted by RFC 8981, which in turns makes
REGEN_ADVANCE non constant:
3.8. Defined Protocol Parameters and Configuration Variables
REGEN_ADVANCE
2 + (TEMP_IDGEN_RETRIES * DupAddrDetectTransmits * RetransTimer /
1000)
> On my machine and network, this error happened immediately with the
> preferred lifetime set to 1 second, after a few minutes with the
> preferred lifetime set to 4 seconds, and not at all with the preferred
> lifetime set to 5 seconds. During my investigation, I found a Stack
> Exchange post from another person who seems to have had the same
> problem: They stopped getting new addresses if they lowered the
> preferred lifetime below 3 seconds, and they didn't really know why.
>
> Some users want to change their IPv6 address as frequently as possible
> regardless of the RFC's arbitrary minimum lifetime. For the benefit of
> those users, add a regen_advance sysctl parameter that can be set to
> below or above 5 seconds.
I guess we can't accommodate every user desire while speaking the same
protocol.
Perhaps emitting a kernel message when user settings do not allow the
address regeneration could be a better option?
Cheers,
Paolo
Powered by blists - more mailing lists