We are again considering a 3.0.1 final stamp on a version we have made some small modifications to. This makes us queasy, so we want to take a few extra steps as precautions. And that's where dhcp-hackers come in. I'd greatly appreciate test compiling this on any odd systems you have lying around, if you can't run them in production. All of the changes, as you can see below, are pretty much work-or-fail-to-compile type changes. Some of which you've already seen. ftp://ftp.isc.org/private/9caf86163e5953ba33873e47ba4028b6/dhcp-3.0.1.tar.gz As an extra precaution, this is the diff from rc14. If you could take a moment to peruse it, I'd appreciate the extra peer review. === V3.0.1RC14 -> V3.0.1-HACKERS patch Index: DHCP/README diff -u DHCP/README:1.71.2.29 DHCP/README:1.71.2.30 --- DHCP/README:1.71.2.29 Wed Jun 16 23:18:25 2004 +++ DHCP/README Sat Jul 10 00:11:15 2004 @@ -1,6 +1,7 @@ Internet Systems Consortium DHCP Distribution - Version 3.0.1rc14 - June 09, 2004 + Version 3.0.1 + [dhcp-hackers prerelease] + July 09, 2004 README FILE @@ -96,8 +97,7 @@ RELEASE STATUS -This is fourteenth release candidate of version 3.0.1 of the ISC DHCP -Distribution. +This is release version 3.0.1 of the ISC DHCP Distribution. In this release, the server and relay agent are currently fully functional on NetBSD, Linux systems with kernel version 2.2 or later, @@ -140,17 +140,17 @@ To build the DHCP Distribution, unpack the compressed tar file using the tar utility and the gzip command - type something like: - zcat dhcp-3.0.1rc14.tar.gz |tar xvf - + zcat dhcp-3.0.1.tar.gz |tar xvf - On BSD/OS, you have to type gzcat, not zcat, and you may run into similar problems on other operating systems. CONFIGURING IT -Now, cd to the dhcp-3.0.1rc14 subdirectory that you've just -created and configure the source tree by typing: +Now, cd to the dhcp-3.0.1 subdirectory that you've just created and +configure the source tree by typing: - ./configure + ./configure If the configure utility can figure out what sort of system you're running on, it will create a custom Makefile for you for that Index: DHCP/RELNOTES diff -u DHCP/RELNOTES:1.59.2.53 DHCP/RELNOTES:1.59.2.54 --- DHCP/RELNOTES:1.59.2.53 Thu Jun 17 20:54:38 2004 +++ DHCP/RELNOTES Sat Jul 10 00:11:15 2004 @@ -1,6 +1,7 @@ Internet Systems Consortium DHCP Distribution - Version 3.0.1rc14 - June 09, 2004 + Version 3.0.1 + [dhcp-hackers prerelease] + July 09, 2004 Release Notes @@ -42,6 +43,25 @@ Murrell at BC Tel Advanced Communications. I'd like to express my thanks to all of these good people here, both for working on the code and for prodding me into improving it. + + Changes since 3.0.1rc14 + +- The global variable 'cur_time' was centralized and is now uniformly of a + type #defined in system-dependent headers. It had previously been defined + in one of many places as a 32-bit value, and this causes mayhem on 64-bit + big endian systems. It probably wasn't too healthy on little endian + systems either. + +- A printf format string error introduced in rc14 was repaired. + +- AIX system-dependent header file was altered to only define NO_SNPRINTF + if the condition used to #ifdef in vsnprintf in AIX' header files + is false. + +- The Alpha/OSF system-dependent header file was altered to define + NO_SNPRINTF on OS revisions older than 4.0G. + +- omapip/test.c had string.h added to its includes. Changes since 3.0.1rc13 Index: DHCP/client/dhclient.c diff -u DHCP/client/dhclient.c:1.129.2.18 DHCP/client/dhclient.c:1.129.2.19 --- DHCP/client/dhclient.c:1.129.2.18 Thu Jun 10 17:59:12 2004 +++ DHCP/client/dhclient.c Sat Jul 10 00:11:16 2004 @@ -32,13 +32,12 @@ #ifndef lint static char ocopyright[] = -"$Id: dhclient.c,v 1.129.2.18 2004/06/10 17:59:12 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.129.2.19 2004/07/10 00:11:16 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" #include "version.h" -TIME cur_time; TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ Index: DHCP/includes/version.h diff -u DHCP/includes/version.h:1.49.2.27 DHCP/includes/version.h:1.49.2.28 --- DHCP/includes/version.h:1.49.2.27 Wed Jun 16 23:18:27 2004 +++ DHCP/includes/version.h Sat Jul 10 00:11:16 2004 @@ -1,3 +1,3 @@ /* Current version of ISC DHCP Distribution. */ -#define DHCP_VERSION "V3.0.1rc14" +#define DHCP_VERSION "V3.0.1-hackers" Index: DHCP/includes/cf/aix.h diff -u DHCP/includes/cf/aix.h:1.6.2.3 DHCP/includes/cf/aix.h:1.6.2.4 --- DHCP/includes/cf/aix.h:1.6.2.3 Mon Jun 14 22:22:22 2004 +++ DHCP/includes/cf/aix.h Sat Jul 10 00:11:16 2004 @@ -76,8 +76,13 @@ #define VA_start(list, last) va_start (list) #define va_dcl -/* XXX: We don't believe this system has v/snprintf(). Please verify this. */ +/* The vsnprint function definition in /usr/include/ appears to use this + * as a key for wether or not it should be declared. Seems reasoanble for + * us to use the same key. + */ +#if (_XOPEN_SOURCE != 500) #define NO_SNPRINTF +#endif #define EOL '\n' #define VOIDPTR void * Index: DHCP/includes/cf/alphaosf.h diff -u DHCP/includes/cf/alphaosf.h:1.17.2.2 DHCP/includes/cf/alphaosf.h:1.17.2.3 --- DHCP/includes/cf/alphaosf.h:1.17.2.2 Mon Jun 14 17:31:44 2004 +++ DHCP/includes/cf/alphaosf.h Sat Jul 10 00:11:17 2004 @@ -69,6 +69,17 @@ #define va_dcl #define VA_start(list, last) va_start (list, last) +/* Our reports say that OSF/1 versions 4.0G and later have v/snprintf + * implementations. 4.0F and previous do not. This is the only way + * that could be found to fingerprint these systems...if an Alpha/OSF + * expert has a better idea, please submit patches. + */ +#include +#define OSF_CUTOFF ((0x04 << 58) | (0x00 << 53) | ('G' << 43)) +#if (BUILTIN_VERS_ID_HIGH < OSF_CUTOFF) +# define NO_SNPRINTF +#endif + #ifndef _PATH_DHCPD_PID #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" #endif Index: DHCP/omapip/dispatch.c diff -u DHCP/omapip/dispatch.c:1.20.2.3 DHCP/omapip/dispatch.c:1.20.2.4 --- DHCP/omapip/dispatch.c:1.20.2.3 Thu Jun 10 17:59:47 2004 +++ DHCP/omapip/dispatch.c Sat Jul 10 00:11:17 2004 @@ -35,7 +35,7 @@ #include static omapi_io_object_t omapi_io_states; -u_int32_t cur_time; +TIME cur_time; OMAPI_OBJECT_ALLOC (omapi_io, omapi_io_object_t, omapi_type_io_object) Index: DHCP/omapip/mrtrace.c diff -u DHCP/omapip/mrtrace.c:1.6.2.1 DHCP/omapip/mrtrace.c:1.6.2.2 --- DHCP/omapip/mrtrace.c:1.6.2.1 Thu Jun 10 17:59:48 2004 +++ DHCP/omapip/mrtrace.c Sat Jul 10 00:11:17 2004 @@ -61,7 +61,7 @@ int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); unsigned int trace_mr_res_randomid (unsigned int); -extern time_t cur_time; +extern TIME cur_time; #if defined (TRACING) void trace_mr_init () Index: DHCP/omapip/test.c diff -u DHCP/omapip/test.c:1.7.2.2 DHCP/omapip/test.c:1.7.2.3 --- DHCP/omapip/test.c:1.7.2.2 Thu Jun 10 17:59:49 2004 +++ DHCP/omapip/test.c Sat Jul 10 00:11:17 2004 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include Index: DHCP/relay/dhcrelay.c diff -u DHCP/relay/dhcrelay.c:1.52.2.6 DHCP/relay/dhcrelay.c:1.52.2.7 --- DHCP/relay/dhcrelay.c:1.52.2.6 Thu Jun 10 17:59:50 2004 +++ DHCP/relay/dhcrelay.c Sat Jul 10 00:11:17 2004 @@ -34,7 +34,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcrelay.c,v 1.52.2.6 2004/06/10 17:59:50 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhcrelay.c,v 1.52.2.7 2004/07/10 00:11:17 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -42,7 +42,6 @@ static void usage PROTO ((void)); -TIME cur_time; TIME default_lease_time = 43200; /* 12 hours... */ TIME max_lease_time = 86400; /* 24 hours... */ struct tree_cache *global_options [256]; Index: DHCP/server/dhcpd.c diff -u DHCP/server/dhcpd.c:1.115.2.11 DHCP/server/dhcpd.c:1.115.2.12 --- DHCP/server/dhcpd.c:1.115.2.11 Thu Jun 10 17:59:52 2004 +++ DHCP/server/dhcpd.c Sat Jul 10 00:11:18 2004 @@ -34,7 +34,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcpd.c,v 1.115.2.11 2004/06/10 17:59:52 dhankins Exp $ Copyright 2004 Internet Systems Consortium."; +"$Id: dhcpd.c,v 1.115.2.12 2004/07/10 00:11:18 dhankins Exp $ Copyright 2004 Internet Systems Consortium."; #endif static char copyright[] = @@ -48,8 +48,6 @@ #include static void usage PROTO ((void)); - -TIME cur_time; struct iaddr server_identifier; int server_identifier_matched; Index: DHCP/server/failover.c diff -u DHCP/server/failover.c:1.53.2.31 DHCP/server/failover.c:1.53.2.32 --- DHCP/server/failover.c:1.53.2.31 Thu Jun 17 20:54:40 2004 +++ DHCP/server/failover.c Tue Jun 22 20:46:23 2004 @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.53.2.31 2004/06/17 20:54:40 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.53.2.32 2004/06/22 20:46:23 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -4514,7 +4514,8 @@ binding_state_print (lease -> binding_state), binding_state_print (msg -> binding_status)) >= sizeof outbuf) - log_fatal ("%s: impossible outbuf overflow"); + log_fatal ("%s: impossible outbuf overflow", + "dhcp_failover_process_bind_update"); dhcp_failover_send_bind_ack (state, msg, FTR_FATAL_CONFLICT, ==== end of patch -- David W. Hankins "If you don't do it right the first time, Operations Engineer you'll just have to do it again." Internet Systems Consortium, Inc. -- Jack T. Hankins -- Attached file included as plaintext by Ecartis -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFA7ztCcXeLeWu2vmoRAtHYAKCFvoqSYZm0rLQjWdT3EDifBlPfGwCgj+ds ez/Px5vcqN3kY+hAq2lBt/c= =RvFu -----END PGP SIGNATURE-----