[Bug 289177] IPv6 temp address(es) with pltime=0 briefly loses deprecated on RA → OS may pick the old address as the source
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Aug 2025 21:16:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289177
Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zarychtam@plan-b.pwste.edu.
| |pl
--- Comment #1 from Marek Zarychta <zarychtam@plan-b.pwste.edu.pl> ---
(In reply to Dmitry Nexus from comment #0)
Nice catch, thanks for reporting. While the current mechanism probably deserves
a more thorough rewrite, this simple patch should at least fix the off-by-one
error. Does it resolve the issue for you?
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -358,11 +358,11 @@ extern const struct in6_addr
in6addr_linklocal_allv2routers;
#define IFA6_IS_DEPRECATED(a) \
((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
(a)->ia6_lifetime.ia6t_pltime)
#define IFA6_IS_INVALID(a) \
((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \
- (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \
+ (u_int32_t)((time_uptime - (a)->ia6_updatetime)) >= \
(a)->ia6_lifetime.ia6t_vltime)
#endif /* _KERNEL */
--
You are receiving this mail because:
You are the assignee for the bug.