rpms/dhcp/devel dhcp-3.0.4-H_host-name_-F_fqdn_-T_timeout_options.patch, NONE, 1.1 dhcp-3.0.4-dhcient_ibmzSeries_broadcast.patch, NONE, 1.1 dhcp-3.0.4-dhclient_ibmzSeries_-I_option.patch, NONE, 1.1 dhcp-3.0.4-gcc4_warnings.patch, NONE, 1.1 dhcp-3.0.4-version.patch, NONE, 1.1 dhcp.spec, 1.88, 1.89

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon May 8 13:58:25 UTC 2006


Author: jvdias

Update of /cvs/dist/rpms/dhcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21652

Modified Files:
	dhcp.spec 
Added Files:
	dhcp-3.0.4-H_host-name_-F_fqdn_-T_timeout_options.patch 
	dhcp-3.0.4-dhcient_ibmzSeries_broadcast.patch 
	dhcp-3.0.4-dhclient_ibmzSeries_-I_option.patch 
	dhcp-3.0.4-gcc4_warnings.patch dhcp-3.0.4-version.patch 
Log Message:
Upgrade to upstream version 3.0.4; Add new dhclient options: -H <host-name> -F <fqdn> -T <timeout>

dhcp-3.0.4-H_host-name_-F_fqdn_-T_timeout_options.patch:
 dhclient.8 |   56 +++++++++++++++
 dhclient.c |  217 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 257 insertions(+), 16 deletions(-)

--- NEW FILE dhcp-3.0.4-H_host-name_-F_fqdn_-T_timeout_options.patch ---
--- dhcp-3.0.4/client/dhclient.8.dhclient_-H_host-name_-F_fqdn_-T_timeout_options	2006-05-07 04:30:56.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.8	2006-05-07 04:30:56.000000000 -0400
@@ -92,6 +92,16 @@
 .B -B
 ]
 [
+.B -H
+.I host-name
+.R |
+.B -F fqdn.fqdn
+]
+[
+.B -T 
+.I timeout
+]
+[
 .I if0
 [
 .I ...ifN
@@ -300,6 +310,52 @@
 the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
 This option is provided as a Red Hat extension to enable dhclient to work
 on IBM zSeries z/OS Linux guests .
+.PP 
+The -H <host-name> option allows you to specify the DHCP host-name option
+to send to the server on the dhclient command line. It is equivalent to the
+top level dhclient.conf statement:
+.br
+\f send host-name "<host-name>";\fR
+.br
+The -H <host-name> option  will override any top level dhclient.conf 
+'send host-name' statement, but more specific per-interface 
+'interface "X" { send host-name...;' statements in dhclient.conf
+will override the -H <host-name> command line option for interface "X".
+The host-name option only specifies the client's host name prefix, to which
+the server will append the 'ddns-domainname' or 'domain-name' options, if any,
+to derive the fully qualified domain name of the client host.
+The -H <host-name> option cannot be used with the -F <fqdn.fqdn> option.
+Only one -H <host-name> option may be specified.
+The -H <host-name> option is provided as a Red Hat extension to simplify
+configuration of clients of DHCP servers that require the host-name option
+to be sent (eg. some modern cable modems), and for dynamic DNS updates (DDNS). 
+.PP
+The -F <fqdn.fqdn> option allows you to specify the DHCP fqdn.fqdn option
+to send to the server on the dhclient command line. It is equivalent to the
+top level dhclient.conf statement:
+.br
+\f send fqdn.fqdn "<domain-name>";\fR
+.br
+The -F <fqdn.fqdn> option  will override any top level dhclient.conf 
+'send fqdn.fqdn' statement, but more specific per-interface 
+'interface "X" { send fqdn.fqdn...;' statements in dhclient.conf
+will override the -F <fqdn.fqdn> command line option for interface "X".
+This option cannot be used with the -H <host-name> option.
+The DHCP fqdn.fqdn option must specify the complete domain name of the client
+host, which the server may use for dynamic DNS updates.
+Only one -F <fqdn.fqdn> option may be specified.
+The -F <fqdn.fqdn> option is provided as a Red Hat extension to simplify
+configuration of DDNS. 
+.PP
+The -T <timeout> option allows you to specify the time after which 
+the dhclient will decide that no DHCP servers can be contacted when
+no responses have been received. It is equivalent to the 
+.br
+\f timeout <integer>;\fR
+.br
+dhclient.conf statement, and will override any such statements in dhclient.conf.
+.br
+This option is provided as a Red Hat extension.
 .PP
 .SH CONFIGURATION
 The syntax of the dhclient.conf(5) file is discussed separately.
--- dhcp-3.0.4/client/dhclient.c.dhclient_-H_host-name_-F_fqdn_-T_timeout_options	2006-05-07 04:30:56.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.c	2006-05-07 04:34:23.000000000 -0400
@@ -85,6 +85,8 @@
 
 extern int log_isc_blurb;
 
+extern int asprintf(char **strp, const char *fmt, ...);
+
 int main (argc, argv, envp)
 	int argc;
 	char **argv, **envp;
@@ -108,6 +110,11 @@
 	int no_dhclient_script = 0;
 	char *s;
 	char *dhcp_client_identifier_arg = 0L;
+	char *dhcp_host_name_arg = 0L;
+	char *dhcp_fqdn_arg = 0L;
+	int timeout_arg = 0;
+	char *arg_conf = 0L;
+	int arg_conf_len=0;
 
 	/* Make sure we have stdin, stdout and stderr. */
 	i = open ("/dev/null", O_RDWR);
@@ -230,6 +237,55 @@
 
 		} else if (!strcmp (argv [i], "-B")) {
 			bootp_broadcast_always = 1;
+		} else if (!strcmp (argv [i], "-H")) {
+		        if ((++i == argc) || (argv[i] == 0L) || (*(argv[i])=='\0'))
+				usage ();
+ 			if (strlen(argv[i]) >= DHCP_OPTION_LEN)
+			{
+				log_error("-H option host-name string \"%s\" is too long -"
+					  "maximum length is: %d",  argv[i], DHCP_OPTION_LEN-1);
+				exit(1);
+			}
+			if ( dhcp_host_name_arg != 0L )
+			{
+				log_error("Only one -H <host-name> argument can be specified");
+				exit(1);
+			}
+			if ( dhcp_fqdn_arg != 0L )
+			{
+				log_error("The -H <host-name> and -F <fqdn> arguments are mutually exclusive");
+				exit(1);
+			}
+			dhcp_host_name_arg = argv[i];
+		} else if (!strcmp (argv [i], "-F")) {
+		        if ((++i == argc) || (argv[i] == 0L) || (*(argv[i])=='\0'))
+				usage ();
+			if (strlen(argv[i]) >= DHCP_OPTION_LEN)
+			{
+				log_error("-F option fqdn.fqdn string \"%s\" is too long -"
+					  "maximum length is: %d",  argv[i], DHCP_OPTION_LEN-1);
+				exit(1);
+			}
+			if ( dhcp_fqdn_arg != 0L )
+			{
+				log_error("Only one -F <fqdn> argument can be specified");
+				exit(1);
+			}
+			if ( dhcp_host_name_arg != 0L )
+			{
+				log_error("The -F <fqdn> and -H <host-name> arguments are mutually exclusive");
+				exit(1);
+			}
+			dhcp_fqdn_arg = argv[i];
+
+ 		} else if (!strcmp (argv [i], "-T")) {
+		        if ((++i == argc) || (argv[i] == 0L) || (*(argv[i])=='\0'))
+				usage ();
+			if ((timeout_arg = atoi(argv[i])) <= 0 )
+			{
+				log_error("-T timeout option must be > 0 - bad value: %s",argv[i]);
+				exit(1);
+			}			
  		} else if (argv [i][0] == '-') {
  		    usage ();
 		} else {
@@ -452,24 +508,107 @@
 	/* Parse the dhclient.conf file. */
 	read_client_conf ();
 
+	/* Parse any extra -I / -H / -F / -T command line configuration arguments: */
+
 	if ( (dhcp_client_identifier_arg != 0L) && (*dhcp_client_identifier_arg != '\0') )
 	{ 
-	   /* parse the dhcp client identifier option  
-	    * as a 'send' statement at top level scope:
-            */
+		arg_conf_len = asprintf(&arg_conf,  "send dhcp-client-identifier \"%s\";",
+					dhcp_client_identifier_arg
+		                       );
+		if (( arg_conf == 0 ) || (arg_conf_len <= 0))
+			log_fatal("Unable to send -I option dhcp-client-identifier");
+	}
+	
+	if ( ( dhcp_host_name_arg != 0L ) && (*dhcp_host_name_arg != '\0') )
+	{
+		if( arg_conf == 0 )
+		{
+			arg_conf_len = asprintf(&arg_conf,  "send host-name \"%s\";",
+						dhcp_host_name_arg
+				               );
+			if( ( arg_conf == 0 ) || (arg_conf_len <= 0) )
+				log_fatal("Unable to send -H option host-name");
+		}else
+		{
+			char *last_arg_conf = arg_conf;
+			arg_conf = 0L;
+			arg_conf_len = asprintf( &arg_conf, "%s\nsend host-name \"%s\";", 
+					         last_arg_conf,
+						 dhcp_host_name_arg
+				               );
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
+				log_fatal("Unable to send -H option host-name");				
+			free(last_arg_conf);
+		}
+	}
+
+	if ( ( dhcp_fqdn_arg != 0L ) && (*dhcp_fqdn_arg != '\0') )
+	{
+		if( arg_conf == 0 )
+		{
+			arg_conf_len = asprintf(&arg_conf,  "send fqdn.fqdn \"%s\";",
+					dhcp_fqdn_arg
+		                       );
+			if( ( arg_conf == 0 ) || (arg_conf_len <= 0) )
+				log_fatal("Unable to send -F option fqdn.fqdn");
+		}else
+		{
+			char *last_arg_conf = arg_conf;
+			arg_conf = 0L;
+			arg_conf_len = asprintf( &arg_conf, "%s\nsend fqdn.fqdn \"%s\";", 
+						 last_arg_conf,
+						 dhcp_fqdn_arg
+				               );
+			if ((arg_conf == 0)  || (arg_conf_len <= 0))
+				log_fatal("Unable to send -F option fqdn.fqdn");				
+			free(last_arg_conf);
+		}
+	}
+
+	if( timeout_arg )
+	{
+		if( arg_conf == 0 )
+		{
+			arg_conf_len = asprintf(&arg_conf,  "timeout %d;",
+						timeout_arg
+		                               );
+			if( ( arg_conf == 0 ) || (arg_conf_len <= 0) )
+				log_fatal("Unable to process -T timeout argument");
+		}else
+		{
+			char *last_arg_conf = arg_conf;
+			arg_conf = 0L;
+			arg_conf_len = asprintf( &arg_conf, "%s\ntimeout %d;", 
+						 last_arg_conf,
+						 timeout_arg
+				               );
+			if ((arg_conf == 0) || (arg_conf_len == 0))
+				log_fatal("Unable to process -T timeout argument");
+			free(last_arg_conf);
+		}
+	}
+
+	if( arg_conf )
+	{
+		if( arg_conf_len == 0 )
+			if( (arg_conf_len = strlen(arg_conf)) == 0 )
+                             /* huh ? cannot happen ! */
+				log_fatal("Unable to process -I/-H/-F/-T configuration arguments");
+		
+		/* parse the extra dhclient.conf configuration arguments
+		 * into top level config:
+		 */
 	      	struct parse *cfile = (struct parse *)0;
-		char send_dhcid_stmt[ DHCP_OPTION_LEN + 40 ];
 		const char *val=0L;
-		int  token, send_dhcid_stmt_len = 
-			 sprintf (send_dhcid_stmt, "send dhcp-client-identifier \"%s\";",
-				  dhcp_client_identifier_arg
-			         );
+		int  token;
 		
-		status = new_parse (&cfile, -1, send_dhcid_stmt, send_dhcid_stmt_len,
-				    "dhcp-client-identifier option", 0);
-
-		if (status != ISC_R_SUCCESS)
-			log_fatal ("Cannot parse dhcp-client-identifier send statement!");
+		status = new_parse (&cfile, -1, arg_conf, arg_conf_len,
+				    "extra dhclient -I/-H/-F/-T configuration arguments", 0
+				   );
+
+		if ((status != ISC_R_SUCCESS) || ( cfile -> warnings_occurred ))
+			log_fatal ("Cannot parse -I/-H/-F/-T configuration arguments !");
+		        /* more detailed parse failures will be logged */
 
 		do {
 			token = peek_token (&val, (unsigned *)0, cfile);
@@ -479,9 +618,51 @@
 			parse_client_statement (cfile,
 						(struct interface_info *)0,
 						&top_level_config);
+			
 
 		} while (1);
+
+		if( cfile -> warnings_occurred )
+			log_fatal ("Cannot parse -I/-H/-F/-T configuration arguments !");
 		end_parse (&cfile);
+
+		if ( timeout_arg )
+		{
+			/* we just set the toplevel timeout, but per-client timeouts may
+			   still be at defaults. Also, it makes no sense having the 
+                           reboot_timeout or backoff_cutoff greater than the timeout:
+                         */
+			if ( ( top_level_config.backoff_cutoff == 15 )
+			   &&( top_level_config.backoff_cutoff > ( timeout_arg / 2 ) )
+			     )  top_level_config.backoff_cutoff
+				= (((unsigned long)( timeout_arg / 2 ))==0)
+				  ? timeout_arg
+				  : (unsigned long)( timeout_arg / 2 );
+
+			for (ip = interfaces; ip; ip = ip -> next) 
+			{
+				if ( ip -> client -> config -> timeout == 60 )
+					ip -> client -> config -> timeout = timeout_arg;
+
+				if ( (ip -> client -> config -> reboot_timeout == 10 )
+				   &&(ip -> client -> config -> reboot_timeout 
+				     >ip -> client -> config -> timeout
+				     )
+				   )    ip -> client -> config -> reboot_timeout 
+				      = ip -> client -> config -> timeout;
+
+				if ( (ip -> client -> config -> backoff_cutoff == 15 )
+				   &&(ip -> client -> config -> backoff_cutoff
+				     > top_level_config.backoff_cutoff
+				     )
+				  )     ip -> client -> config -> backoff_cutoff
+				      = top_level_config.backoff_cutoff;
+			}
+		}
+
+		free(arg_conf);
+		arg_conf = 0L;
+		arg_conf_len = 0L;
 	}
 		
 	/* Parse the lease database. */
@@ -628,14 +809,17 @@
 	log_info (url);
 
 #ifdef EXTENDED_NEW_OPTION_INFO
-	log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] [-I <dhcp-client-identifier>] [-B] %s",
+	log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s",
 #else
-	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] [-I <dhcp-client-identifier>] [-B] %s",
+	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
 #endif
 		   "[-s server]");
 	log_error ("                [-cf config-file] [-lf lease-file]%s",
 		   "[-pf pid-file] [-e VAR=val]");
-	log_fatal ("                [-sf script-file] [interface]");
+	log_error ("                [ -I <dhcp-client-identifier> ] [-B]");
+	log_error ("                [ -H <host-name> | -F <fqdn.fqdn> ] [ -T <timeout> ] ");
+	log_fatal ("                [ -sf script-file] [interface]");
+
 }
 
 isc_result_t find_class (struct class **c,
@@ -1530,6 +1714,7 @@
 
 	/* If we're past the panic timeout, call the script and tell it
 	   we haven't found anything for this interface yet. */
+
 	if (interval > client -> config -> timeout) {
 		state_panic (client);
 		return;

dhcp-3.0.4-dhcient_ibmzSeries_broadcast.patch:
 client/clparse.c       |   11 ++++++++++-
 client/dhclient.8      |   11 +++++++++++
 client/dhclient.c      |   21 ++++++++++++++-------
 client/dhclient.conf.5 |   12 ++++++++++++
 common/conflex.c       |    2 ++
 includes/dhcpd.h       |    3 +++
 includes/dhctoken.h    |    3 ++-
 7 files changed, 54 insertions(+), 9 deletions(-)

--- NEW FILE dhcp-3.0.4-dhcient_ibmzSeries_broadcast.patch ---
--- dhcp-3.0.4/common/conflex.c.dhclient_ibmzSeries_broadcast	2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.4/common/conflex.c	2006-05-06 22:56:54.000000000 -0400
@@ -605,6 +605,8 @@
 			return BALANCE;
 		if (!strcasecmp (atom + 1, "ound"))
 			return BOUND;
+		if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
+			return BOOTP_BROADCAST_ALWAYS;
 		break;
 	      case 'c':
 		if (!strcasecmp (atom + 1, "ase"))
--- dhcp-3.0.4/client/dhclient.8.dhclient_ibmzSeries_broadcast	2006-05-06 22:54:28.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.8	2006-05-06 22:58:42.000000000 -0400
@@ -85,6 +85,9 @@
 .B -x
 ]
 [
+.B -B
+]
+[
 .I if0
 [
 .I ...ifN
@@ -272,6 +275,14 @@
 The -x argument enables eXtended option information to be created in the
 -s dhclient-script environment, which would allow applications running 
 in that environment to handle options they do not know about in advance.
+.PP
+The -B option instructs dhclient to set the bootp broadcast flag in request
+packets, so that servers will always broadcast replies . This is equivalent
+to specifying the 'bootp-broadcast-always' option in dhclient.conf, and has
+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
+This option is provided as a Red Hat extension to enable dhclient to work
+on IBM zSeries z/OS Linux guests .
+.PP
 .SH CONFIGURATION
 The syntax of the dhclient.conf(5) file is discussed separately.
 .SH OMAPI
--- dhcp-3.0.4/client/dhclient.c.dhclient_ibmzSeries_broadcast	2006-05-06 22:54:28.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.c	2006-05-06 23:06:09.000000000 -0400
@@ -77,6 +77,8 @@
 #ifdef EXTENDED_NEW_OPTION_INFO
 int extended_option_environment = 0;
 #endif
+int bootp_broadcast_always = 0;
+
 static void usage PROTO ((void));
 
 void do_release(struct client_state *);
@@ -214,6 +216,8 @@
 		    extended_option_environment = 1;
 		    new_option_info_tree = GENERATE_NEW_OPTION_INFO;
 #endif
+		} else if (!strcmp (argv [i], "-B")) {
+			bootp_broadcast_always = 1;
  		} else if (argv [i][0] == '-') {
  		    usage ();
 		} else {
@@ -582,7 +586,7 @@
 #ifdef EXTENDED_NEW_OPTION_INFO
 	log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s",
 #else
-	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
+	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] [-B] %s",
 #endif
 		   "[-s server]");
 	log_error ("                [-cf config-file] [-lf lease-file]%s",
@@ -2021,8 +2025,9 @@
 	client -> packet.xid = random ();
 	client -> packet.secs = 0; /* filled in by send_discover. */
 
-	if (can_receive_unicast_unconfigured (client -> interface))
-		client -> packet.flags = 0;
+	if (  (!(bootp_broadcast_always || client -> config -> bootp_broadcast_always))
+	   && can_receive_unicast_unconfigured (client -> interface)
+	   )	client -> packet.flags = 0;
 	else
 		client -> packet.flags = htons (BOOTP_BROADCAST);
 
@@ -2108,8 +2113,9 @@
 	} else {
 		memset (&client -> packet.ciaddr, 0,
 			sizeof client -> packet.ciaddr);
-		if (can_receive_unicast_unconfigured (client -> interface))
-			client -> packet.flags = 0;
+		if (  (!(bootp_broadcast_always || client -> config -> bootp_broadcast_always))
+		   && can_receive_unicast_unconfigured (client -> interface)
+		   )	client -> packet.flags = 0;
 		else
 			client -> packet.flags = htons (BOOTP_BROADCAST);
 	}
@@ -2168,8 +2174,9 @@
 	client -> packet.hops = 0;
 	client -> packet.xid = client -> xid;
 	client -> packet.secs = 0; /* Filled in by send_request. */
-	if (can_receive_unicast_unconfigured (client -> interface))
-		client -> packet.flags = 0;
+	if (  (!(bootp_broadcast_always || client -> config -> bootp_broadcast_always))
+	   && can_receive_unicast_unconfigured (client -> interface)
+	   )    client -> packet.flags = 0;
 	else
 		client -> packet.flags = htons (BOOTP_BROADCAST);
 
--- dhcp-3.0.4/client/dhclient.conf.5.dhclient_ibmzSeries_broadcast	2006-05-06 22:54:27.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.conf.5	2006-05-06 23:07:14.000000000 -0400
@@ -582,6 +582,18 @@
 Whenever the client tries to renew the lease, it will use that same
 media type.   The lease must expire before the client will go back to
 cycling through media types.
+.PP
+ \fBbootp-broadcast-always;\fR
+.PP
+The 
+.B bootp-broadcast-always
+statement instructs dhclient to always set the bootp broadcast flag in
+request packets, so that servers will always broadcast replies.
+This is equivalent to supplying the dhclient -B argument, and has
+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
+This option is provided as a Red Hat extension to enable dhclient to work
+on IBM zSeries z/OS Linux guests .
+.PP
 .SH SAMPLE
 The following configuration file is used on a laptop running NetBSD
 1.3.   The laptop has an IP alias of 192.5.5.213, and has one
--- dhcp-3.0.4/client/clparse.c.dhclient_ibmzSeries_broadcast	2006-05-06 22:54:27.000000000 -0400
+++ dhcp-3.0.4/client/clparse.c	2006-05-06 23:09:53.000000000 -0400
@@ -87,6 +87,7 @@
 	top_level_config.requested_options = default_requested_options;
 	top_level_config.omapi_port = -1;
 	top_level_config.do_forward_update = 1;
+	top_level_config.bootp_broadcast_always = 0;
 
 	group_allocate (&top_level_config.on_receipt, MDL);
 	if (!top_level_config.on_receipt)
@@ -233,7 +234,9 @@
 	interface-declaration |
 	LEASE client-lease-statement |
 	ALIAS client-lease-statement |
-	KEY key-definition */
+	KEY key-definition 
+	BOOTP_BROADCAST_ALWAYS
+*/
 
 void parse_client_statement (cfile, ip, config)
 	struct parse *cfile;
@@ -557,6 +560,12 @@
 		parse_reject_statement (cfile, config);
 		return;
 
+	      case BOOTP_BROADCAST_ALWAYS:
+		token = next_token(&val, (unsigned*)0, cfile);
+		config -> bootp_broadcast_always = 1;
+		parse_semi (cfile);
+		return;
+		
 	      default:
 		lose = 0;
 		stmt = (struct executable_statement *)0;
--- dhcp-3.0.4/includes/dhcpd.h.dhclient_ibmzSeries_broadcast	2006-05-06 22:54:28.000000000 -0400
+++ dhcp-3.0.4/includes/dhcpd.h	2006-05-06 23:10:38.000000000 -0400
@@ -731,6 +731,9 @@
 	int do_forward_update;		/* If nonzero, and if we have the
 					   information we need, update the
 					   A record for the address we get. */
+        int bootp_broadcast_always;     /* If nonzero, always set the BOOTP_BROADCAST
+					   flag in requests
+					*/        
 };
 
 /* Per-interface state used in the dhcp client... */
--- dhcp-3.0.4/includes/dhctoken.h.dhclient_ibmzSeries_broadcast	2005-09-22 12:19:57.000000000 -0400
+++ dhcp-3.0.4/includes/dhctoken.h	2006-05-06 23:11:38.000000000 -0400
@@ -309,7 +309,8 @@
 	DOMAIN_NAME = 613,
 	DO_FORWARD_UPDATE = 614,
 	KNOWN_CLIENTS = 615,
-	ATSFP = 616
+	ATSFP = 616,
+	BOOTP_BROADCAST_ALWAYS=617
 };
 
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\

dhcp-3.0.4-dhclient_ibmzSeries_-I_option.patch:
 dhclient.8 |   20 +++++++++++++++++++-
 dhclient.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 65 insertions(+), 3 deletions(-)

--- NEW FILE dhcp-3.0.4-dhclient_ibmzSeries_-I_option.patch ---
--- dhcp-3.0.4/client/dhclient.c.dhclient_ibmzSeries_-I_option.patch	2006-05-06 23:14:47.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.c	2006-05-06 23:20:16.000000000 -0400
@@ -107,6 +107,7 @@
 	int no_dhclient_pid = 0;
 	int no_dhclient_script = 0;
 	char *s;
+	char *dhcp_client_identifier_arg = 0L;
 
 	/* Make sure we have stdin, stdout and stderr. */
 	i = open ("/dev/null", O_RDWR);
@@ -216,6 +217,17 @@
 		    extended_option_environment = 1;
 		    new_option_info_tree = GENERATE_NEW_OPTION_INFO;
 #endif
+		} else if (!strcmp (argv [i], "-I")) {
+			if ((++i == argc) || (argv[i] == 0L) || (*(argv[i])=='\0'))
+				usage ();
+			if (strlen(argv[i]) >= DHCP_OPTION_LEN)
+			{
+				log_error("-I option dhcp-client-identifier string \"%s\" is too long -"
+					  "maximum length is: %d",  argv[i], DHCP_OPTION_LEN-1);
+				exit(1);
+			}
+			dhcp_client_identifier_arg = argv[i];
+
 		} else if (!strcmp (argv [i], "-B")) {
 			bootp_broadcast_always = 1;
  		} else if (argv [i][0] == '-') {
@@ -440,6 +452,38 @@
 	/* Parse the dhclient.conf file. */
 	read_client_conf ();
 
+	if ( (dhcp_client_identifier_arg != 0L) && (*dhcp_client_identifier_arg != '\0') )
+	{ 
+	   /* parse the dhcp client identifier option  
+	    * as a 'send' statement at top level scope:
+            */
+	      	struct parse *cfile = (struct parse *)0;
+		char send_dhcid_stmt[ DHCP_OPTION_LEN + 40 ];
+		const char *val=0L;
+		int  token, send_dhcid_stmt_len = 
+			 sprintf (send_dhcid_stmt, "send dhcp-client-identifier \"%s\";",
+				  dhcp_client_identifier_arg
+			         );
+		
+		status = new_parse (&cfile, -1, send_dhcid_stmt, send_dhcid_stmt_len,
+				    "dhcp-client-identifier option", 0);
+
+		if (status != ISC_R_SUCCESS)
+			log_fatal ("Cannot parse dhcp-client-identifier send statement!");
+
+		do {
+			token = peek_token (&val, (unsigned *)0, cfile);
+			if (token == END_OF_FILE)
+				break;
+
+			parse_client_statement (cfile,
+						(struct interface_info *)0,
+						&top_level_config);
+
+		} while (1);
+		end_parse (&cfile);
+	}
+		
 	/* Parse the lease database. */
 	read_client_leases ();
 
@@ -584,9 +628,9 @@
 	log_info (url);
 
 #ifdef EXTENDED_NEW_OPTION_INFO
-	log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s",
+	log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] [-I <dhcp-client-identifier>] [-B] %s",
 #else
-	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] [-B] %s",
+	log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] [-I <dhcp-client-identifier>] [-B] %s",
 #endif
 		   "[-s server]");
 	log_error ("                [-cf config-file] [-lf lease-file]%s",
--- dhcp-3.0.4/client/dhclient.8.dhclient_ibmzSeries_-I_option.patch	2006-05-06 23:14:47.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.8	2006-05-06 23:22:56.000000000 -0400
@@ -85,6 +85,10 @@
 .B -x
 ]
 [
+.B -I
+.I dhcp-client-identifier
+]
+[
 .B -B
 ]
 [
@@ -274,7 +278,21 @@
 .PP
 The -x argument enables eXtended option information to be created in the
 -s dhclient-script environment, which would allow applications running 
-in that environment to handle options they do not know about in advance.
+in that environment to handle options they do not know about in advance -
+this is a Red Hat extension to support dhcdbd and NetworkManager.
+.PP
+The -I <id> argument allows you to specify the dhcp-client-identifier string, <id>,
+to be sent to the dhcp server on the command line. It is equivalent to the
+top level dhclient.conf statement:
+.br
+ \fBsend dhcp-client-identifier "<id>";\fR
+.br
+The -I <id> command line option will override any top level dhclient.conf 
+'send dhcp-client-identifier' statement, but more specific per-interface
+'interface "X" { send dhcp-client-identifier...; }' statements in dhclient.conf
+will override the -I <id> command line option for interface "X".
+This option is provided as a Red Hat extension to enable dhclient to work
+on IBM zSeries z/OS Linux guests .
 .PP
 The -B option instructs dhclient to set the bootp broadcast flag in request
 packets, so that servers will always broadcast replies . This is equivalent

dhcp-3.0.4-gcc4_warnings.patch:
 client/dhclient.c        |    8 +++++---
 common/alloc.c           |    2 +-
 common/discover.c        |    2 +-
 common/options.c         |   18 +++++++++---------
 common/parse.c           |   13 +++++++------
 dhcpctl/callback.c       |    2 +-
 dhcpctl/remote.c         |   12 ++++++------
 dst/dst_api.c            |   12 +++++++++---
 includes/omapip/omapip.h |    4 ++--
 minires/res_update.c     |    2 +-
 omapip/connection.c      |    2 +-
 omapip/dispatch.c        |    4 ++--
 omapip/errwarn.c         |   20 ++++++++++++--------
 omapip/message.c         |   34 +++++++++++++++++-----------------
 omapip/protocol.c        |    8 ++++----
 server/confpars.c        |    2 +-
 server/dhcpd.c           |    6 ++++--
 17 files changed, 83 insertions(+), 68 deletions(-)

--- NEW FILE dhcp-3.0.4-gcc4_warnings.patch ---
--- dhcp-3.0.4/omapip/protocol.c.gcc4_warnings	2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.4/omapip/protocol.c	2006-05-06 23:52:15.000000000 -0400
@@ -498,7 +498,7 @@
 		}
 		previous_outstanding = dmalloc_outstanding;
 #endif
-		status = omapi_message_new ((omapi_object_t **)&p -> message,
+		status = omapi_message_new ((void*)&p -> message,
 					    MDL);
 		if (status != ISC_R_SUCCESS) {
 			omapi_disconnect (c, 1);
@@ -1151,7 +1151,7 @@
 	if (po -> type != omapi_type_protocol)
 		return ISC_R_INVALIDARG;
 
-	status = omapi_message_new ((omapi_object_t **)&message, MDL);
+	status = omapi_message_new ((void*)&message, MDL);
 	if (status != ISC_R_SUCCESS)
 		return status;
 	mo = (omapi_object_t *)message;
@@ -1209,7 +1209,7 @@
 	if (po -> type != omapi_type_protocol)
 		return ISC_R_INVALIDARG;
 
-	status = omapi_message_new ((omapi_object_t **)&message, MDL);
+	status = omapi_message_new ((void*)&message, MDL);
 	mo = (omapi_object_t *)message;
 
 	if (status == ISC_R_SUCCESS)
@@ -1268,7 +1268,7 @@
 	if (po -> type != omapi_type_protocol)
 		return ISC_R_INVALIDARG;
 
-	status = omapi_message_new ((omapi_object_t **)&message, MDL);
+	status = omapi_message_new ((void*)&message, MDL);
 	if (status != ISC_R_SUCCESS)
 		return status;
 	mo = (omapi_object_t *)message;
--- dhcp-3.0.4/omapip/message.c.gcc4_warnings	2004-11-24 12:39:17.000000000 -0500
+++ dhcp-3.0.4/omapip/message.c	2006-05-07 00:13:27.000000000 -0400
@@ -58,7 +58,7 @@
 	}
 	status = omapi_object_reference (&m -> inner, g, file, line);
 	if (status != ISC_R_SUCCESS) {
-		omapi_object_dereference ((omapi_object_t **)&m, file, line);
+		omapi_object_dereference ((void*)&m, file, line);
 		omapi_object_dereference (&g, file, line);
 		return status;
 	}
@@ -66,7 +66,7 @@
 					 (omapi_object_t *)m, file, line);
 
 	if (status != ISC_R_SUCCESS) {
-		omapi_object_dereference ((omapi_object_t **)&m, file, line);
+		omapi_object_dereference ((void*)&m, file, line);
 		omapi_object_dereference (&g, file, line);
 		return status;
 	}
@@ -286,16 +286,16 @@
 
 	if (omapi_registered_messages) {
 		omapi_object_reference
-			((omapi_object_t **)&m -> next,
+			((void*)&m -> next,
 			 (omapi_object_t *)omapi_registered_messages, MDL);
 		omapi_object_reference
-			((omapi_object_t **)&omapi_registered_messages -> prev,
+			((void*)&omapi_registered_messages -> prev,
 			 (omapi_object_t *)m, MDL);
 		omapi_object_dereference
-			((omapi_object_t **)&omapi_registered_messages, MDL);
+			((void*)&omapi_registered_messages, MDL);
 	}
 	omapi_object_reference
-		((omapi_object_t **)&omapi_registered_messages,
+		((void*)&omapi_registered_messages,
 		 (omapi_object_t *)m, MDL);
 	return ISC_R_SUCCESS;;
 }
@@ -315,34 +315,34 @@
 
 	n = (omapi_message_object_t *)0;
 	if (m -> next) {
-		omapi_object_reference ((omapi_object_t **)&n,
+		omapi_object_reference ((void*)&n,
 					(omapi_object_t *)m -> next, MDL);
-		omapi_object_dereference ((omapi_object_t **)&m -> next, MDL);
-		omapi_object_dereference ((omapi_object_t **)&n -> prev, MDL);
+		omapi_object_dereference ((void*)&m -> next, MDL);
+		omapi_object_dereference ((void*)&n -> prev, MDL);
 	}
 	if (m -> prev) {
 		omapi_message_object_t *tmp = (omapi_message_object_t *)0;
-		omapi_object_reference ((omapi_object_t **)&tmp,
+		omapi_object_reference ((void*)&tmp,
 					(omapi_object_t *)m -> prev, MDL);
-		omapi_object_dereference ((omapi_object_t **)&m -> prev, MDL);
+		omapi_object_dereference ((void*)&m -> prev, MDL);
 		if (tmp -> next)
 			omapi_object_dereference
-				((omapi_object_t **)&tmp -> next, MDL);
+				((void*)&tmp -> next, MDL);
 		if (n)
 			omapi_object_reference
-				((omapi_object_t **)&tmp -> next,
+				((void*)&tmp -> next,
 				 (omapi_object_t *)n, MDL);
-		omapi_object_dereference ((omapi_object_t **)&tmp, MDL);
+		omapi_object_dereference ((void*)&tmp, MDL);
 	} else {
 		omapi_object_dereference
-			((omapi_object_t **)&omapi_registered_messages, MDL);
+			((void*)&omapi_registered_messages, MDL);
 		if (n)
 			omapi_object_reference
-				((omapi_object_t **)&omapi_registered_messages,
+				((void*)&omapi_registered_messages,
 				 (omapi_object_t *)n, MDL);
 	}
 	if (n)
-		omapi_object_dereference ((omapi_object_t **)&n, MDL);
+		omapi_object_dereference ((void*)&n, MDL);
 	return ISC_R_SUCCESS;
 }
 
--- dhcp-3.0.4/omapip/connection.c.gcc4_warnings	2004-11-24 12:39:17.000000000 -0500
+++ dhcp-3.0.4/omapip/connection.c	2006-05-06 23:59:40.000000000 -0400
@@ -174,7 +174,7 @@
 			
 			if (bind (obj -> socket, (struct sockaddr *)&local_sin,
 				  sizeof local_sin) < 0) {
-				omapi_object_dereference ((omapi_object_t **)
+				omapi_object_dereference ((void*)
 							  &obj, MDL);
 				if (errno == EADDRINUSE)
 					return ISC_R_ADDRINUSE;
--- dhcp-3.0.4/omapip/errwarn.c.gcc4_warnings	2006-05-06 23:31:22.000000000 -0400
+++ dhcp-3.0.4/omapip/errwarn.c	2006-05-07 00:01:48.000000000 -0400
@@ -74,8 +74,9 @@
 
   /* Also log it to stderr? */
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  int r;
+	  r=write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r=write (STDERR_FILENO, "\n", 1);
   }
 
 #if !defined(NOMINUM)
@@ -129,8 +130,9 @@
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  int r;
+	  r=write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r=write (STDERR_FILENO, "\n", 1);
   }
 
   return 0;
@@ -156,8 +158,9 @@
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  int r;
+	  r=write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r=write (STDERR_FILENO, "\n", 1);
   }
 
   return 0;
@@ -183,8 +186,9 @@
 #endif
 
   if (log_perror) {
-	  write (STDERR_FILENO, mbuf, strlen (mbuf));
-	  write (STDERR_FILENO, "\n", 1);
+	  int r;
+	  r=write (STDERR_FILENO, mbuf, strlen (mbuf));
+	  r=write (STDERR_FILENO, "\n", 1);
   }
 
   return 0;
--- dhcp-3.0.4/omapip/dispatch.c.gcc4_warnings	2004-11-24 12:39:17.000000000 -0500
+++ dhcp-3.0.4/omapip/dispatch.c	2006-05-07 00:05:04.000000000 -0400
@@ -139,7 +139,7 @@
 
 isc_result_t omapi_dispatch (struct timeval *t)
 {
-	return omapi_wait_for_completion ((omapi_object_t *)&omapi_io_states,
+	return omapi_wait_for_completion ((void *)&omapi_io_states,
 					  t);
 }
 
@@ -449,7 +449,7 @@
 						     tmp, MDL);
 					else
 						omapi_signal_in
-							((omapi_object_t *)
+							((void *)
 							 &omapi_io_states,
 							 "ready");
 				}
--- dhcp-3.0.4/common/discover.c.gcc4_warnings	2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.4/common/discover.c	2006-05-06 23:41:11.000000000 -0400
@@ -878,7 +878,7 @@
 		interface -> client = (struct client_state *)0;
 
 	if (interface -> shared_network)
-		omapi_object_dereference ((omapi_object_t **)
+		omapi_object_dereference ((void*)
 					  &interface -> shared_network, MDL);
 
 	return ISC_R_SUCCESS;
--- dhcp-3.0.4/common/alloc.c.gcc4_warnings	2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.4/common/alloc.c	2006-05-06 23:40:33.000000000 -0400
@@ -146,7 +146,7 @@
 	for (car = option_chain_head -> first; car; car = cdr) {
 		cdr = car -> cdr;
 		if (car -> car)
-			option_cache_dereference ((struct option_cache **)
+			option_cache_dereference ((void*)
 						  (&car -> car), MDL);
 		dfree (car, MDL);
 		car = cdr;
--- dhcp-3.0.4/common/options.c.gcc4_warnings	2006-02-22 17:43:27.000000000 -0500
+++ dhcp-3.0.4/common/options.c	2006-05-06 23:39:38.000000000 -0400
@@ -1733,9 +1733,9 @@
 		   in its place. */
 		if (bptr) {
 			option_cache_dereference
-				((struct option_cache **)&bptr -> car, MDL);
+			        ((void*)&bptr -> car, MDL);
 			option_cache_reference
-				((struct option_cache **)&bptr -> car,
+			        ((void*)&bptr -> car,
 				 oc, MDL);
 			return;
 		}
@@ -1749,7 +1749,7 @@
 	}
 	bptr -> cdr = hash [hashix];
 	bptr -> car = 0;
-	option_cache_reference ((struct option_cache **)&bptr -> car, oc, MDL);
+	option_cache_reference ((void*)&bptr -> car, oc, MDL);
 	hash [hashix] = bptr;
 }
 
@@ -1793,7 +1793,7 @@
 		else
 			hash [hashix] = bptr -> cdr;
 		option_cache_dereference
-			((struct option_cache **)(&bptr -> car), MDL);
+			((void*)(&bptr -> car), MDL);
 		free_pair (bptr, MDL);
 	}
 }
@@ -1869,7 +1869,7 @@
 		for (cp = heads [i]; cp; cp = next) {
 			next = cp -> cdr;
 			option_cache_dereference
-				((struct option_cache **)&cp -> car,
+			    ((void*)&cp -> car,
 				 file, line);
 			free_pair (cp, file, line);
 		}
@@ -2276,9 +2276,9 @@
 	for (tail = &head -> first; *tail; tail = &((*tail) -> cdr)) {
 		if (oc -> option ==
 		    ((struct option_cache *)((*tail) -> car)) -> option) {
-			option_cache_dereference ((struct option_cache **)
+			option_cache_dereference ((void*)
 						  (&(*tail) -> car), MDL);
-			option_cache_reference ((struct option_cache **)
+			option_cache_reference ((void*)
 						(&(*tail) -> car), oc, MDL);
 			return;
 		}
@@ -2286,7 +2286,7 @@
 
 	*tail = cons (0, 0);
 	if (*tail) {
-		option_cache_reference ((struct option_cache **)
+		option_cache_reference ((void*)
 					(&(*tail) -> car), oc, MDL);
 	}
 }
@@ -2344,7 +2344,7 @@
 		    ((struct option_cache *)(*tail) -> car) -> option -> code)
 		{
 			tmp = (*tail) -> cdr;
-			option_cache_dereference ((struct option_cache **)
+			option_cache_dereference ((void*)
 						  (&(*tail) -> car), MDL);
 			dfree (*tail, MDL);
 			(*tail) = tmp;
--- dhcp-3.0.4/common/parse.c.gcc4_warnings	2006-05-06 23:31:22.000000000 -0400
+++ dhcp-3.0.4/common/parse.c	2006-05-06 23:34:35.000000000 -0400
@@ -4842,14 +4842,15 @@
 #endif
 
 	if (log_perror) {
-		write (STDERR_FILENO, mbuf, strlen (mbuf));
-		write (STDERR_FILENO, "\n", 1);
-		write (STDERR_FILENO, cfile -> token_line,
+		int r;
+		r = write (STDERR_FILENO, mbuf, strlen (mbuf));
+		r = write (STDERR_FILENO, "\n", 1);
+		r = write (STDERR_FILENO, cfile -> token_line,
 		       strlen (cfile -> token_line));
-		write (STDERR_FILENO, "\n", 1);
+		r = write (STDERR_FILENO, "\n", 1);
 		if (cfile -> lexchar < 81)
-			write (STDERR_FILENO, lexbuf, lix);
-		write (STDERR_FILENO, "^\n", 2);
+			r = write (STDERR_FILENO, lexbuf, lix);
+		r = write (STDERR_FILENO, "^\n", 2);
 	}
 
 	cfile -> warnings_occurred = 1;
--- dhcp-3.0.4/server/dhcpd.c.gcc4_warnings	2006-04-27 17:38:30.000000000 -0400
+++ dhcp-3.0.4/server/dhcpd.c	2006-05-07 00:17:07.000000000 -0400
@@ -551,7 +551,8 @@
 				if ((i = open (path_dhcpd_pid,
 					O_WRONLY | O_CREAT, 0644)) >= 0) {
 				    sprintf (pbuf, "%d\n", (int)getpid ());
-				    write (i, pbuf, strlen (pbuf));
+				    if((status = write (i, pbuf, strlen (pbuf))) != strlen(pbuf))
+					log_fatal("Unable to write %s",path_dhcpd_pid);
 				    close (i);
 				    pidfilewritten = 1;
 				}
@@ -584,7 +585,8 @@
 		if ((i = open (path_dhcpd_pid,
 			       O_WRONLY | O_CREAT, 0644)) >= 0) {
 			sprintf (pbuf, "%d\n", (int)getpid ());
-			write (i, pbuf, strlen (pbuf));
+			if((status = write (i, pbuf, strlen (pbuf))) != strlen(pbuf))
+			    log_fatal("Unable to write %s",path_dhcpd_pid);
 			close (i);
 			pidfilewritten = 1;
 		}
--- dhcp-3.0.4/server/confpars.c.gcc4_warnings	2006-05-06 23:31:23.000000000 -0400
+++ dhcp-3.0.4/server/confpars.c	2006-05-07 00:17:44.000000000 -0400
@@ -2893,7 +2893,7 @@
 				 *p; p = &((*p) -> cdr))
 				    ;
 			    *p = cons (0, 0);
-			    option_cache_reference (((struct option_cache **)
+			    option_cache_reference (((void*)
 						     &((*p) -> car)), oc, MDL);
 			    option_cache_dereference (&oc, MDL);
 			}
--- dhcp-3.0.4/client/dhclient.c.gcc4_warnings	2006-05-06 23:31:23.000000000 -0400
+++ dhcp-3.0.4/client/dhclient.c	2006-05-07 00:21:33.000000000 -0400
@@ -357,18 +357,18 @@
 	    
 	    if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL ) 	   
 	    {
-		 if( (fscanf(pidfp, "%ld", &dhcpid)==1) 
+		 if( (fscanf(pidfp, "%u", &dhcpid)==1) 
 		   &&(dhcpid > 0)
 		    )
 		 {
-		     snprintf(procfn,256,"/proc/%ld",dhcpid);
+		     snprintf(procfn,256,"/proc/%u",dhcpid);
 		     dhc_running = ( access(procfn, F_OK) == 0 );		     
 		 }
 		 fclose(pidfp);
 	    }
 	    if( dhc_running )
 	    {
-		log_fatal("dhclient(%ld) is already running - exiting. ", dhcpid);
+		log_fatal("dhclient(%u) is already running - exiting. ", dhcpid);
 		return(1);
 	    }	    
 	}	
@@ -3010,7 +3010,9 @@
 			      case S_INIT:
 			      case S_REBINDING:
 			      case S_STOPPED:
+			      case S_DECLINED:
 				break;
+				
 			}
 			client -> state = S_INIT;
 			state_reboot (client);
--- dhcp-3.0.4/includes/omapip/omapip.h.gcc4_warnings	2004-06-10 13:59:39.000000000 -0400
+++ dhcp-3.0.4/includes/omapip/omapip.h	2006-05-06 23:58:55.000000000 -0400
@@ -251,12 +251,12 @@
 		     omapi_array_foreach_index++) {			      \
 			if ((array) -> data [omapi_array_foreach_index]) {    \
 				((*(array) -> ref)			      \
-				 ((char **)&var,			      \
+				 ((void*)&var,			              \
 				  (array) -> data [omapi_array_foreach_index],\
 				  MDL));
 
 #define	omapi_array_foreach_end(array, stype, var)			      \
-				(*(array) -> deref) ((char **)&var, MDL);     \
+				(*(array) -> deref) ((void*)&var, MDL);       \
 			}						      \
 		}							      \
 	}
--- dhcp-3.0.4/dhcpctl/remote.c.gcc4_warnings	2004-06-10 13:59:24.000000000 -0400
+++ dhcp-3.0.4/dhcpctl/remote.c	2006-05-07 00:24:00.000000000 -0400
@@ -122,7 +122,7 @@
 	isc_result_t status;
 
 	m = (dhcpctl_remote_object_t *)0;
-	status = omapi_object_allocate ((omapi_object_t **)&m,
+	status = omapi_object_allocate ((void*)&m,
 					dhcpctl_remote_type, 0, MDL);
 	if (status != ISC_R_SUCCESS)
 		return status;
@@ -135,7 +135,7 @@
 	}
 	status = omapi_object_reference (&m -> inner, g, MDL);
 	if (status != ISC_R_SUCCESS) {
-		omapi_object_dereference ((omapi_object_t **)&m, MDL);
+		omapi_object_dereference ((void*)&m, MDL);
 		omapi_object_dereference (&g, MDL);
 		return status;
 	}
@@ -143,7 +143,7 @@
 					 (omapi_object_t *)m, MDL);
 
 	if (status != ISC_R_SUCCESS) {
-		omapi_object_dereference ((omapi_object_t **)&m, MDL);
+		omapi_object_dereference ((void*)&m, MDL);
 		omapi_object_dereference (&g, MDL);
 		return status;
 	}
@@ -152,13 +152,13 @@
 				       omapi_datatype_string,
 				       object_type);
 	if (status != ISC_R_SUCCESS) {
-		omapi_object_dereference ((omapi_object_t **)&m, MDL);
+		omapi_object_dereference ((void*)&m, MDL);
 		omapi_object_dereference (&g, MDL);
 		return status;
 	}
 
 	status = omapi_object_reference (h, (omapi_object_t *)m, MDL);
-	omapi_object_dereference ((omapi_object_t **)&m, MDL);
+	omapi_object_dereference ((void*)&m, MDL);
 	omapi_object_dereference (&g, MDL);
 	if (status != ISC_R_SUCCESS)
 		return status;
@@ -339,7 +339,7 @@
 		return ISC_R_INVALIDARG;
 	p = (dhcpctl_remote_object_t *)h;
 	if (p -> handle)
-		omapi_object_dereference ((omapi_object_t **)&p -> handle,
+		omapi_object_dereference ((void*)&p -> handle,
 					  file, line);
 	if (p -> rtype)
 		omapi_typed_data_dereference ((omapi_typed_data_t **)&p->rtype,
--- dhcp-3.0.4/dhcpctl/callback.c.gcc4_warnings	2004-06-10 13:59:23.000000000 -0400
+++ dhcp-3.0.4/dhcpctl/callback.c	2006-05-07 00:22:46.000000000 -0400
@@ -150,7 +150,7 @@
 		return ISC_R_INVALIDARG;
 	p = (dhcpctl_callback_object_t *)h;
 	if (p -> handle)
-		omapi_object_dereference ((omapi_object_t **)&p -> handle,
+		omapi_object_dereference ((void*)&p -> handle,
 					  file, line);
 	return ISC_R_SUCCESS;
 }
--- dhcp-3.0.4/dst/dst_api.c.gcc4_warnings	2001-02-22 02:22:08.000000000 -0500
+++ dhcp-3.0.4/dst/dst_api.c	2006-05-06 23:49:35.000000000 -0400
@@ -542,8 +542,14 @@
 			 ,name));
 		return (NULL);
 	}
+
 	/* read in the key string */
-	fgets(enckey, sizeof(enckey), fp);
+	if( fgets(enckey, sizeof(enckey), fp) == NULL )
+	{
+	        EREPORT(("dst_read_public_key(): Can not read enckey field from %s\n"
+			 ,name));
+		return (NULL);
+	}
 
 	/* If we aren't at end-of-file, something is wrong.  */
 	while ((c = getc(fp)) != EOF)
@@ -866,7 +872,7 @@
 	len = cnt;
 	p = in_buff;
 
-	if (!dst_s_verify_str((const char **) &p, "Private-key-format: v")) {
+	if (!dst_s_verify_str((void*) &p, "Private-key-format: v")) {
 		EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
 		goto fail;
 	}
@@ -884,7 +890,7 @@
 
 	while (*p++ != '\n') ;	/* skip to end of line */
 
-	if (!dst_s_verify_str((const char **) &p, "Algorithm: "))
+	if (!dst_s_verify_str((void*) &p, "Algorithm: "))
 		goto fail;
 
 	if (sscanf((char *)p, "%d", &alg) != 1)
--- dhcp-3.0.4/minires/res_update.c.gcc4_warnings	2004-06-10 13:59:44.000000000 -0400
+++ dhcp-3.0.4/minires/res_update.c	2006-05-06 23:44:48.000000000 -0400
@@ -172,7 +172,7 @@
 	if (rcode != ISC_R_SUCCESS)
 		goto undone;
 
-	rcode = ns_rcode_to_isc (((HEADER *)answer)->rcode);
+	rcode = ns_rcode_to_isc (((HEADER *)(void*)answer)->rcode);
 	if (zcookie && rcode == ISC_R_BADSIG) {
 		repudiate_zone (&zcookie);
 	}

dhcp-3.0.4-version.patch:
 version.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE dhcp-3.0.4-version.patch ---
--- dhcp-3.0.4/includes/version.h.version	2006-04-27 17:38:30.000000000 -0400
+++ dhcp-3.0.4/includes/version.h	2006-05-06 23:25:17.000000000 -0400
@@ -1,3 +1,3 @@
 /* Current version of ISC DHCP Distribution. */
 
-#define DHCP_VERSION	"V3.0.4"
+#define DHCP_VERSION	"V3.0.4-RedHat"


Index: dhcp.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- dhcp.spec	2 Mar 2006 22:55:31 -0000	1.88
+++ dhcp.spec	8 May 2006 13:58:22 -0000	1.89
@@ -1,9 +1,10 @@
 %{?!DHCLIENT_EXTENDED_OPTION_ENVIRONMENT:%define DHCLIENT_EXTENDED_OPTION_ENVIRONMENT 1}
+%{?!NODEBUGINFO: %define NODEBUGINFO 0}
 Summary: A DHCP (Dynamic Host Configuration Protocol) server and relay agent.
 Name:    dhcp
-Version: 3.0.3
-Release: 26
-Epoch:   11
+Version: 3.0.4
+Release: 1
+Epoch:   12
 License: distributable
 Group: System Environment/Daemons
 Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz
@@ -60,7 +61,7 @@
 Patch153: dhcp-3.0.3-dhclient-script-ypbind-hup-ok.patch
 Patch154: dhcp-3.0.3-trailing_nul_options.patch
 Patch155: dhcp-3.0.3-gcc4_warnings.patch
-Patch156: dhcp-3.0.3-version.patch
+Patch156: dhcp-3.0.4-version.patch
 Patch157: dhcp-3.0.3-dhclient-script-up-down-hooks.patch
 Patch158: dhcp-3.0.3-bz167273.patch
 Patch159: dhcp-3.0.3-failover_ports.patch
@@ -71,13 +72,14 @@
 Patch164: dhcp-3.0.3-bz167028-ibm-unicast-bootp.patch
 Patch165: dhcp-3.0.3-trailing_nul_options_2.patch
 Patch166: dhcp-3.0.3-bz173619.patch
-Patch167: dhcp-3.0.3-gcc4.1-Werrors.patch
+Patch167: dhcp-3.0.4-gcc4_warnings.patch
 Patch168: dhcp-3.0.3-bz176270.patch
 Patch169: dhcp-3.0.3-bz176615.patch
 Patch170: dhcp-3.0.3-bz177845.patch
 Patch171: dhcp-3.0.3-bz181482.patch
-Patch172: dhcp-3.0.3-dhclient_ibmzSeries_broadcast.patch
-Patch173: dhcp-3.0.3-dhclient_ibmzSeries_-I_option.patch
+Patch172: dhcp-3.0.4-dhcient_ibmzSeries_broadcast.patch
+Patch173: dhcp-3.0.4-dhclient_ibmzSeries_-I_option.patch
+Patch174: dhcp-3.0.4-H_host-name_-F_fqdn_-T_timeout_options.patch
 URL: http://isc.org/products/DHCP/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Prereq: /sbin/chkconfig
@@ -172,32 +174,37 @@
 # patch now upstream:
 # %patch148 -p1 -b .uint8_binding_state
 %patch149 -p1 -b .dhclient_script_fast+arping
-%patch150 -p1 -b .no-__u16
+# %patch150 -p1 -b .no-__u16
+# ^- patch now upstream
 # %patch151 -p1 -b .boot-file-server
-# RFC2131 compliance: force users to specify either the
+# ^- RFC2131 compliance: force users to specify either the
 # next-server or server-name options for the tftp-boot-server.
 %patch152 -p1 -b .fast_dhclient
 %patch153 -p1 -b .ypbind_hup_ok
 #%patch154 -p1 -b .trailing_nul_options
-%patch155 -p1 -b .gcc4_warnings
+# ! %patch155 -p1 -b .gcc4_warnings
 %patch156 -p1 -b .version
 %patch157 -p1 -b .dhclient-script-up-down-hooks
 %patch158 -p1 -b .bz167273
 %patch159 -p1 -b .failover_ports
-%patch160 -p1 -b .rt15293_bz160655
+#%patch160 -p1 -b .rt15293_bz160655
+#^- patch now upstream 
 %patch161 -p1 -b .static-routes
 %patch162 -p1 -b .dhclient_script_route_metrics
 %patch163 -p1 -b .bz171312
 %patch164 -p1 -b .bz167028
-%patch165 -p1 -b .trailing_nul_options_2
+#%patch165 -p1 -b .trailing_nul_options_2
+#^- patch now upstream
 %patch166 -p1 -b .bz173619
-%patch167 -p1 -b .gcc4.1-Werrors
+%patch167 -p1 -b .gcc4_warnings
 %patch168 -p1 -b .bz176270
-%patch169 -p1 -b .bz176615
+# %patch169 -p1 -b .bz176615
+# ^- patch now upstream
 %patch170 -p1 -b .bz177845
 %patch171 -p1 -b .bz181482
 %patch172 -p1 -b .dhclient_ibmzSeries_broadcast
 %patch173 -p1 -b .dhclient_ibmzSeries_-I_option
+%patch174 -p1 -b .dhclient_-H_host-name_-F_fqdn_-T_timeout_options
 cp %SOURCE1 .
 cat <<EOF >site.conf
 VARDB=%{_localstatedir}/lib/dhcpd
@@ -218,8 +225,8 @@
 #include <stdio.h>
 int main(void) { printf("%%d\n", sizeof(void *)); return 0; }
 EOF
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Dlint -Werror"
-cc -o findptrsize findptrsize.c
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Dlint -Werror -Wno-unused"
+%{__cc} -o findptrsize findptrsize.c
 [ "`./findptrsize`" -ge 8 ] && RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DPTRSIZE_64BIT"
 %ifarch s390 s390x
 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIE"
@@ -230,14 +237,18 @@
     RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DEXTENDED_NEW_OPTION_INFO"
 %endif
 #RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/\ \-mtune\=[^\=\ ]*//'`
-export RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
-./configure --copts "$RPM_OPT_FLAGS"
+%if %{NODEBUGINFO}
+export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -g3 -gdwarf-2"
+%endif
+CC="%{__cc}" ./configure --copts "$RPM_OPT_FLAGS"
 # -DDEBUG_PACKET -DDEBUG_EXPRESSIONS"
 # -DDEBUG_MEMORY_LEAKAGE -DDEBUG_MALLOC_POOL -DDEBUG_REFCNT_DMALLOC_FREE -DDEBUG_RC_HISTORY -DDEBUG_MALLOC_POOL_EXHAUSTIVELY -DDEBUG_MEMORY_LEAKAGE_ON_EXIT -DRC_MALLOC=3"
 #make %{?_smp_mflags} CC="gcc33"
 make %{?_smp_mflags} CC="%{__cc}"
 
+%if %{NODEBUGINFO}
 %define debug_package %{nil}
+%endif
 
 %install
 rm -rf %{buildroot}
@@ -268,11 +279,12 @@
 chmod 755 %{buildroot}/sbin/dhclient-script
 # Fix bug 163367: install default (empty) dhcpd.conf:
 cp -fp %SOURCE4 %{buildroot}/etc
-
 touch debugfiles.list
-:;
+%if %{NODEBUGINFO}
 /usr/lib/rpm/brp-compress
 exit 0
+%endif
+:;
 
 %clean
 rm -rf %{buildroot}
@@ -335,6 +347,13 @@
 %{_mandir}/man3/*
 
 %changelog
+* Sat May 06 2006 Jason Vas Dias <jvdias at redhat.com> - 12:3.0.4-1
+- Upgrade to upstream version 3.0.4, released Friday 2006-05-05 .
+- Add new dhclient command line arguments:
+  -H <host-name> : parse as dhclient.conf 'send host-name "<host-name>";'
+  -F <fqdn>      : parse as dhclient.conf 'send fqdn.fqdn "<fqdn>";'
+  -T <timeout>   : parse as dhclient.conf 'timeout <timeout>;'
+
 * Thu Mar 02 2006 Jason Vas Dias <jvdias at redhat.com> - 11:3.0.3-26
 - fix bug 181908: enable dhclient to operate on IBM zSeries z/OS linux guests:
   o add -I <dhcp-client-identifier> dhclient command line option




More information about the fedora-cvs-commits mailing list