HomeFreeBSD

IPv6: fix off-by-one in pltime and vltime expiration checks

Description

IPv6: fix off-by-one in pltime and vltime expiration checks

Previously, the macros used '>' instead of '>=' when comparing elapsed
time against the preferred and valid lifetimes. This caused any deprecated
address to become usable again for one extra second after receiving each
Router Advertisement. In that short window, the address could be
selected as a source for outgoing connections.

Update the checks to use '>=' so that addresses are deprecated or
invalid when their lifetime expires.

PR: 289177
Reported by: Dmitry Nexus <fbsd.4f6a at nexus tel>
Reviewed by: zlei
Submitted by: Marek Zarychta
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52323

Details

Provenance
aeAuthored on Sep 16 2025, 7:34 AM
Reviewer
zlei
Differential Revision
D52323: ip6: fix off-by-one in pltime and vltime expiration checks
Parents
rGeffcd0ded0ef: bhyve: assign a valid INTPIN to NVIDIA GPUs
Branches
Unknown
Tags
Unknown