diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-06-28 09:50:14 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-06-28 09:50:14 +0000 |
commit | 70ee2ec687944003013cabbe32350735391135bc (patch) | |
tree | bb70496af6e1259e9cfe606cac448c7a31ee9ec7 /net-misc/dhcp/files | |
parent | Stable on ppc64; bug #137622 (diff) | |
download | historical-70ee2ec687944003013cabbe32350735391135bc.tar.gz historical-70ee2ec687944003013cabbe32350735391135bc.tar.bz2 historical-70ee2ec687944003013cabbe32350735391135bc.zip |
Added patch to fix 64 bit DHCP servers, #133905.
Package-Manager: portage-2.1.1_pre1-r3
Diffstat (limited to 'net-misc/dhcp/files')
-rw-r--r-- | net-misc/dhcp/files/dhcp-3.0.4-64bit.patch | 91 | ||||
-rw-r--r-- | net-misc/dhcp/files/digest-dhcp-3.0.4-r2 | 3 |
2 files changed, 94 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcp-3.0.4-64bit.patch b/net-misc/dhcp/files/dhcp-3.0.4-64bit.patch new file mode 100644 index 000000000000..81f50f2f3316 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-3.0.4-64bit.patch @@ -0,0 +1,91 @@ +# Fix 64 bit machines, Gentoo bug #133905 + +--- dhcp-3.0.4/includes/dhcpd.h ++++ dhcp-3.0.4/includes/dhcpd.h +@@ -339,7 +339,7 @@ + struct option_state *options; + struct data_string parameter_request_list; + int max_message_size; +- TIME expiry, renewal, rebind; ++ unsigned char expiry[4], renewal[4], rebind[4]; + struct data_string filename, server_name; + int got_requested_address; + int got_server_identifier; +--- dhcp-3.0.4/server/dhcp.c ++++ dhcp-3.0.4/server/dhcp.c +@@ -34,7 +34,7 @@ + + #ifndef lint + static char copyright[] = +-"$Id: dhcp-3.0.4-64bit.patch,v 1.1 2006/06/28 09:50:14 uberlord Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; ++"$Id: dhcp-3.0.4-64bit.patch,v 1.1 2006/06/28 09:50:14 uberlord Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; + #endif /* not lint */ + + #include "dhcpd.h" +@@ -2442,18 +2442,15 @@ + offered_lease_time = + state -> offered_expiry - cur_time; + +- putULong ((unsigned char *)&state -> expiry, +- (unsigned long)offered_lease_time); ++ putULong(state->expiry, (u_int32_t)offered_lease_time); + i = DHO_DHCP_LEASE_TIME; + if (lookup_option (&dhcp_universe, state -> options, i)) + log_error ("dhcp-lease-time option for %s overridden.", + inet_ntoa (state -> ciaddr)); + oc = (struct option_cache *)0; + if (option_cache_allocate (&oc, MDL)) { +- if (make_const_data (&oc -> expression, +- (unsigned char *)&state -> expiry, +- sizeof state -> expiry, +- 0, 0, MDL)) { ++ if (make_const_data(&oc->expression, state->expiry, ++ 4, 0, 0, MDL)) { + oc -> option = dhcp_universe.options [i]; + save_option (&dhcp_universe, + state -> options, oc); +@@ -2463,19 +2460,15 @@ + + /* Renewal time is lease time * 0.5. */ + offered_lease_time /= 2; +- putULong ((unsigned char *)&state -> renewal, +- (unsigned long)offered_lease_time); ++ putULong(state->renewal, (u_int32_t)offered_lease_time); + i = DHO_DHCP_RENEWAL_TIME; + if (lookup_option (&dhcp_universe, state -> options, i)) + log_error ("overriding dhcp-renewal-time for %s.", + inet_ntoa (state -> ciaddr)); + oc = (struct option_cache *)0; + if (option_cache_allocate (&oc, MDL)) { +- if (make_const_data (&oc -> expression, +- (unsigned char *) +- &state -> renewal, +- sizeof state -> renewal, +- 0, 0, MDL)) { ++ if (make_const_data(&oc->expression, state->renewal, ++ 4, 0, 0, MDL)) { + oc -> option = dhcp_universe.options [i]; + save_option (&dhcp_universe, + state -> options, oc); +@@ -2486,18 +2479,15 @@ + /* Rebinding time is lease time * 0.875. */ + offered_lease_time += (offered_lease_time / 2 + + offered_lease_time / 4); +- putULong ((unsigned char *)&state -> rebind, +- (unsigned)offered_lease_time); ++ putULong(state->rebind, (u_int32_t)offered_lease_time); + i = DHO_DHCP_REBINDING_TIME; + if (lookup_option (&dhcp_universe, state -> options, i)) + log_error ("overriding dhcp-rebinding-time for %s.", + inet_ntoa (state -> ciaddr)); + oc = (struct option_cache *)0; + if (option_cache_allocate (&oc, MDL)) { +- if (make_const_data (&oc -> expression, +- (unsigned char *)&state -> rebind, +- sizeof state -> rebind, +- 0, 0, MDL)) { ++ if (make_const_data(&oc->expression, state->rebind, ++ 4, 0, 0, MDL)) { + oc -> option = dhcp_universe.options [i]; + save_option (&dhcp_universe, + state -> options, oc); diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4-r2 b/net-misc/dhcp/files/digest-dhcp-3.0.4-r2 new file mode 100644 index 000000000000..03ec8dae9fa3 --- /dev/null +++ b/net-misc/dhcp/files/digest-dhcp-3.0.4-r2 @@ -0,0 +1,3 @@ +MD5 004ef935fd54b8046b16bdde31a9e151 dhcp-3.0.4.tar.gz 883245 +RMD160 f5636d87e1e2138bd239157f54d8f73c73af73ac dhcp-3.0.4.tar.gz 883245 +SHA256 89171155b7a9225f5eb81c83ff63f071168b87eacab05fb859b8397d36809bf7 dhcp-3.0.4.tar.gz 883245 |