opnsense-src/sbin
Colin Percival 43d19e6a4c dhclient: Keep two clocks
Until July 2024, dhclient kept track of time as seconds-since-epoch as
a time_t.  This was a problem because (a) we wanted sub-second timeouts
and (b) timeouts didn't always do the right thing if the system clock
changed.

Switching to using CLOCK_MONOTONIC and struct timespec fixed those
issues but introduced a new problem: CLOCK_MONOTONIC values were being
intepreted as seconds-since-epoch and written to the dhclient.leases
file, causing confusion with DHCP leases expiring in early 1970.

Attempt to compromise between these by keeping track of both times;
any type within dhclient which is a time_t now refers to seconds past
the epoch, while any struct timespec value is a CLOCK_MONOTONIC time.

PR:	283256
Reviewed by:	dch
Fixes:	f0a38976b0 ("dhclient: Use clock_gettime() instead of time()")
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D49720
2025-04-12 19:09:56 -07:00
..
adjkerntz adjkerntz.8: minor cleanup (markup, spdx, reflow) 2024-07-29 14:06:06 -06:00
bectl Update Makefile.depend files 2024-10-14 10:26:17 -07:00
bsdlabel bsdlabel.8: Don't document how to create vinum partitions 2025-01-23 11:20:43 -05:00
camcontrol camcontrol: Bump timeout to get size of drive 2024-10-28 16:43:25 -06:00
ccdconfig ccdconfig.8: Bump Dd for gvinum removal 2025-01-23 11:20:43 -05:00
clri Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
comcontrol manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
conscontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ddb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
decryptcore Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devd devd: raise the maximum allowed client to 50 2025-03-20 09:56:51 +01:00
devfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devmatch devmatch: Catch truncated linker hints files 2024-10-23 22:12:45 +00:00
dhclient dhclient: Keep two clocks 2025-04-12 19:09:56 -07:00
dmesg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dump Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
dumpfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dumpon dumpon: Move the _Noreturn keyword before the return type 2025-01-09 13:07:51 -05:00
etherswitchcfg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdisk fdisk: Remove support for vinum volumes 2025-01-23 11:20:43 -05:00
ffsinfo Remove references to gvinum(8) in various manpages 2025-01-23 13:16:47 -05:00
fsck sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
fsck_ffs Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106 2025-01-30 17:31:08 -08:00
fsck_msdosfs fsck_msdosfs(8): Introduce -B option as no-op 2024-12-18 15:34:14 +01:00
fsdb sbin: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
fsirand Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
geom gvinum(8): Remove userland tool for managing vinum volumes 2025-01-23 11:20:43 -05:00
ggate manuals: Fix "skipping end of block" .Ed errors 2024-10-03 14:49:23 -03:00
growfs Remove references to gvinum(8) in various manpages 2025-01-23 13:16:47 -05:00
hastctl Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
hastd Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
ifconfig ifconfig: decode 256 bit CCM/GCM ciphers and 256 bit 802.1x/none keymgmt 2025-04-03 20:23:47 -07:00
init manuals: Fix "missing end of block" errors 2024-10-07 15:40:58 -03:00
ipf ipf: Correct ippool.5 man page 2025-03-04 12:39:07 -08:00
ipfw ipfw: migrate ipfw to 32-bit size rule numbers 2025-03-03 21:15:17 +03:00
kldconfig sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
kldload Add kenv .Xr in kldload(8) and loader.conf(5) 2023-12-20 21:17:38 -07:00
kldstat kldstat.8: Polish options 2025-01-21 14:55:27 -05:00
kldunload sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
ldconfig Canonicalize the name of the FreeBSD Foundation 2024-10-24 05:03:07 +08:00
md5 Update Makefile.depend files 2024-10-14 10:26:17 -07:00
mdconfig Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mdmfs Ensure that soft updates are not enabled by default when using mdmfs(8) 2024-10-03 08:06:28 -07:00
mknod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mksnap_ffs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount mount(8): Avoid truncation when fstab-formatting unionfs mount info 2024-12-29 18:39:49 -06:00
mount_cd9660 mount_cd9660.8: Bump .Dd for expanding mode mask bits 2024-12-07 10:45:26 -05:00
mount_fusefs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount_msdosfs man filesystems: fix xrefs after move to section 4 2024-05-16 10:25:29 -06:00
mount_nfs mount_nfs: make temporary DNS failure non-fatal with background mode 2025-03-28 14:36:40 -07:00
mount_nullfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount_udf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount_unionfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
natd natd: Enable support for EIM NAT 2024-12-06 09:21:06 +00:00
newfs Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
newfs_msdos src: Use gnu17 as the default C standard for userland instead of gnu99 2025-02-11 09:16:25 -05:00
nfsiod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nos-tun sbin/nos-tun: correct SIOCDIFADDR calls to use ifreq 2024-07-22 09:58:37 +00:00
nvmecontrol nvmecontrol: Add more keys for CA page (Additional smart data) 2025-02-21 17:23:44 -07:00
pfctl pfctl: route-to, dup-to, reply-to should not override the block action 2025-04-09 21:30:17 +02:00
pfilctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pflogd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pflowctl Update Makefile.depend files 2024-10-14 10:26:17 -07:00
ping ping.8: typo fix, indentifying -> identifying 2024-12-29 20:13:15 +00:00
quotacheck Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
rcorder rcorder(8): Fix grammar 2024-02-13 16:36:05 +08:00
reboot reboot.8: Xr reboot(2) 2025-04-12 17:02:08 +00:00
recoverdisk recoverdisk: Fix comparison between stripesize and sectorsize 2025-01-05 20:16:22 +00:00
resolvconf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
restore Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
route ipfw: migrate ipfw to 32-bit size rule numbers 2025-03-03 21:15:17 +03:00
routed Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rtsol Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
savecore savecore tests: Update to match output from savecore(8) 2025-01-24 14:32:36 +00:00
setkey setkey(8): document -hwif extension 2024-08-25 17:46:09 +03:00
shutdown shutdown: fix option sorting 2024-08-09 11:21:00 -05:00
swapon Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sysctl sysctl: Add a regression test which runs sysctl -a 2025-01-31 15:22:24 +00:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tunefs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
umbctl umb: Introduce the USB umb(4) network driver 2025-01-20 23:46:15 +00:00
umount manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
veriexec Add examples to veriexec(8) 2024-08-01 14:59:52 -07:00
zfsbootcfg zfsbootcfg(8), zpool_influxdb(8): move to the zfs package 2024-04-22 23:04:03 -06:00
Makefile gvinum(8): Remove userland tool for managing vinum volumes 2025-01-23 11:20:43 -05:00
Makefile.amd64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.arm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.i386 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.powerpc64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00