[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80785a22-26de-4466-af44-5aee85a056fe@kernel.org>
Date: Fri, 15 Nov 2024 14:51:14 -0800
From: David Ahern <dsahern@...nel.org>
To: Sam Edwards <cfsworks@...il.com>, Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, Maciej Żenczykowski
<maze@...gle.com>, Xiao Ma <xiaom@...gle.com>
Subject: Re: [PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr
is removed or un-mngtmpaddr
On 11/15/24 1:46 PM, Sam Edwards wrote:
> Hi Hangbin,
>
> It took me a while to grasp but the problem seems to be a confusion
> about what it means to set a temporary's lifetimes to 0/0:
> 1) "The mngtmpaddrs has gone away; this temporary is slated for
> deletion by addrconf_verify_rtnl()"
> 2) "This temporary address itself shall no longer be used, regenerate
> it immediately."
>
> The existing behavior makes sense for the #2 case, but not for the #1
> case. It seems sensible to me to keep the #2 behavior as-is, because
> userspace might be setting a 0/0 lifetime to forcibly rotate the
> temporary.
>
> So it sounds like (at least) one of three fixes is in order:
> a) Make ipv6_create_tempaddr() verify that the `ifp` is (still)
> alive+mngtmpaddrs, returning with an error code if not.
> b) Look at the 3 callsites for ipv6_create_tempaddr() and add the
> above verifications before calling.
> c) Add a function that calls ipv6_del_addr(temp) for every temporary
> with a specified ifpub, and use it instead of manage_tempaddrs(..., 0,
> 0, false, ...) when deleting/unflagging a mngtmpaddrs.
>
> Personally I like option C the best. What are your thoughts?
>
> Cheers,
Off the top of my head regarding recent changes, please include Maciej:
commit 69172f0bcb6a09110c5d2a6d792627f5095a9018
Author: Maciej Żenczykowski <maze@...gle.com>
Date: Thu Jul 20 09:00:22 2023 -0700
ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new
temporary address
and Alex in discussions around changes to temp addresses
commit f4bcbf360ac8dc424dc4d2b384b528e69b6f34d9
Author: Alex Henrie <alexhenrie24@...il.com>
Date: Tue Feb 13 23:26:32 2024 -0700
net: ipv6/addrconf: clamp preferred_lft to the minimum required
Powered by blists - more mailing lists