]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix handling of large DHCP expiry values.
authorn_hibma <n_hibma@FreeBSD.org>
Sun, 7 May 2017 19:59:37 +0000 (19:59 +0000)
committern_hibma <n_hibma@FreeBSD.org>
Sun, 7 May 2017 19:59:37 +0000 (19:59 +0000)
commit1260ccd59c40788552b3a84a25bff3822f6438de
tree914256d0649145030ecbc894a0dbee3d17915350
parentca682b7f08afd67e44ec5690f5a6cae7474f7b48
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
Reported by: Bob Eager
MFC after: 2 weeks
sbin/dhclient/dhclient.c