HomeFreeBSD

Fix handling of large DHCP expiry values.

Description

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

Details

Provenance
n_hibmaAuthored on
Parents
rS317914: MFC: r317236
Branches
Unknown
Tags
Unknown