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
Differential Revision: https://reviews.freebsd.org/D52323

(cherry picked from commit 588a5fad3e8b98955b60707e3e92b8b43566e3f7)

Details

Provenance
aeAuthored on Tue, Sep 16, 7:34 AM
Reviewer
zlei
Differential Revision
D52323: ip6: fix off-by-one in pltime and vltime expiration checks
Parents
rG4e0d2f1566b3: vm/vm_fault.c: update and split comments for vm_fault() and vm_fault_trap()
Branches
Unknown
Tags
Unknown