Page MenuHomeFreeBSD

nd6: Break nd6_prefix_lifetime_update out of prelist_update
ClosedPublic

Authored by pouria on Mar 28 2026, 8:14 PM.
Tags
None
Referenced Files
F157127896: D56135.id174803.diff
Mon, May 18, 3:26 PM
F157127039: D56135.id174803.diff
Mon, May 18, 3:22 PM
F157004939: D56135.id175799.diff
Sun, May 17, 10:10 PM
F157004194: D56135.id175799.diff
Sun, May 17, 10:05 PM
F157004193: D56135.id175799.diff
Sun, May 17, 10:05 PM
Unknown Object (File)
Fri, May 15, 10:18 PM
Unknown Object (File)
Fri, May 15, 2:21 PM
Unknown Object (File)
Fri, May 15, 2:20 PM
Subscribers

Details

Summary

Logic of updating prefix lifetime is big enough that deserves
its own function.
While here, fix style.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pouria retitled this revision from ndp: Break nd6_prefix_lifetime_update out of prelist_update to nd6: Break nd6_prefix_lifetime_update out of prelist_update.Apr 1 2026, 4:36 PM
sys/netinet6/nd6_rtr.c
1608

These lines look too long. I think you can simplify the code a bit by storing time_uptime - ia6->ia6_createtime in a local variable.

pouria marked an inline comment as done.

Address @markj comment.
Thank you

sys/netinet6/nd6_rtr.c
1608

Further simplification: set vltime = time_uptime - ia6->ia6_createtime + V_ip6_desync_factor.

markj added inline comments.
sys/netinet6/nd6_rtr.c
1556
This revision is now accepted and ready to land.Apr 17 2026, 12:45 PM