Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Sam Edwards <cfsworks@gmail.com>, Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Shuah Khan" <shuah@kernel.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	"Maciej Żenczykowski" <maze@google.com>,
	"Xiao Ma" <xiaom@google.com>
Subject: Re: [PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr
Date: Fri, 15 Nov 2024 14:51:14 -0800	[thread overview]
Message-ID: <80785a22-26de-4466-af44-5aee85a056fe@kernel.org> (raw)
In-Reply-To: <CAH5Ym4hcguhXvJvVuANns7Q9VTOWR-SxHSdD55rR5BWhWeg2Ow@mail.gmail.com>

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@google.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@gmail.com>
Date:   Tue Feb 13 23:26:32 2024 -0700

    net: ipv6/addrconf: clamp preferred_lft to the minimum required

  reply	other threads:[~2024-11-15 22:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 12:51 [PATCH net 0/2] ipv6: fix temporary address not removed correctly Hangbin Liu
2024-11-13 12:51 ` [PATCH net 1/2] net/ipv6: delete temporary address if mngtmpaddr is removed or un-mngtmpaddr Hangbin Liu
2024-11-13 21:03   ` Sam Edwards
2024-11-14  7:38     ` Hangbin Liu
2024-11-15 20:46       ` Sam Edwards
2024-11-15 22:51         ` David Ahern [this message]
2024-11-19  7:52         ` Hangbin Liu
2024-11-13 12:51 ` [PATCH net 2/2] selftests/rtnetlink.sh: add mngtempaddr test Hangbin Liu
2024-11-13 19:56   ` Jakub Kicinski
2024-11-14  2:00     ` Hangbin Liu
2024-11-14  2:43       ` Jakub Kicinski
2024-11-14  8:19         ` Hangbin Liu
2024-11-14 15:13           ` Jakub Kicinski
2024-11-18  1:19             ` Hangbin Liu
2024-11-13 20:43   ` Sam Edwards
2024-11-14  8:46     ` Hangbin Liu
2024-11-15 20:59       ` Sam Edwards
2024-11-19  8:23         ` Hangbin Liu

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=80785a22-26de-4466-af44-5aee85a056fe@kernel.org \
    --to=dsahern@kernel.org \
    --cc=cfsworks@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=xiaom@google.com \
    /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