]> git.hungrycats.org Git - linux/commit
net/ipv6: delete temporary address if mngtmpaddr is removed or unmanaged
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 20 Nov 2024 09:51:07 +0000 (09:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 13:02:32 +0000 (14:02 +0100)
commitcb74207ef98317f8874a0b9780bb339c2eb700b0
tree2cc90d6a8a28e03cd9906d2906ee3f367c56ccf8
parentac774812a9625c835d30b0711d1fc3c7bbb61abb
net/ipv6: delete temporary address if mngtmpaddr is removed or unmanaged

[ Upstream commit 00b5b7aab9e422d00d5a9d03d7e0760a76b5d57f ]

RFC8981 section 3.4 says that existing temporary addresses must have their
lifetimes adjusted so that no temporary addresses should ever remain "valid"
or "preferred" longer than the incoming SLAAC Prefix Information. This would
strongly imply in Linux's case that if the "mngtmpaddr" address is deleted or
un-flagged as such, its corresponding temporary addresses must be cleared out
right away.

But now the temporary address is renewed even after â€˜mngtmpaddr’ is removed
or becomes unmanaged as manage_tempaddrs() set temporary addresses
prefered/valid time to 0, and later in addrconf_verify_rtnl() all checkings
failed to remove the addresses. Fix this by deleting the temporary address
directly for these situations.

Fixes: 778964f2fdf0 ("ipv6/addrconf: fix timing bug in tempaddr regen")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/addrconf.c