diff options
author | des <des@FreeBSD.org> | 2004-07-06 15:15:14 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-07-06 15:15:14 +0000 |
commit | 7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c (patch) | |
tree | 5afe645c04263acc3cc4605480900b5778e8ad15 /contrib/isc-dhcp/includes | |
parent | 2820cb04742e5041387dcda61f326a7da26b569e (diff) | |
download | FreeBSD-src-7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c.zip FreeBSD-src-7c905c6c6ca553210ff7dcc2a016e4aaf7d3750c.tar.gz |
Fix a number of incorrect assumptions regarding the size of time_t.
The code has its own TIME type, which is actually defined to time_t,
but it still used u_int32_t in some places.
In addition, dhclient not only had two separate global cur_time
variables, one of which was defined as u_int32_t and the other as
TIME, but cur_time was sometimes shadowed by local variables, leading
to widespread confusion as to which of these variable was being
referenced.
There is a lesson in here somewhere: a decent compiler with warnings
enabled should have caught all of this long before it became a
problem.
This patch has been submitted to the vendor, but it will likely be
some time before they release a version that includes it.
Approved by: mbr
Diffstat (limited to 'contrib/isc-dhcp/includes')
-rw-r--r-- | contrib/isc-dhcp/includes/dhcpd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/isc-dhcp/includes/dhcpd.h b/contrib/isc-dhcp/includes/dhcpd.h index 90bbc51..37f9a8e 100644 --- a/contrib/isc-dhcp/includes/dhcpd.h +++ b/contrib/isc-dhcp/includes/dhcpd.h @@ -335,7 +335,7 @@ struct lease_state { struct option_state *options; struct data_string parameter_request_list; int max_message_size; - u_int32_t expiry, renewal, rebind; + TIME expiry, renewal, rebind; struct data_string filename, server_name; int got_requested_address; int got_server_identifier; @@ -1764,7 +1764,7 @@ int if_readsocket PROTO ((omapi_object_t *)); void reinitialize_interfaces PROTO ((void)); /* dispatch.c */ -void set_time (u_int32_t); +void set_time (TIME); struct timeval *process_outstanding_timeouts (struct timeval *); void dispatch PROTO ((void)); isc_result_t got_one PROTO ((omapi_object_t *)); |