Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/net
Module Name: src
Committed By: riastradh
Date: Wed Jun 24 15:30:45 UTC 2026
Modified Files:
src/sys/net: if_spppsubr.c if_spppvar.h
Log Message:
ppp(4): Use 32-bit timeouts, not 64-bit timeouts.
The timeouts are checked every 15sec so there is no real need to
record starting and ending times in units of seconds with more than 5
bits of precision. So 32-bit starting and ending times are more than
enough. And there is surely no need for decades-long timeouts.
1. Clamp the timeouts in SPPPSETIDLETO(struct spppidletimeout) and
SPPPSETKEEPALIVE(struct spppkeepalivesettings) to INT32_MAX/2,
which is over 34 years worth of seconds.
(We should never have spent any effort on time_t compat for these:
we should have just left them at 32-bit! Oh well.)
2. Use time_uptime32, not time_uptime, since 32-bit unsigned
arithmetic is large enough to handle all the differences we will
encounter when timeouts are clamped to INT32_MAX/2 without any
risk of trouble from wraparound.
PR kern/60364: if_spppsubr.c uses nonportable 64-bit atomics
To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.52 -r1.53 src/sys/net/if_spppvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index