]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC:
authorn_hibma <n_hibma@FreeBSD.org>
Mon, 22 May 2017 10:28:17 +0000 (10:28 +0000)
committern_hibma <n_hibma@FreeBSD.org>
Mon, 22 May 2017 10:28:17 +0000 (10:28 +0000)
commit1f2961e6aa280c022a8e33b13e4364467dd0b009
treef2b66c2c879c11e56e22c4ae6934e8abcfcda534
parent23dcad981553a6eed093a676a47643e37b8de63b
MFC:

------------------------------------------------------------------------
r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines

Fix the output of very large rebind, renew and lease time options in
lease file.

Some routers set very large values for rebind time (Netgear) and these
are erroneously reported as negative in the leasefile. This was due to a
wrong printf format specification of %ld for an unsigned long on 32-bit
platforms.

------------------------------------------------------------------------
r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines

Fix handling of large DHCP expiry values.

They would overflow a signed 32-bit time_t on 32 bit architectures. This
was taken care of, but a compiler optimisation makes this behave
erratically. This could be resolved by adding a -fwrapv flag, but
instead we can check the value before adding the current timestamp to
it.

In the lease file values are still wrong though:

option dhcp-rebinding-time -644245096;

PR: 218980
sbin/dhclient/dhclient.c
sbin/dhclient/options.c