net: ipv6/addrconf: clamp preferred_lft to the maximum allowed
authorAlex Henrie <alexhenrie24@gmail.com>
Tue, 24 Oct 2023 21:23:07 +0000 (15:23 -0600)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Oct 2023 01:23:06 +0000 (18:23 -0700)
commitbfbf81b31093e0dc3d61b390a9bd0904d3bf5374
tree8e70c55912babaf5ec60949e6de23d067602bc4c
parentd8c4ef76d7ccd478f8c9a3b7de1ba0b25fdffbee
net: ipv6/addrconf: clamp preferred_lft to the maximum allowed

Without this patch, there is nothing to stop the preferred lifetime of a
temporary address from being greater than its valid lifetime. If that
was the case, the valid lifetime was effectively ignored.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20231024212312.299370-2-alexhenrie24@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/addrconf.c