rpms/dhcp/devel dhcp-4.1.0-CLOEXEC.patch, NONE, 1.1 dhcp-4.1.0-default-requested-options.patch, NONE, 1.1 dhcp-4.1.0-dhclient-anycast.patch, NONE, 1.1 dhcp-4.1.0-dhclient-decline-backoff.patch, NONE, 1.1 dhcp-4.1.0-dhclient-usage.patch, NONE, 1.1 dhcp-4.1.0-errwarn-message.patch, NONE, 1.1 dhcp-4.1.0-failover-ports.patch, NONE, 1.1 dhcp-4.1.0-garbage-chars.patch, NONE, 1.1 dhcp-4.1.0-inherit-leases.patch, NONE, 1.1 dhcp-4.1.0-invalid-dhclient-conf.patch, NONE, 1.1 dhcp-4.1.0-ldap-configuration.patch, NONE, 1.1 dhcp-4.1.0-manpages.patch, NONE, 1.1 dhcp-4.1.0-memory.patch, NONE, 1.1 dhcp-4.1.0-options.patch, NONE, 1.1 dhcp-4.1.0-paths.patch, NONE, 1.1 dhcp-4.1.0-port-validation.patch, NONE, 1.1 dhcp-4.1.0-release-by-ifup.patch, NONE, 1.1 dhcp-4.1.0-unicast-bootp.patch, NONE, 1.1 dhcp-4.1.0-xen-checksum.patch, NONE, 1.1 .cvsignore, 1.22, 1.23 dhcp.spec, 1.232, 1.233 dhcpd.init, 1.27, 1.28 sources, 1.23, 1.24

David Cantrell dcantrel at fedoraproject.org
Tue Jan 6 23:46:55 UTC 2009


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16291

Modified Files:
	.cvsignore dhcp.spec dhcpd.init sources 
Added Files:
	dhcp-4.1.0-CLOEXEC.patch 
	dhcp-4.1.0-default-requested-options.patch 
	dhcp-4.1.0-dhclient-anycast.patch 
	dhcp-4.1.0-dhclient-decline-backoff.patch 
	dhcp-4.1.0-dhclient-usage.patch 
	dhcp-4.1.0-errwarn-message.patch 
	dhcp-4.1.0-failover-ports.patch dhcp-4.1.0-garbage-chars.patch 
	dhcp-4.1.0-inherit-leases.patch 
	dhcp-4.1.0-invalid-dhclient-conf.patch 
	dhcp-4.1.0-ldap-configuration.patch dhcp-4.1.0-manpages.patch 
	dhcp-4.1.0-memory.patch dhcp-4.1.0-options.patch 
	dhcp-4.1.0-paths.patch dhcp-4.1.0-port-validation.patch 
	dhcp-4.1.0-release-by-ifup.patch 
	dhcp-4.1.0-unicast-bootp.patch dhcp-4.1.0-xen-checksum.patch 
Log Message:
* Tue Jan 06 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-1
- Upgraded to ISC dhcp-4.1.0
- Had to rename the -T option to -timeout as ISC is now using -T
- Allow package rebuilders to easily enable DHCPv6 support with:
      rpmbuild --with DHCPv6 dhcp.spec
  Note that Fedora is still using the 'dhcpv6' package, but some
  users may want to experiment with the ISC DHCPv6 implementation
  locally.


dhcp-4.1.0-CLOEXEC.patch:

--- NEW FILE dhcp-4.1.0-CLOEXEC.patch ---
diff -up dhcp-4.1.0/client/clparse.c.cloexec dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.cloexec	2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c	2009-01-06 12:04:48.000000000 -1000
@@ -226,7 +226,7 @@ int read_client_conf_file (const char *n
 	int token;
 	isc_result_t status;
 	
-	if ((file = open (name, O_RDONLY)) < 0)
+	if ((file = open (name, O_RDONLY | O_CLOEXEC)) < 0)
 		return uerr2isc (errno);
 
 	cfile = NULL;
@@ -263,7 +263,7 @@ void read_client_leases ()
 
 	/* Open the lease file.   If we can't open it, just return -
 	   we can safely trust the server to remember our state. */
-	if ((file = open (path_dhclient_db, O_RDONLY)) < 0)
+	if ((file = open (path_dhclient_db, O_RDONLY | O_CLOEXEC)) < 0)
 		return;
 
 	cfile = NULL;
diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.cloexec	2009-01-06 11:56:10.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 12:04:01.000000000 -1000
@@ -135,11 +135,11 @@ main(int argc, char **argv) {
 	/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
 	   2 (stderr) are open. To do this, we assume that when we
 	   open a file the lowest available file descriptor is used. */
-	fd = open("/dev/null", O_RDWR);
+	fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 0)
-		fd = open("/dev/null", O_RDWR);
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 1)
-		fd = open("/dev/null", O_RDWR);
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 2)
 		log_perror = 0; /* No sense logging to /dev/null. */
 	else if (fd != -1)
@@ -465,7 +465,7 @@ main(int argc, char **argv) {
 		int e;
 
 		oldpid = 0;
-		if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
+		if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
 			e = fscanf(pidfd, "%ld\n", &temp);
 			oldpid = (pid_t)temp;
 
@@ -507,7 +507,7 @@ main(int argc, char **argv) {
 					strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
 					sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
 
-					if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) {
+					if ((pidfd = fopen(new_path_dhclient_pid, "re")) != NULL) {
 						e = fscanf(pidfd, "%ld\n", &temp);
 						oldpid = (pid_t)temp;
 
@@ -532,7 +532,7 @@ main(int argc, char **argv) {
 		int dhc_running = 0;
 		char procfn[256] = "";
 
-		if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) {
+		if ((pidfp = fopen(path_dhclient_pid, "re")) != NULL) {
 			if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
 				snprintf(procfn,256,"/proc/%u",dhcpid);
 				dhc_running = (access(procfn, F_OK) == 0);
@@ -2908,7 +2908,7 @@ void rewrite_client_leases ()
 
 	if (leaseFile != NULL)
 		fclose (leaseFile);
-	leaseFile = fopen (path_dhclient_db, "w");
+	leaseFile = fopen (path_dhclient_db, "we");
 	if (leaseFile == NULL) {
 		log_error ("can't create %s: %m", path_dhclient_db);
 		return;
@@ -3012,7 +3012,7 @@ write_duid(struct data_string *duid)
 		return ISC_R_INVALIDARG;
 
 	if (leaseFile == NULL) {	/* XXX? */
-		leaseFile = fopen(path_dhclient_db, "w");
+		leaseFile = fopen(path_dhclient_db, "we");
 		if (leaseFile == NULL) {
 			log_error("can't create %s: %m", path_dhclient_db);
 			return ISC_R_IOERROR;
@@ -3192,7 +3192,7 @@ int write_client_lease (client, lease, r
 		return 1;
 
 	if (leaseFile == NULL) {	/* XXX */
-		leaseFile = fopen (path_dhclient_db, "w");
+		leaseFile = fopen (path_dhclient_db, "we");
 		if (leaseFile == NULL) {
 			log_error ("can't create %s: %m", path_dhclient_db);
 			return 0;
@@ -3638,9 +3638,9 @@ void go_daemon ()
 	close(2);
 
 	/* Reopen them on /dev/null. */
-	open("/dev/null", O_RDWR);
-	open("/dev/null", O_RDWR);
-	open("/dev/null", O_RDWR);
+	open("/dev/null", O_RDWR | O_CLOEXEC);
+	open("/dev/null", O_RDWR | O_CLOEXEC);
+	open("/dev/null", O_RDWR | O_CLOEXEC);
 
 	write_client_pid_file ();
 
@@ -3652,14 +3652,14 @@ void write_client_pid_file ()
 	FILE *pf;
 	int pfdesc;
 
-	pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY, 0644);
+	pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
 
 	if (pfdesc < 0) {
 		log_error ("Can't create %s: %m", path_dhclient_pid);
 		return;
 	}
 
-	pf = fdopen (pfdesc, "w");
+	pf = fdopen (pfdesc, "we");
 	if (!pf)
 		log_error ("Can't fdopen %s: %m", path_dhclient_pid);
 	else {
diff -up dhcp-4.1.0/common/bpf.c.cloexec dhcp-4.1.0/common/bpf.c
--- dhcp-4.1.0/common/bpf.c.cloexec	2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/bpf.c	2009-01-06 11:56:11.000000000 -1000
@@ -94,7 +94,7 @@ int if_register_bpf (info)
 	for (b = 0; 1; b++) {
 		/* %Audit% 31 bytes max. %2004.06.17,Safe% */
 		sprintf(filename, BPF_FORMAT, b);
-		sock = open (filename, O_RDWR, 0);
+		sock = open (filename, O_RDWR | O_CLOEXEC, 0);
 		if (sock < 0) {
 			if (errno == EBUSY) {
 				continue;
diff -up dhcp-4.1.0/common/discover.c.cloexec dhcp-4.1.0/common/discover.c
--- dhcp-4.1.0/common/discover.c.cloexec	2008-08-29 07:48:57.000000000 -1000
+++ dhcp-4.1.0/common/discover.c	2009-01-06 11:56:11.000000000 -1000
@@ -409,7 +409,7 @@ begin_iface_scan(struct iface_conf_list 
 	int len;
 	int i;
 
-	ifaces->fp = fopen("/proc/net/dev", "r");
+	ifaces->fp = fopen("/proc/net/dev", "re");
 	if (ifaces->fp == NULL) {
 		log_error("Error opening '/proc/net/dev' to list interfaces");
 		return 0;
@@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list 
 	}
 
 #ifdef DHCPv6
-	ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+	ifaces->fp6 = fopen("/proc/net/if_inet6", "re");
 	if (ifaces->fp6 == NULL) {
 		log_error("Error opening '/proc/net/if_inet6' to "
 			  "list IPv6 interfaces; %m");
diff -up dhcp-4.1.0/common/dlpi.c.cloexec dhcp-4.1.0/common/dlpi.c
--- dhcp-4.1.0/common/dlpi.c.cloexec	2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/dlpi.c	2009-01-06 11:56:11.000000000 -1000
@@ -795,7 +795,7 @@ dlpiopen(const char *ifname) {
 	}
 	*dp = '\0';
 	
-	return open (devname, O_RDWR, 0);
+	return open (devname, O_RDWR | O_CLOEXEC, 0);
 }
 
 /*
diff -up dhcp-4.1.0/common/nit.c.cloexec dhcp-4.1.0/common/nit.c
--- dhcp-4.1.0/common/nit.c.cloexec	2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/nit.c	2009-01-06 11:56:11.000000000 -1000
@@ -81,7 +81,7 @@ int if_register_nit (info)
 	struct strioctl sio;
 
 	/* Open a NIT device */
-	sock = open ("/dev/nit", O_RDWR);
+	sock = open ("/dev/nit", O_RDWR | O_CLOEXEC);
 	if (sock < 0)
 		log_fatal ("Can't open NIT device for %s: %m", info -> name);
 
diff -up dhcp-4.1.0/common/resolv.c.cloexec dhcp-4.1.0/common/resolv.c
--- dhcp-4.1.0/common/resolv.c.cloexec	2008-03-07 10:12:44.000000000 -1000
+++ dhcp-4.1.0/common/resolv.c	2009-01-06 12:05:17.000000000 -1000
@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
 	struct domain_search_list *dp, *dl, *nd;
 	isc_result_t status;
 
-	if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
+	if ((file = open (path_resolv_conf, O_RDONLY | O_CLOEXEC)) < 0) {
 		log_error ("Can't open %s: %m", path_resolv_conf);
 		return;
 	}
diff -up dhcp-4.1.0/common/upf.c.cloexec dhcp-4.1.0/common/upf.c
--- dhcp-4.1.0/common/upf.c.cloexec	2009-01-06 11:56:11.000000000 -1000
+++ dhcp-4.1.0/common/upf.c	2009-01-06 11:56:11.000000000 -1000
@@ -77,7 +77,7 @@ int if_register_upf (info)
 		/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
 		sprintf(filename, "/dev/pf/pfilt%d", b);
 
-		sock = open (filename, O_RDWR, 0);
+		sock = open (filename, O_RDWR | O_CLOEXEC, 0);
 		if (sock < 0) {
 			if (errno == EBUSY) {
 				continue;
diff -up dhcp-4.1.0/dst/dst_api.c.cloexec dhcp-4.1.0/dst/dst_api.c
--- dhcp-4.1.0/dst/dst_api.c.cloexec	2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/dst/dst_api.c	2009-01-06 11:56:11.000000000 -1000
@@ -436,7 +436,7 @@ dst_s_write_private_key(const DST_KEY *k
 			     PRIVATE_KEY, PATH_MAX);
 
 	/* Do not overwrite an existing file */
-	if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) {
+	if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) {
 		int nn;
 		if ((nn = fwrite(encoded_block, 1, len, fp)) != len) {
 			EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n",
@@ -493,7 +493,7 @@ dst_s_read_public_key(const char *in_nam
 	 * flags, proto, alg stored as decimal (or hex numbers FIXME).
 	 * (FIXME: handle parentheses for line continuation.)
 	 */
-	if ((fp = dst_s_fopen(name, "r", 0)) == NULL) {
+	if ((fp = dst_s_fopen(name, "re", 0)) == NULL) {
 		EREPORT(("dst_read_public_key(): Public Key not found %s\n",
 			 name));
 		return (NULL);
@@ -615,7 +615,7 @@ dst_s_write_public_key(const DST_KEY *ke
 		return (0);
 	}
 	/* create public key file */
-	if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) {
+	if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) {
 		EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
 			 filename, errno));
 		return (0);
@@ -849,7 +849,7 @@ dst_s_read_private_key_file(char *name, 
 		return (0);
 	}
 	/* first check if we can find the key file */
-	if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) {
+	if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) {
 		EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n",
 			 filename, dst_path[0] ? dst_path :
 			 (char *) getcwd(NULL, PATH_MAX - 1)));
diff -up dhcp-4.1.0/dst/prandom.c.cloexec dhcp-4.1.0/dst/prandom.c
--- dhcp-4.1.0/dst/prandom.c.cloexec	2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/dst/prandom.c	2009-01-06 11:56:11.000000000 -1000
@@ -267,7 +267,7 @@ get_dev_random(u_char *output, unsigned 
 
 	s = stat("/dev/random", &st);
 	if (s == 0 && S_ISCHR(st.st_mode)) {
-		if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) {
+		if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) {
 			if ((n = read(fd, output, size)) < 0)
 				n = 0;
 			close(fd);
@@ -478,7 +478,7 @@ digest_file(dst_work *work) 
 		work->file_digest = dst_free_key(work->file_digest);
 		return (0);
 	}
-	if ((fp = fopen(name, "r")) == NULL) 
+	if ((fp = fopen(name, "re")) == NULL) 
 		return (0);
 	for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0; 
 	     no += i) 
diff -up dhcp-4.1.0/minires/res_init.c.cloexec dhcp-4.1.0/minires/res_init.c
--- dhcp-4.1.0/minires/res_init.c.cloexec	2008-02-28 11:21:56.000000000 -1000
+++ dhcp-4.1.0/minires/res_init.c	2009-01-06 11:56:11.000000000 -1000
@@ -233,7 +233,7 @@ minires_vinit(res_state statp, int prein
 	(line[sizeof(name) - 1] == ' ' || \
 	 line[sizeof(name) - 1] == '\t'))
 
-	if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
+	if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) {
 	    /* read the config file */
 	    while (fgets(buf, sizeof(buf), fp) != NULL) {
 		/* skip comments */
diff -up dhcp-4.1.0/minires/res_query.c.cloexec dhcp-4.1.0/minires/res_query.c
--- dhcp-4.1.0/minires/res_query.c.cloexec	2008-02-28 11:21:56.000000000 -1000
+++ dhcp-4.1.0/minires/res_query.c	2009-01-06 11:56:11.000000000 -1000
@@ -379,7 +379,7 @@ res_hostalias(const res_state statp, con
 	if (statp->options & RES_NOALIASES)
 		return (NULL);
 	file = getenv("HOSTALIASES");
-	if (file == NULL || (fp = fopen(file, "r")) == NULL)
+	if (file == NULL || (fp = fopen(file, "re")) == NULL)
 		return (NULL);
 	setbuf(fp, NULL);
 	buf[sizeof(buf) - 1] = '\0';
diff -up dhcp-4.1.0/omapip/trace.c.cloexec dhcp-4.1.0/omapip/trace.c
--- dhcp-4.1.0/omapip/trace.c.cloexec	2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/omapip/trace.c	2009-01-06 11:56:11.000000000 -1000
@@ -140,10 +140,10 @@ isc_result_t trace_begin (const char *fi
 		return ISC_R_INVALIDARG;
 	}
 
-	traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0600);
+	traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL | O_CLOEXEC, 0600);
 	if (traceoutfile < 0 && errno == EEXIST) {
 		log_error ("WARNING: Overwriting trace file \"%s\"", filename);
-		traceoutfile = open (filename, O_WRONLY | O_EXCL, 0600);
+		traceoutfile = open (filename, O_WRONLY | O_EXCL | O_CLOEXEC, 0600);
 	}
 
 	if (traceoutfile < 0) {
@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
 	isc_result_t result;
 	int len;
 
-	traceinfile = fopen (filename, "r");
+	traceinfile = fopen (filename, "re");
 	if (!traceinfile) {
 		log_error ("Can't open tracefile %s: %m", filename);
 		return;
diff -up dhcp-4.1.0/relay/dhcrelay.c.cloexec dhcp-4.1.0/relay/dhcrelay.c
--- dhcp-4.1.0/relay/dhcrelay.c.cloexec	2008-11-12 13:22:14.000000000 -1000
+++ dhcp-4.1.0/relay/dhcrelay.c	2009-01-06 12:06:23.000000000 -1000
@@ -174,11 +174,11 @@ main(int argc, char **argv) {
 	/* Make sure that file descriptors 0(stdin), 1,(stdout), and
 	   2(stderr) are open. To do this, we assume that when we
 	   open a file the lowest available file descriptor is used. */
-	fd = open("/dev/null", O_RDWR);
+	fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 0)
-		fd = open("/dev/null", O_RDWR);
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 1)
-		fd = open("/dev/null", O_RDWR);
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
 	if (fd == 2)
 		log_perror = 0; /* No sense logging to /dev/null. */
 	else if (fd != -1)
@@ -511,12 +511,12 @@ main(int argc, char **argv) {
 			exit(0);
 
 		pfdesc = open(path_dhcrelay_pid,
-			       O_CREAT | O_TRUNC | O_WRONLY, 0644);
+			       O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
 
 		if (pfdesc < 0) {
 			log_error("Can't create %s: %m", path_dhcrelay_pid);
 		} else {
-			pf = fdopen(pfdesc, "w");
+			pf = fdopen(pfdesc, "we");
 			if (!pf)
 				log_error("Can't fdopen %s: %m",
 				      path_dhcrelay_pid);
diff -up dhcp-4.1.0/server/confpars.c.cloexec dhcp-4.1.0/server/confpars.c
--- dhcp-4.1.0/server/confpars.c.cloexec	2009-01-06 11:56:10.000000000 -1000
+++ dhcp-4.1.0/server/confpars.c	2009-01-06 11:56:11.000000000 -1000
@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char 
 	}
 #endif
 
-	if ((file = open (filename, O_RDONLY)) < 0) {
+	if ((file = open (filename, O_RDONLY | O_CLOEXEC)) < 0) {
 		if (leasep) {
 			log_error ("Can't open lease database %s: %m --",
 				   path_dhcpd_db);
diff -up dhcp-4.1.0/server/db.c.cloexec dhcp-4.1.0/server/db.c
--- dhcp-4.1.0/server/db.c.cloexec	2008-03-31 03:49:45.000000000 -1000
+++ dhcp-4.1.0/server/db.c	2009-01-06 11:56:11.000000000 -1000
@@ -1021,7 +1021,7 @@ void db_startup (testp)
 	}
 #endif
 	if (!testp) {
-		db_file = fopen (path_dhcpd_db, "a");
+		db_file = fopen (path_dhcpd_db, "ae");
 		if (!db_file)
 			log_fatal ("Can't open %s for append.", path_dhcpd_db);
 		expire_all_pools ();
@@ -1069,12 +1069,12 @@ int new_lease_file ()
 		     path_dhcpd_db, (int)t) >= sizeof newfname)
 		log_fatal("new_lease_file: lease file path too long");
 
-	db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
+	db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0664);
 	if (db_fd < 0) {
 		log_error ("Can't create new lease file: %m");
 		return 0;
 	}
-	if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
+	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
 		log_error("Can't fdopen new lease file: %m");
 		close(db_fd);
 		goto fdfail;
diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c
--- dhcp-4.1.0/server/dhcpd.c.cloexec	2009-01-06 11:56:09.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.c	2009-01-06 12:06:49.000000000 -1000
@@ -266,11 +266,11 @@ main(int argc, char **argv) {
         /* Make sure that file descriptors 0 (stdin), 1, (stdout), and
            2 (stderr) are open. To do this, we assume that when we
            open a file the lowest available file descriptor is used. */
-        fd = open("/dev/null", O_RDWR);
+        fd = open("/dev/null", O_RDWR | O_CLOEXEC);
         if (fd == 0)
-                fd = open("/dev/null", O_RDWR);
+                fd = open("/dev/null", O_RDWR | O_CLOEXEC);
         if (fd == 1)
-                fd = open("/dev/null", O_RDWR);
+                fd = open("/dev/null", O_RDWR | O_CLOEXEC);
         if (fd == 2)
                 log_perror = 0; /* No sense logging to /dev/null. */
         else if (fd != -1)
@@ -779,7 +779,7 @@ main(int argc, char **argv) {
 #endif /* PARANOIA */
 
 	/* Read previous pid file. */
-	if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
+	if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) {
 		status = read(i, pbuf, (sizeof pbuf) - 1);
 		close (i);
 		if (status > 0) {
@@ -797,7 +797,7 @@ main(int argc, char **argv) {
 	}
 
         /* Write new pid file. */
-        if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0) {
+        if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644)) >= 0) {
                 sprintf(pbuf, "%d\n", (int) getpid());
                 write(i, pbuf, strlen(pbuf));
                 close(i);
@@ -823,9 +823,9 @@ main(int argc, char **argv) {
                 close(2);
 
                 /* Reopen them on /dev/null. */
-                open("/dev/null", O_RDWR);
-                open("/dev/null", O_RDWR);
-                open("/dev/null", O_RDWR);
+                open("/dev/null", O_RDWR | O_CLOEXEC);
+                open("/dev/null", O_RDWR | O_CLOEXEC);
+                open("/dev/null", O_RDWR | O_CLOEXEC);
                 log_perror = 0; /* No sense logging to /dev/null. */
 
                 chdir("/");
diff -up dhcp-4.1.0/server/ldap.c.cloexec dhcp-4.1.0/server/ldap.c
--- dhcp-4.1.0/server/ldap.c.cloexec	2009-01-06 11:56:09.000000000 -1000
+++ dhcp-4.1.0/server/ldap.c	2009-01-06 11:56:11.000000000 -1000
@@ -685,7 +685,7 @@ ldap_start (void)
 
   if (ldap_debug_file != NULL && ldap_debug_fd == -1)
     {
-      if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY,
+      if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
                                  S_IRUSR | S_IWUSR)) < 0)
         log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
                    strerror (errno));

dhcp-4.1.0-default-requested-options.patch:

--- NEW FILE dhcp-4.1.0-default-requested-options.patch ---
diff -up dhcp-4.1.0/client/clparse.c.requested dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.requested	2009-01-06 10:40:46.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c	2009-01-06 10:40:47.000000000 -1000
@@ -37,7 +37,7 @@
 
 struct client_config top_level_config;
 
-#define NUM_DEFAULT_REQUESTED_OPTS	9
+#define NUM_DEFAULT_REQUESTED_OPTS	12
 struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
 
 static void parse_client_default_duid(struct parse *cfile);
@@ -111,6 +111,21 @@ isc_result_t read_client_conf ()
 	option_code_hash_lookup(&default_requested_options[8],
 				dhcpv6_universe.code_hash, &code, 0, MDL);
 
+	/* 10 */
+	code = DHO_NIS_DOMAIN;
+	option_code_hash_lookup(&default_requested_options[9],
+				dhcp_universe.code_hash, &code, 0, MDL);
+
+	/* 11 */
+	code = DHO_NIS_SERVERS;
+	option_code_hash_lookup(&default_requested_options[10],
+				dhcp_universe.code_hash, &code, 0, MDL);
+
+	/* 12 */
+	code = DHO_NTP_SERVERS;
+	option_code_hash_lookup(&default_requested_options[11],
+				dhcp_universe.code_hash, &code, 0, MDL);
+
 	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
 		if (default_requested_options[code] == NULL)
 			log_fatal("Unable to find option definition for "

dhcp-4.1.0-dhclient-anycast.patch:

--- NEW FILE dhcp-4.1.0-dhclient-anycast.patch ---
diff -up dhcp-4.1.0/client/clparse.c.anycast dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.anycast	2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c	2009-01-06 10:43:53.000000000 -1000
@@ -558,6 +558,17 @@ void parse_client_statement (cfile, ip, 
 		}
 		return;
 
+	      case ANYCAST_MAC:
+		token = next_token (&val, (unsigned *)0, cfile);
+		if (ip) {
+			parse_hardware_param (cfile, &ip -> anycast_mac_addr);
+		} else {
+			parse_warn (cfile, "anycast mac address parameter %s",
+			            "not allowed here.");
+			skip_to_semi (cfile);
+		}
+		return;
+
 	      case REQUEST:
 		token = next_token (&val, (unsigned *)0, cfile);
 		if (config -> requested_options == default_requested_options)
diff -up dhcp-4.1.0/common/conflex.c.anycast dhcp-4.1.0/common/conflex.c
--- dhcp-4.1.0/common/conflex.c.anycast	2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/common/conflex.c	2009-01-06 10:43:53.000000000 -1000
@@ -729,6 +729,8 @@ intern(char *atom, enum dhcp_token dfv) 
 		}
 		if (!strcasecmp (atom + 1, "nd"))
 			return AND;
+		if (!strcasecmp (atom + 1, "nycast-mac"))
+			return ANYCAST_MAC;
 		if (!strcasecmp (atom + 1, "ppend"))
 			return APPEND;
 		if (!strcasecmp (atom + 1, "llow"))
diff -up dhcp-4.1.0/common/lpf.c.anycast dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.anycast	2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c	2009-01-06 10:43:53.000000000 -1000
@@ -333,6 +333,9 @@ ssize_t send_packet (interface, packet, 
 		return send_fallback (interface, packet, raw,
 				      len, from, to, hto);
 
+	if (hto == NULL && interface->anycast_mac_addr.hlen)
+		hto = &interface->anycast_mac_addr;
+
 	/* Assemble the headers... */
 	assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
 	fudge = hbufp % 4;	/* IP header must be word-aligned. */
diff -up dhcp-4.1.0/includes/dhcpd.h.anycast dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.anycast	2009-01-06 10:43:53.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 10:43:53.000000000 -1000
@@ -1215,6 +1215,7 @@ struct interface_info {
 	int dlpi_sap_length;
 	struct hardware dlpi_broadcast_addr;
 # endif /* DLPI_SEND || DLPI_RECEIVE */
+	struct hardware anycast_mac_addr;
 };
 
 struct hardware_link {
diff -up dhcp-4.1.0/includes/dhctoken.h.anycast dhcp-4.1.0/includes/dhctoken.h
--- dhcp-4.1.0/includes/dhctoken.h.anycast	2009-01-06 10:43:52.000000000 -1000
+++ dhcp-4.1.0/includes/dhctoken.h	2009-01-06 10:49:12.000000000 -1000
@@ -353,7 +353,8 @@ enum dhcp_token {
 	TEMPORARY = 656,
 	PREFIX6 = 657,
 	FIXED_PREFIX6 = 658,
-	BOOTP_BROADCAST_ALWAYS = 659
+	BOOTP_BROADCAST_ALWAYS = 659,
+	ANYCAST_MAC = 660
 };
 
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\

dhcp-4.1.0-dhclient-decline-backoff.patch:

--- NEW FILE dhcp-4.1.0-dhclient-decline-backoff.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.backoff	2009-01-06 10:08:07.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 10:10:27.000000000 -1000
@@ -1185,6 +1185,7 @@ void state_init (cpp)
 	void *cpp;
 {
 	struct client_state *client = cpp;
+	enum dhcp_state init_state = client->state;
 
 	ASSERT_STATE(state, S_INIT);
 
@@ -1197,9 +1198,16 @@ void state_init (cpp)
 	client -> first_sending = cur_time;
 	client -> interval = client -> config -> initial_interval;
 
-	/* Add an immediate timeout to cause the first DHCPDISCOVER packet
-	   to go out. */
-	send_discover (client);
+	if (init_state != S_DECLINED) {
+		/* Add an immediate timeout to cause the first DHCPDISCOVER packet
+		   to go out. */
+		send_discover(client);
+	} else {
+		/* We've received an OFFER and it has been DECLINEd by dhclient-script.
+		 * wait for a random time between 1 and backoff_cutoff seconds before
+		 * trying again. */
+		add_timeout(cur_time + ((1 + (random() >> 2)) %  client->config->backoff_cutoff), send_discover, client, 0, 0);
+	}
 }
 
 /*
@@ -1478,6 +1486,7 @@ void bind_lease (client)
 		send_decline (client);
 		destroy_client_lease (client -> new);
 		client -> new = (struct client_lease *)0;
+		client -> state = S_DECLINED;
 		state_init (client);
 		return;
 	}
@@ -3680,6 +3689,7 @@ void client_location_changed ()
 			      case S_INIT:
 			      case S_REBINDING:
 			      case S_STOPPED:
+			      case S_DECLINED:
 				break;
 			}
 			client -> state = S_INIT;
diff -up dhcp-4.1.0/includes/dhcpd.h.backoff dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.backoff	2009-01-06 10:08:07.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 10:08:07.000000000 -1000
@@ -1016,7 +1016,8 @@ enum dhcp_state {
 	S_BOUND = 5,
 	S_RENEWING = 6,
 	S_REBINDING = 7,
-	S_STOPPED = 8
+	S_STOPPED = 8,
+	S_DECLINED = 9
 };
 
 /* Authentication and BOOTP policy possibilities (not all values work

dhcp-4.1.0-dhclient-usage.patch:

--- NEW FILE dhcp-4.1.0-dhclient-usage.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.usage dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.usage	2009-01-06 10:36:55.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 10:39:58.000000000 -1000
@@ -990,6 +990,10 @@ static void usage()
 		  "[-s server]");
 	log_error("                [-cf config-file] [-lf lease-file]%s",
 		  "[-pf pid-file] [-e VAR=val]");
+	log_error("                [-I <dhcp-client-identifier>] [-B]");
+	log_error("                [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]");
+	log_error("                [-V <vendor-class-identifier>]");
+	log_error("                [-R <request option list>]");
 	log_fatal("                [-sf script-file] [interface]");
 }
 

dhcp-4.1.0-errwarn-message.patch:

--- NEW FILE dhcp-4.1.0-errwarn-message.patch ---
diff -up dhcp-4.1.0/omapip/errwarn.c.errwarn dhcp-4.1.0/omapip/errwarn.c
--- dhcp-4.1.0/omapip/errwarn.c.errwarn	2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/omapip/errwarn.c	2009-01-06 07:02:20.000000000 -1000
@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
 
 #if !defined (NOMINUM)
   log_error ("%s", "");
-  log_error ("If you did not get this software from ftp.isc.org, please");
-  log_error ("get the latest from ftp.isc.org and install that before");
-  log_error ("requesting help.");
+  log_error ("This version of ISC DHCP is based on the release available");
+  log_error ("on ftp.isc.org.  Features have been added and other changes");
+  log_error ("have been made to the base software release in order to make");
+  log_error ("it work better with this distribution.");
   log_error ("%s", "");
-  log_error ("If you did get this software from ftp.isc.org and have not");
-  log_error ("yet read the README, please read it before requesting help.");
-  log_error ("If you intend to request help from the dhcp-server at isc.org");
-  log_error ("mailing list, please read the section on the README about");
-  log_error ("submitting bug reports and requests for help.");
-  log_error ("%s", "");
-  log_error ("Please do not under any circumstances send requests for");
-  log_error ("help directly to the authors of this software - please");
-  log_error ("send them to the appropriate mailing list as described in");
-  log_error ("the README file.");
+  log_error ("Please report for this software via the Red Hat Bugzilla site:");
+  log_error ("    http://bugzilla.redhat.com");
   log_error ("%s", "");
   log_error ("exiting.");
 #endif

dhcp-4.1.0-failover-ports.patch:

--- NEW FILE dhcp-4.1.0-failover-ports.patch ---
diff -up dhcp-4.1.0/server/confpars.c.failover dhcp-4.1.0/server/confpars.c
--- dhcp-4.1.0/server/confpars.c.failover	2009-01-06 10:24:38.000000000 -1000
+++ dhcp-4.1.0/server/confpars.c	2009-01-06 10:24:38.000000000 -1000
@@ -1142,10 +1142,17 @@ void parse_failover_peer (cfile, group, 
 		parse_warn (cfile, "peer address may not be omitted");
 
 	/* XXX - when/if we get a port number assigned, just set as default */
+	/* See Red Hat Bugzilla 167292:
+	 * we do now:  dhcp-failover 647/tcp
+	 *             dhcp-failover 647/udp
+	 *             dhcp-failover 847/tcp
+	 *             dhcp-failover 847/udp
+	 * IANA registration by Bernard Volz <volz at cisco.com>
+	 */
 	if (!peer -> me.port)
-		parse_warn (cfile, "local port may not be omitted");
+		peer -> me.port = 647;
 	if (!peer -> partner.port)
-		parse_warn (cfile, "peer port may not be omitted");
+		peer -> partner.port = 847;
 
 	if (peer -> i_am == primary) {
 	    if (!peer -> hba) {

dhcp-4.1.0-garbage-chars.patch:

--- NEW FILE dhcp-4.1.0-garbage-chars.patch ---
diff -up dhcp-4.1.0/common/tables.c.garbage dhcp-4.1.0/common/tables.c
--- dhcp-4.1.0/common/tables.c.garbage	2008-01-23 16:43:04.000000000 -1000
+++ dhcp-4.1.0/common/tables.c	2009-01-06 12:09:41.000000000 -1000
@@ -207,7 +207,7 @@ static struct option dhcp_options[] = {
 	{ "netinfo-server-tag", "t",		&dhcp_universe, 113, 1 },
 	{ "default-url", "t",			&dhcp_universe, 114, 1 },
 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
-	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
+	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
 #if 0

dhcp-4.1.0-inherit-leases.patch:

--- NEW FILE dhcp-4.1.0-inherit-leases.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.inherit dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.inherit	2009-01-06 12:08:56.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 12:08:57.000000000 -1000
@@ -2299,6 +2299,7 @@ void send_request (cpp)
 {
 	struct client_state *client = cpp;
 
+	int i;
 	int result;
 	int interval;
 	struct sockaddr_in destination;
@@ -2358,6 +2359,22 @@ void send_request (cpp)
 		/* Now do a preinit on the interface so that we can
 		   discover a new address. */
 		script_init (client, "PREINIT", (struct string_list *)0);
+
+		/* Has an active lease */
+		if (client -> interface -> addresses != NULL) {
+			for (i = 0; i < client -> interface -> address_count; i++) {
+				if (client -> active &&
+				    client -> active -> is_bootp &&
+				    client -> active -> expiry > cur_time &&
+				    client -> interface -> addresses[i].s_addr != 0 &&
+				    client -> active -> address.len == 4 &&
+				    memcpy (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) {
+					client_envadd (client, "", "keep_old_ip", "%s", "yes");
+					break;
+				}
+			}
+		}
+
 		if (client -> alias)
 			script_write_params (client, "alias_",
 					     client -> alias);

dhcp-4.1.0-invalid-dhclient-conf.patch:

--- NEW FILE dhcp-4.1.0-invalid-dhclient-conf.patch ---
diff -up dhcp-4.1.0/client/dhclient.conf.supersede dhcp-4.1.0/client/dhclient.conf
--- dhcp-4.1.0/client/dhclient.conf.supersede	1997-06-02 12:50:44.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.conf	2009-01-06 12:27:08.000000000 -1000
@@ -1,10 +1,10 @@
 send host-name "andare.fugue.com";
 send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
 send dhcp-lease-time 3600;
-supersede domain-name "fugue.com home.vix.com";
+supersede domain-search "fugue.com home.vix.com";
 prepend domain-name-servers 127.0.0.1;
 request subnet-mask, broadcast-address, time-offset, routers,
-	domain-name, domain-name-servers, host-name;
+	domain-search, domain-name, domain-name-servers, host-name;
 require subnet-mask, domain-name-servers;
 timeout 60;
 retry 60;

dhcp-4.1.0-ldap-configuration.patch:

--- NEW FILE dhcp-4.1.0-ldap-configuration.patch ---
diff -up dhcp-4.1.0/common/conflex.c.ldap dhcp-4.1.0/common/conflex.c
--- dhcp-4.1.0/common/conflex.c.ldap	2008-03-07 10:12:44.000000000 -1000
+++ dhcp-4.1.0/common/conflex.c	2009-01-06 07:03:13.000000000 -1000
@@ -43,6 +43,7 @@ static enum dhcp_token read_string PROTO
 static enum dhcp_token read_number PROTO ((int, struct parse *));
 static enum dhcp_token read_num_or_name PROTO ((int, struct parse *));
 static enum dhcp_token intern PROTO ((char *, enum dhcp_token));
+static int read_function PROTO ((struct parse *));
 
 isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp)
 	struct parse **cfile;
@@ -73,6 +74,10 @@ isc_result_t new_parse (cfile, file, inb
 	tmp->file = file;
 	tmp->eol_token = eolp;
 
+	if (file != -1) {
+		tmp -> read_function = read_function;
+	}
+
 	if (inbuf != NULL) {
 		tmp->inbuf = inbuf;
 		tmp->buflen = buflen;
@@ -177,9 +182,13 @@ static int get_char (cfile)
 	/* My kingdom for WITH... */
 	int c;
 
-	if (cfile->bufix == cfile->buflen)
-		c = EOF;
-	else {
+	if (cfile->bufix == cfile->buflen) {
+		if (cfile -> read_function) {
+			c = cfile -> read_function (cfile);
+		} else {
+			c = EOF;
+		}
+	} else {
 		c = cfile->inbuf [cfile->bufix];
 		cfile->bufix++;
 	}
@@ -1443,3 +1452,25 @@ intern(char *atom, enum dhcp_token dfv) 
 	}
 	return dfv;
 }
+
+static int
+read_function (struct parse * cfile)
+{
+	int c;
+
+	ssize_t n = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz);
+	if (n == 0) {
+		c = EOF;
+		cfile -> bufix = 0;
+		cfile -> buflen = 0;
+	} else if (n < 0) {
+		c = EOF;
+		cfile -> bufix = cfile -> buflen = 0;
+	} else {
+		c = cfile -> inbuf [0];
+		cfile -> bufix = 1;
+		cfile -> buflen = n;
+	}
+
+	return c;
+}
diff -up dhcp-4.1.0/common/print.c.ldap dhcp-4.1.0/common/print.c
--- dhcp-4.1.0/common/print.c.ldap	2007-10-01 04:47:35.000000000 -1000
+++ dhcp-4.1.0/common/print.c	2009-01-06 07:03:13.000000000 -1000
@@ -163,9 +163,9 @@ char *print_base64 (const unsigned char 
 }
 
 char *print_hw_addr (htype, hlen, data)
-	int htype;
-	int hlen;
-	unsigned char *data;
+	const int htype;
+	const int hlen;
+	const unsigned char *data;
 {
 	static char habuf [49];
 	char *s;
diff -up dhcp-4.1.0/dst/Makefile.am.ldap dhcp-4.1.0/dst/Makefile.am
--- dhcp-4.1.0/dst/Makefile.am.ldap	2007-05-29 06:32:10.000000000 -1000
+++ dhcp-4.1.0/dst/Makefile.am	2009-01-06 07:03:13.000000000 -1000
@@ -2,7 +2,12 @@ AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
 
 lib_LIBRARIES = libdst.a
 
+noinst_LIBRARIES = libdstnomd5.a
+
 libdst_a_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
 		   base64.c prandom.c
 
+libdstnomd5_a_SOURCES = dst_support.c dst_api.c hmac_link.c \
+		   base64.c prandom.c
+
 EXTRA_DIST = dst_internal.h md5.h md5_locl.h
diff -up dhcp-4.1.0/includes/dhcpd.h.ldap dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.ldap	2008-08-29 07:48:57.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 07:03:13.000000000 -1000
@@ -102,6 +102,11 @@ typedef time_t TIME;
 #include <isc-dhcp/result.h>
 #include <omapip/omapip_p.h>
 
+#if defined(LDAP_CONFIGURATION)
+# include <ldap.h>
+# include <sys/utsname.h> /* for uname() */
+#endif
+
 #if !defined (BYTE_NAME_HASH_SIZE)
 # define BYTE_NAME_HASH_SIZE	401	/* Default would be ridiculous. */
 #endif
@@ -291,6 +296,8 @@ struct parse {
 	size_t bufsiz;
 
 	struct parse *saved_state;
+
+	int (*read_function) (struct parse *);
 };
 
 /* Variable-length array of data. */
@@ -422,6 +429,32 @@ struct hardware {
 	u_int8_t hbuf [17];
 };
 
+#if defined(LDAP_CONFIGURATION)
+# define LDAP_BUFFER_SIZE		8192
+# define LDAP_METHOD_STATIC		0
+# define LDAP_METHOD_DYNAMIC	1
+#if defined (USE_SSL)
+# define LDAP_SSL_OFF			0
+# define LDAP_SSL_ON			1
+# define LDAP_SSL_TLS			2
+# define LDAP_SSL_LDAPS			3
+#endif
+
+/* This is a tree of the current configuration we are building from LDAP */
+struct ldap_config_stack {
+	LDAPMessage * res;	/* Pointer returned from ldap_search */
+	LDAPMessage * ldent;	/* Current item in LDAP that we're processing.
+							in res */
+	int close_brace;	/* Put a closing } after we're through with
+						this item */
+	int processed;	/* We set this flag if this base item has been
+					processed. After this base item is processed,
+					we can start processing the children */
+	struct ldap_config_stack *children;
+	struct ldap_config_stack *next;
+};
+#endif
+
 typedef enum {
 	server_startup = 0,
 	server_running = 1,
@@ -642,6 +675,29 @@ struct lease_state {
 # define DEFAULT_ACK_DELAY_USECS 250000 /* 1/4 of a second */
 #endif
 
+#if defined(LDAP_CONFIGURATION)
+# define SV_LDAP_SERVER			57
+# define SV_LDAP_PORT			58
+# define SV_LDAP_USERNAME		59
+# define SV_LDAP_PASSWORD		60
+# define SV_LDAP_BASE_DN		61
+# define SV_LDAP_METHOD			62
+# define SV_LDAP_DEBUG_FILE		63
+# define SV_LDAP_DHCP_SERVER_CN		64
+# define SV_LDAP_REFERRALS		65
+#if defined (USE_SSL)
+# define SV_LDAP_SSL			66
+# define SV_LDAP_TLS_REQCERT		67
+# define SV_LDAP_TLS_CA_FILE		68
+# define SV_LDAP_TLS_CA_DIR		69
+# define SV_LDAP_TLS_CERT		70
+# define SV_LDAP_TLS_KEY		71
+# define SV_LDAP_TLS_CRLCHECK		72
+# define SV_LDAP_TLS_CIPHERS		73
+# define SV_LDAP_TLS_RANDFILE		74
+#endif
+#endif
+
 #if !defined (DEFAULT_DEFAULT_LEASE_TIME)
 # define DEFAULT_DEFAULT_LEASE_TIME 43200
 #endif
@@ -2107,7 +2163,7 @@ extern int db_time_format;
 char *quotify_string (const char *, const char *, int);
 char *quotify_buf (const unsigned char *, unsigned, const char *, int);
 char *print_base64 (const unsigned char *, unsigned, const char *, int);
-char *print_hw_addr PROTO ((int, int, unsigned char *));
+char *print_hw_addr PROTO ((const int, const int, const unsigned char *));
 void print_lease PROTO ((struct lease *));
 void dump_raw PROTO ((const unsigned char *, unsigned));
 void dump_packet_option (struct option_cache *, struct packet *,
@@ -3228,6 +3284,20 @@ OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_l
 
 const char *binding_state_print (enum failover_state);
 
+/* ldap.c */
+#if defined(LDAP_CONFIGURATION)
[...2268 lines suppressed...]
+  if (res && ent)
+    {
+#if defined (DEBUG_LDAP)
+      char *dn = ldap_get_dn (ld, ent);
+      if (dn != NULL)
+        {
+          log_info ("Found subclass LDAP entry %s", dn);
+          ldap_memfree(dn);
+        }
+#endif
+
+      status = class_allocate (newclass, MDL);
+      if (status != ISC_R_SUCCESS)
+        {
+          log_error ("Cannot allocate memory for a new class");
+          ldap_msgfree (res);
+          return (0);
+        }
+
+      group_reference (&(*newclass)->group, class->group, MDL);
+      class_reference (&(*newclass)->superclass, class, MDL);
+      lease_limit = ldap_parse_options (ent, (*newclass)->group, 
+                                        CLASS_DECL, NULL, newclass);
+      if (lease_limit == 0)
+        (*newclass)->lease_limit = class->lease_limit; 
+      else
+        class->lease_limit = lease_limit;
+
+      if ((*newclass)->lease_limit) 
+        {
+          (*newclass)->billed_leases = 
+              dmalloc ((*newclass)->lease_limit * sizeof (struct lease *), MDL);
+          if (!(*newclass)->billed_leases) 
+            {
+              log_error ("no memory for billing");
+              class_dereference (newclass, MDL);
+              ldap_msgfree (res);
+              return (0);
+            }
+          memset ((*newclass)->billed_leases, 0, 
+                ((*newclass)->lease_limit * sizeof (*newclass)->billed_leases));
+        }
+
+      data_string_copy (&(*newclass)->hash_string, data, MDL);
+
+      ldap_msgfree (res);
+      return (1);
+    }
+
+  if(res) ldap_msgfree (res);
+  return (0);
+}
+
+#endif
diff -up dhcp-4.1.0/server/Makefile.am.ldap dhcp-4.1.0/server/Makefile.am
--- dhcp-4.1.0/server/Makefile.am.ldap	2007-05-29 06:32:11.000000000 -1000
+++ dhcp-4.1.0/server/Makefile.am	2009-01-06 07:03:12.000000000 -1000
@@ -4,12 +4,10 @@ dist_sysconf_DATA = dhcpd.conf
 sbin_PROGRAMS = dhcpd
 dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
 		omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
-		dhcpv6.c mdb6.c
+		dhcpv6.c mdb6.c ldap.c ldap_casa.c
 
-# libomapi.a this is here twice to handle circular library dependencies :(
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dst/libdst.a \
-	      ../dhcpctl/libdhcpctl.a ../minires/libres.a \
-	      ../omapip/libomapi.a
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../minires/libres.a \
+	      ../dhcpctl/libdhcpctl.a ../dst/libdstnomd5.a -lldap
 
 man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
 EXTRA_DIST = $(man_MANS)
diff -up dhcp-4.1.0/server/mdb.c.ldap dhcp-4.1.0/server/mdb.c
--- dhcp-4.1.0/server/mdb.c.ldap	2008-02-28 11:21:56.000000000 -1000
+++ dhcp-4.1.0/server/mdb.c	2009-01-06 07:03:13.000000000 -1000
@@ -600,6 +600,12 @@ int find_hosts_by_haddr (struct host_dec
 			 const char *file, int line)
 {
 	struct hardware h;
+	int ret;
+
+#if defined(LDAP_CONFIGURATION)
+	if ((ret = find_haddr_in_ldap (hp, htype, hlen, haddr, file, line)))
+		return ret;
+#endif
 
 	h.hlen = hlen + 1;
 	h.hbuf [0] = htype;
diff -up dhcp-4.1.0/server/stables.c.ldap dhcp-4.1.0/server/stables.c
--- dhcp-4.1.0/server/stables.c.ldap	2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/stables.c	2009-01-06 07:56:33.000000000 -1000
@@ -244,9 +244,107 @@ static struct option server_options[] = 
 	{ "delayed-ack", "S",			&server_universe,  58, 1 },
 	{ "max-ack-delay", "L",			&server_universe,  59, 1 },
 #endif
+#if defined(LDAP_CONFIGURATION)
+	{ "ldap-server", "t",			&server_universe,  60, 1 },
+	{ "ldap-port", "d",			&server_universe,  61, 1 },
+	{ "ldap-username", "t",			&server_universe,  62, 1 },
+	{ "ldap-password", "t",			&server_universe,  63, 1 },
+	{ "ldap-base-dn", "t",			&server_universe,  64, 1 },
+	{ "ldap-method", "Nldap-methods.",	&server_universe,  65, 1 },
+	{ "ldap-debug-file", "t",		&server_universe,  66, 1 },
+	{ "ldap-dhcp-server-cn", "t",		&server_universe,  67, 1 },
+	{ "ldap-referrals", "f",		&server_universe,  68, 1 },
+#if defined(USE_SSL)
+	{ "ldap-ssl", "Nldap-ssl-usage.",	&server_universe,  69, 1 },
+	{ "ldap-tls-reqcert", "Nldap-tls-reqcert.",	&server_universe,  70, 1 },
+	{ "ldap-tls-ca-file", "t",		&server_universe,  71, 1 },
+	{ "ldap-tls-ca-dir", "t",		&server_universe,  72, 1 },
+	{ "ldap-tls-cert", "t",			&server_universe,  73, 1 },
+	{ "ldap-tls-key", "t",			&server_universe,  74, 1 },
+	{ "ldap-tls-crlcheck", "Nldap-tls-crlcheck.",	&server_universe,  75, 1 },
+	{ "ldap-tls-ciphers", "t",		&server_universe,  76, 1 },
+	{ "ldap-tls-randfile", "t",		&server_universe,  77, 1 },
+#else
+	{ "unknown-69", "X",			&server_universe,  69, 1 },
+	{ "unknown-70", "X",			&server_universe,  70, 1 },
+	{ "unknown-71", "X",			&server_universe,  71, 1 },
+	{ "unknown-72", "X",			&server_universe,  72, 1 },
+	{ "unknown-73", "X",			&server_universe,  73, 1 },
+	{ "unknown-74", "X",			&server_universe,  74, 1 },
+	{ "unknown-75", "X",			&server_universe,  75, 1 },
+	{ "unknown-76", "X",			&server_universe,  76, 1 },
+	{ "unknown-77", "X",			&server_universe,  77, 1 },
+#endif
+#else
+	{ "unknown-60", "X",			&server_universe,  60, 1 },
+	{ "unknown-61", "X",			&server_universe,  61, 1 },
+	{ "unknown-62", "X",			&server_universe,  62, 1 },
+	{ "unknown-63", "X",			&server_universe,  63, 1 },
+	{ "unknown-64", "X",			&server_universe,  64, 1 },
+	{ "unknown-65", "X",			&server_universe,  65, 1 },
+	{ "unknown-66", "X",			&server_universe,  66, 1 },
+	{ "unknown-67", "X",			&server_universe,  67, 1 },
+	{ "unknown-68", "X",			&server_universe,  68, 1 },
+#endif
 	{ NULL, NULL, NULL, 0, 0 }
 };
 
+#if defined(LDAP_CONFIGURATION)
+struct enumeration_value ldap_values [] = {
+	{ "static", LDAP_METHOD_STATIC },
+	{ "dynamic", LDAP_METHOD_DYNAMIC },
+	{ (char *) 0, 0 }
+};
+
+struct enumeration ldap_methods = {
+	(struct enumeration *)0,
+	"ldap-methods", 1,
+	ldap_values
+};
+
+#if defined(USE_SSL)
+struct enumeration_value ldap_ssl_usage_values [] = {
+	{ "off", LDAP_SSL_OFF },
+	{ "on",LDAP_SSL_ON },
+	{ "ldaps", LDAP_SSL_LDAPS },
+	{ "start_tls", LDAP_SSL_TLS },
+	{ (char *) 0, 0 }
+};
+
+struct enumeration ldap_ssl_usage_enum = {
+	(struct enumeration *)0,
+	"ldap-ssl-usage", 1,
+	ldap_ssl_usage_values
+};
+
+struct enumeration_value ldap_tls_reqcert_values [] = {
+	{ "never", LDAP_OPT_X_TLS_NEVER },
+	{ "hard", LDAP_OPT_X_TLS_HARD  },
+	{ "demand", LDAP_OPT_X_TLS_DEMAND},
+	{ "allow", LDAP_OPT_X_TLS_ALLOW },
+	{ "try", LDAP_OPT_X_TLS_TRY   },
+	{ (char *) 0, 0 }
+};
+struct enumeration ldap_tls_reqcert_enum = {
+	(struct enumeration *)0,
+	"ldap-tls-reqcert", 1,
+	ldap_tls_reqcert_values
+};
+
+struct enumeration_value ldap_tls_crlcheck_values [] = {
+	{ "none", LDAP_OPT_X_TLS_CRL_NONE},
+	{ "peer", LDAP_OPT_X_TLS_CRL_PEER},
+	{ "all",  LDAP_OPT_X_TLS_CRL_ALL },
+	{ (char *) 0, 0 }
+};
+struct enumeration ldap_tls_crlcheck_enum = {
+	(struct enumeration *)0,
+	"ldap-tls-crlcheck", 1,
+	ldap_tls_crlcheck_values
+};
+#endif
+#endif
+
 struct enumeration_value ddns_styles_values [] = {
 	{ "none", 0 },
 	{ "ad-hoc", 1 },

dhcp-4.1.0-manpages.patch:

--- NEW FILE dhcp-4.1.0-manpages.patch ---
diff -up dhcp-4.1.0/client/dhclient.8.man dhcp-4.1.0/client/dhclient.8
--- dhcp-4.1.0/client/dhclient.8.man	2008-11-20 04:55:14.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.8	2009-01-06 11:51:30.000000000 -1000
@@ -111,6 +111,33 @@ relay
 .B -w
 ]
 [
+.B -B
+]
+[
+.B -I
+.I dhcp-client-identifier
+]
+[
+.B -H
+.I host-name
+]
+[
+.B -F
+.I fqdn.fqdn
+]
+[
+.B -V
+.I vendor-class-identifier
+]
+[
+.B -R
+.I request-option-list
+]
+[
+.B -timeout
+.I timeout
+]
+[
 .B -v
 ]
 [
@@ -138,32 +165,6 @@ important details about the network to w
 the location of a default router, the location of a name server, and
 so on.
 .PP
-If given the -4 command line argument (default), dhclient will use the
-DHCPv4 protocol to obtain an IPv4 address and configuration parameters.
-.PP
-If given the -6 command line argument, dhclient will use the DHCPv6
-protocol to obtain whatever IPv6 addresses are available along with
-configuration parameters. But with
-.B -S
-it uses Information-request to get only (i.e., without address)
-stateless configuration parameters.
-.PP
-The default DHCPv6 behavior is modified too with
-.B -T
-which asks for IPv6 temporary addresses, one set per
-.B -T
-flag.
-.B -P
-enables the IPv6 prefix delegation.
-As temporary addresses or prefix delegation disables the normal
-address query,
-.B -N
-restores it. Note it is not recommended to mix queries of different types
-together, or even to share the lease file between them.
-.PP
-If given the --version command line argument, dhclient will print its
-version number and exit.
-.PP
 On startup, dhclient reads the
 .IR dhclient.conf
 for configuration instructions.   It then gets a list of all the
@@ -217,141 +218,259 @@ file.   If interfaces are specified in t
 only configure interfaces that are either specified in the
 configuration file or on the command line, and will ignore all other
 interfaces.
-.PP
-If the DHCP client should listen and transmit on a port other than the
-standard (port 68), the
-.B -p
-flag may used.  It should be followed by the udp port number that
-dhclient should use.  This is mostly useful for debugging purposes.
-If a different port is specified for the client to listen on and
-transmit on, the client will also use a different destination port -
-one less than the specified port.
-.PP
-The DHCP client normally transmits any protocol messages it sends
-before acquiring an IP address to, 255.255.255.255, the IP limited
-broadcast address.   For debugging purposes, it may be useful to have
-the server transmit these messages to some other address.   This can
-be specified with the 
-.B -s
-flag, followed by the IP address or domain name of the destination.
-This feature is not supported by DHCPv6.
-.PP
-For testing purposes, the giaddr field of all packets that the client
-sends can be set using the
-.B -g
-flag, followed by the IP address to send.   This is only useful for testing,
-and should not be expected to work in any consistent or useful way.
-.PP
-The DHCP client will normally run in the foreground until it has
-configured an interface, and then will revert to running in the
-background.   To run force dhclient to always run as a foreground
-process, the
-.B -d
-flag should be specified.  This is useful when running the client
-under a debugger, or when running it out of inittab on System V
-systems.
-.PP
-The dhclient daemon creates its own environment when executing the
-dhclient-script to do the grunt work of interface configuration.
-To define extra environment variables and their values, use the
-.B -e
-flag, followed by the environment variable name and value assignment,
-just as one would assign a variable in a shell.  Eg:
-.B -e
-.I IF_METRIC=1
-.PP
-The client normally prints no output during its startup sequence.  It
-can be made to emit verbose messages displaying the startup sequence events
-until it has acquired an address by supplying the
-.B -v
-command line argument.  In either case, the client logs messages using
-the
-.B syslog (3)
-facility.  A
-.B -q
-command line argument is provided for backwards compatibility, but since
-dhclient is quiet by default, it has no effect.
-.PP
-The client normally doesn't release the current lease as it is not
-required by the DHCP protocol.  Some cable ISPs require their clients
-to notify the server if they wish to release an assigned IP address.
-The
-.B -r
-flag explicitly releases the current lease, and once the lease has been
-released, the client exits.
-.PP
+.SH OPTIONS
+.TP
+.BI \-4
+Use the DHCPv4 protocol to obtain an IPv4 address and configuration
+parameters (default).
+
+.TP
+.BI \-6
+Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available
+along with configuration parameters.  The functionality of DHCPv6 mode
+may be modified with the
+.BI \-S
+,
+.BI \-T
+, and
+.BI \-N
+options.
+
+.TP
+.BI \-S
+Perform an information-only request over DHCPv6 to get stateless
+configuration parameters.  It is not recommended to combine this option
+with the
+.BI \-N
+,
+.BI \-P
+, or
+.BI \-T
+options or to share lease files between different modes of operation.  Only
+valid with the
+.BI \-6
+option.
+
+.TP
+.BI \-N
+Perform a normal (IA_NA) address query over DHCPv6.  It is not recommended
+to combine this option with the
+.BI \-P
+,
+.BI \-S
+, or
+.BI \-T
+options or to share lease files between different modes of operation.  Only
+valid with the
+.BI \-6
+option.
+
+.TP
+.BI \-T
+Perform a temporary (IA_TA) address query over DHCPv6 (disables normal address
+query).  It is not recommended to combine this option with the
+.BI \-N
+,
+.BI \-P
+, or
+.BI \-S
+options or to share lease files between different modes of operation.  Only
+valid with the
+.BI \-6
+option.
+
+.TP
+.BI \-P
+Enable IPv6 prefix delegation (disables normal address query).  It is not
+not recommended to combine this option with the
+.BI \-N
+,
+.BI \-S
+, or
+.BI \-T
+options or to share lease files between different modes of operation.  Only
+valid with the
+.BI \-6
+option.
+
+.TP
+.BI \-p\ <port\ number>
+The UDP port number the DHCP client should listen and transmit on.  If
+unspecified,
+.B dhclient
+uses the default port 68.  This option is mostly useful for debugging
+purposes.  If a different port is specified for the client to listen and
+transmit on, the client will also use a different destination port - one
+less than the specified port.
+
+.TP
+.BI \-d
+Force
+.B dhclient
+to run as a foreground process.  This is useful when running the client
+under a debugger, or when running it out of inittab on System V systems.
+
+.TP
+.BI \-e\ VAR=value
+Define additional environment variables for the environment where
+dhclient-script executes.  You may specify multiplate
+.B \-e
+options on the command line.  For example:
+.B \-e IF_METRIC=1
+
+.TP
+.BI \-q
+Suppress all terminal and log output except error messages.
+
+.TP
+.BI \-1
+Try once to get a lease.  One failure, exit with code 2.
+
+.TP
+.BI \-r
+Tell
+.B dhclient
+to release the current lease it has from the server.  This is not required
+by the DHCP protocol, but some ISPs require their clients to notify the
+server if they wish to release an assigned IP address.
+
+.TP
+.BI \-lf\ <lease-file>
+Path to the lease database file.  If unspecified, the default
+.B DBDIR/dhclient.leases
+is used.
+
+.TP
+.BI \-pf\ <pid-file>
+Path to the process ID file.  If unspecified, the default
+.B RUNDIR/dhclient.pid
+is used.
+
+.TP
+.BI \-cf\ <config-file>
+Path to the client configuration file.  If unspecified, the default
+.B ETCDIR/dhclient.conf
+is used.
+
+.TP
+.BI \-sf\ <script-file>
+Path to the network configuration script invoked by
+.B dhclient
+when it gets a lease.  If unspecified, the default
+.B /sbin/dhclient-script
+is used.
+
+.TP
+.BI \-s\ <server>
+Specifiy the server IP address or fully qualified domain name to transmit
+DHCP protocol messages to.  Normally,
+.B dhclient
+transmits these messages to 255.255.255.255 (the IP limited broadcast
+address).  Overriding this is mostly useful for debugging purposes.
+
+.TP
+.BI \-g\ <relay>
+Only for debugging.  Set the giaddr field of all packets the client
+sends to the IP address specified.  This should not be expected to work
+in any consistent or useful way.
+
+.TP
+.BI \-n
+Do not configure any interfaces.  Most useful combined with the
+.B -w
+option.
+
+.TP
+.BI \-nw
+Become a daemon process immediately (nowait) rather than waiting until an IP
+address has been acquired.
+
+.TP
+.BI \-w
+Keep running even if no network interfaces are found.  The
+.B omshell
+program can be used to notify the client when a network interface has been
+added or removed so it can attempt to configure an IP address on that
+interface.
+
+.TP
+.BI \-B
+Set the BOOTP broadcast flag in request packets so servers will always
+broadcast replies.
+
+.TP
+.BI \-I\ <dhcp-client-identifier>
+Specify the dhcp-client-identifier option to send to the DHCP server.
+
+.TP
+.BI \-H\ <host-name>
+Specify the host-name option to send to the DHCP server.  The host-name
+string only contains the client's hostname 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.  The
+.B -H
+option cannot be used with the
+.B -F
+option.
+
+.TP
+.BI \-F\ <fqdn.fqdn>
+Specify the fqdn.fqdn option to send to the DHCP server.  This option cannot
+be used with the
+.B -H
+option.  The fqdn.fqdn option must specify the complete domain name of the
+client host, which the server may use for dynamic DNS updates.
+
+.TP
+.BI \-V\ <vendor-class-identifier>
+Specify the vendor-class-identifier option to send to the DHCP server.
+
+.TP
+.BI \-R\ <option>[,<option>...]
+Specify the list of options the client is to request from the server.  The
+option list must be a single string consisting of option names separated
+by at least one command and optional space characters.  The default option
+list is:
+
+.BR
+    subnet-mask, broadcast-address, time-offset, routers,
+.BR
+    domain-name, domain-name-servers, host-name, nis-domain,
+.BR
+    nis-servers, ntp-servers
+
 The
-.B -x
-flag tells any currently running client to exit gracefully without
-releasing leases first.
+.B -R
+option does not append options to the default request, it overrides the
+default request list.  Keep this in mind if you want to request an
+additional option besides the default request list.  You will have to
+specify all option names for the
+.B -R
+parameter.
+
+.TP
+.BI \-timeout\ <timeout>
+Specify the time after which
+.B dhclient
+will decide that no DHCP servers can be contacted when no responses have been
+received.
+
+.TP
+.BI \-v
+Enable verbose log messages.
+
 .PP
-If the client is killed by a signal (for example at shutdown or reboot)
-it won't execute the
+If the client is killed by a signale (for example at shutdown or reboot), it
+will not execute the
 .B dhclient-script (8)
-at exit. However if you shut the client down gracefully with
-.B -r
+at exit.  However, if you shut the client down gracefully with
+.BI \-r
 or
-.B -x
+.BI \-x
 it will execute
 .B dhclient-script (8)
-at shutdown with the specific reason for calling the script set.
-.PP
-The
-.B -1
-flag will cause dhclient to try once to get a lease.  If it fails, dhclient
-exits with exit code two. In DHCPv6 the
-.B -1
-flag sets the max duration of the initial exchange to
-.I timeout
-(from
-.IR dhclient.conf ,
-default sixty seconds).
-.PP
-The DHCP client normally gets its configuration information from
-.B ETCDIR/dhclient.conf,
-its lease database from
-.B DBDIR/dhclient.leases,
-stores its process ID in a file called
-.B RUNDIR/dhclient.pid,
-and configures the network interface using
-.B CLIENTBINDIR/dhclient-script
-To specify different names and/or locations for these files, use the
-.B -cf,
-.B -lf,
-.B -pf
-and
-.B -sf
-flags, respectively, followed by the name of the file.   This can be
-particularly useful if, for example,
-.B DBDIR
-or
-.B RUNDIR
-has not yet been mounted when the DHCP client is started.
-.PP
-The DHCP client normally exits if it isn't able to identify any
-network interfaces to configure.   On laptop computers and other
-computers with hot-swappable I/O buses, it is possible that a
-broadcast interface may be added after system startup.   The
-.B -w
-flag can be used to cause the client not to exit when it doesn't find
-any such interfaces.   The
-.B omshell (1)
-program can then be used to notify the client when a network interface
-has been added or removed, so that the client can attempt to configure an IP
-address on that interface.
-.PP
-The DHCP client can be directed not to attempt to configure any interfaces
-using the
-.B -n
-flag.   This is most likely to be useful in combination with the
-.B -w
-flag.
-.PP
-The client can also be instructed to become a daemon immediately, rather
-than waiting until it has acquired an IP address.   This can be done by
-supplying the
-.B -nw
-flag.
+at shutdown with the specific reason for calling the script set in the
+environment table.
 .SH CONFIGURATION
 The syntax of the dhclient.conf(5) file is discussed separately.
 .SH OMAPI
@@ -386,7 +505,7 @@ do a DHCPRELEASE.   To pause it, set its
 resume it, set its state attribute to 4.
 .PP
 .SH FILES
-.B CLIENTBINDIR/dhclient-script,
+.B /sbin/dhclient-script,
 .B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
 .B DBDIR/dhclient.leases~.
 .SH SEE ALSO
diff -up dhcp-4.1.0/client/dhclient.conf.5.man dhcp-4.1.0/client/dhclient.conf.5
--- dhcp-4.1.0/client/dhclient.conf.5.man	2008-03-07 08:58:29.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.conf.5	2009-01-06 10:50:40.000000000 -1000
@@ -186,9 +186,9 @@ responding to the client send the client
 options.   Only the option names should be specified in the request
 statement - not option parameters.   By default, the DHCP server
 requests the subnet-mask, broadcast-address, time-offset, routers,
-domain-name, domain-name-servers and host-name options.  Note that if
-you enter a 'request' statement, you over-ride this default and these
-options will not be requested.
+domain-name, domain-name-servers host-name, nis-domain, nis-servers,
+and ntp-servers options.  Note that if you enter a 'request' statement,
+you over-ride this default and these options will not be requested.
 .PP
 In some cases, it may be desirable to send no parameter request list
 at all.   To do this, simply write the request statement but specify
@@ -627,6 +627,18 @@ database and will record the media type 
 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 an extension to enable dhclient to work
+on IBM s390 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
@@ -648,12 +660,12 @@ interface "ep0" {
     send host-name "andare.fugue.com";
     send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
     send dhcp-lease-time 3600;
-    supersede domain-name "fugue.com rc.vix.com home.vix.com";
+    supersede domain-search "fugue.com rc.vix.com home.vix.com";
     prepend domain-name-servers 127.0.0.1;
     request subnet-mask, broadcast-address, time-offset, routers,
-	    domain-name, domain-name-servers, host-name;
+	    domain-search, domain-name, domain-name-servers, host-name;
     require subnet-mask, domain-name-servers;
-    script "CLIENTBINDIR/dhclient-script";
+    script "/sbin/dhclient-script";
     media "media 10baseT/UTP", "media 10base2/BNC";
 }
 
diff -up dhcp-4.1.0/client/dhclient-script.8.man dhcp-4.1.0/client/dhclient-script.8
--- dhcp-4.1.0/client/dhclient-script.8.man	2006-02-24 13:16:27.000000000 -1000
+++ dhcp-4.1.0/client/dhclient-script.8	2009-01-06 10:50:40.000000000 -1000
@@ -47,16 +47,16 @@ customizations are needed, they should b
 exit hooks provided (see HOOKS for details).   These hooks will allow the
 user to override the default behaviour of the client in creating a
 .B /etc/resolv.conf
-file.
+file, and to handle DHCP options not handled by default.
 .PP
 No standard client script exists for some operating systems, even though
 the actual client may work, so a pioneering user may well need to create
 a new script or modify an existing one.  In general, customizations specific
 to a particular computer should be done in the
-.B ETCDIR/dhclient.conf
+.B /usr/local/etc/dhclient.conf
 file.   If you find that you can't make such a customization without
 customizing
-.B ETCDIR/dhclient.conf
+.B /usr/local/etc/dhclient.conf
 or using the enter and exit hooks, please submit a bug report.
 .SH HOOKS
 When it starts, the client script first defines a shell function,
@@ -68,33 +68,53 @@ the enter hook script.
 .PP
 On after defining the make_resolv_conf function, the client script checks
 for the presence of an executable
-.B ETCDIR/dhclient-enter-hooks
+.B /usr/local/etc/dhclient-enter-hooks
 script, and if present, it invokes the script inline, using the Bourne
 shell '.' command.   The entire environment documented under OPERATION
 is available to this script, which may modify the environment if needed
 to change the behaviour of the script.   If an error occurs during the
 execution of the script, it can set the exit_status variable to a nonzero
 value, and
-.B CLIENTBINDIR/dhclient-script
+.B /sbin/dhclient-script
 will exit with that error code immediately after the client script exits.
 .PP
 After all processing has completed,
-.B CLIENTBINDIR/dhclient-script
+.B /sbin/dhclient-script
 checks for the presence of an executable
-.B ETCDIR/dhclient-exit-hooks
+.B /usr/local/etc/dhclient-exit-hooks
 script, which if present is invoked using the '.' command.  The exit
 status of dhclient-script will be passed to dhclient-exit-hooks in the
 exit_status shell variable, and will always be zero if the script
 succeeded at the task for which it was invoked.   The rest of the
 environment as described previously for dhclient-enter-hooks is also
 present.   The
-.B ETCDIR/dhclient-exit-hooks
+.B /usr/local/etc/dhclient-exit-hooks
 script can modify the valid of exit_status to change the exit status
 of dhclient-script.
+.PP
+Immediately after dhclient brings an interface UP with a new IP address,
+subnet mask, and routes, in the REBOOT/BOUND states, it will check for the
+existence of an executable
+.B /usr/local/etc/dhclient-up-hooks
+script, and source it if found. This script can handle DHCP options in
+the environment that are not handled by default. A per-interface.
+.B /usr/local/etc/dhclient-${IF}-up-hooks
+script will override the generic script and be sourced when interface
+$IF has been brought up.
+.PP
+Immediately before dhclient brings an interface DOWN, removing its IP
+address, subnet mask, and routes, in the STOP/RELEASE  states, it will
+check for the existence of an executable
+.B /usr/local/etc/dhclient-down-hooks
+script, and source it if found. This script can handle DHCP options in
+the environment that are not handled by default. A per-interface
+.B /usr/local/etc/dhclient-${IF}-down-hooks
+script will override the generic script and be sourced when interface
+$IF is about to be brought down.
 .SH OPERATION
 When dhclient needs to invoke the client configuration script, it
 defines a set of variables in the environment, and then invokes
-.B CLIENTBINDIR/dhclient-script.
+.B /sbin/dhclient-script.
 In all cases, $reason is set to the name of the reason why the script
 has been invoked.   The following reasons are currently defined:
 MEDIUM, PREINIT, BOUND, RENEW, REBIND, REBOOT, EXPIRE, FAIL, STOP, RELEASE,
diff -up dhcp-4.1.0/common/dhcp-options.5.man dhcp-4.1.0/common/dhcp-options.5
--- dhcp-4.1.0/common/dhcp-options.5.man	2008-11-21 03:59:56.000000000 -1000
+++ dhcp-4.1.0/common/dhcp-options.5	2009-01-06 10:50:40.000000000 -1000
@@ -905,6 +905,21 @@ classless IP routing - it does not inclu
 classless IP routing is now the most widely deployed routing standard,
 this option is virtually useless, and is not implemented by any of the
 popular DHCP clients, for example the Microsoft DHCP client.
+.PP
+NOTE to Fedora dhclient users:
+.br
+dhclient-script interprets trailing 0 octets of the target as indicating
+the subnet class of the route, so for the following static-routes value:
+.br
+        option static-routes 172.0.0.0 172.16.2.254,
+.br
+                             192.168.0.0 192.168.2.254;
+.br
+dhclient-script will create routes:
+.br
+        172/8 via 172.16.2.254 dev $interface
+.br
+        192.168/16 via 192.168.2.254 dev $interface
 .RE
 .PP
 .nf
diff -up dhcp-4.1.0/server/dhcpd.conf.5.man dhcp-4.1.0/server/dhcpd.conf.5
--- dhcp-4.1.0/server/dhcpd.conf.5.man	2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.conf.5	2009-01-06 10:50:40.000000000 -1000
@@ -519,6 +519,9 @@ pool {
 };
 .fi
 .PP
+Dynamic BOOTP leases are not compatible with failover, and, as such,
+you need to disallow BOOTP in pools that you are using failover for.
+.PP
 The  server currently  does very  little  sanity checking,  so if  you
 configure it wrong, it will just  fail in odd ways.  I would recommend
 therefore that you either do  failover or don't do failover, but don't
@@ -533,9 +536,9 @@ primary server might look like this:
 failover peer "foo" {
   primary;
   address anthrax.rc.vix.com;
-  port 519;
+  port 647;
   peer address trantor.rc.vix.com;
-  peer port 520;
+  peer port 847;
   max-response-delay 60;
   max-unacked-updates 10;
   mclt 3600;
@@ -594,9 +597,7 @@ statement
 .B port \fIport-number\fR\fB;\fR
 .PP
 The \fBport\fR statement declares the TCP port on which the server
-should listen for connections from its failover peer.   This statement
-may not currently be omitted, because the failover protocol does not
-yet have a reserved TCP port number.
+should listen for connections from its failover peer.
 .RE
 .PP
 The 
@@ -608,10 +609,8 @@ statement
 .PP
 The \fBpeer port\fR statement declares the TCP port to which the
 server should connect to reach its failover peer for failover
-messages.   This statement may not be omitted because the failover
-protocol does not yet have a reserved TCP port number.   The port
-number declared in the \fBpeer port\fR statement may be the same as
-the port number declared in the \fBport\fR statement.
+messages.  The port number declared in the \fBpeer port\fR statement
+may be the same as the port number declared in the \fBport\fR statement.
 .RE
 .PP
 The
@@ -1278,7 +1277,7 @@ the zone containing PTR records - for IS
 .PP
 .nf
 key DHCP_UPDATER {
-  algorithm HMAC-MD5.SIG-ALG.REG.INT;
+  algorithm hmac-md5;
   secret pRP5FapFoJ95JEL06sv4PQ==;
 };
 
@@ -1301,7 +1300,7 @@ dhcpd.conf file:
 .PP
 .nf
 key DHCP_UPDATER {
-  algorithm HMAC-MD5.SIG-ALG.REG.INT;
+  algorithm hmac-md5;
   secret pRP5FapFoJ95JEL06sv4PQ==;
 };
 
@@ -2302,7 +2301,7 @@ statement
 .PP
 .I Name
 should be the name of the DHCP server's lease file.   By default, this
-is DBDIR/dhcpd.leases.   This statement \fBmust\fR appear in the outer
+is /private/var/db/dhcpd/dhcpd.leases.   This statement \fBmust\fR appear in the outer
 scope of the configuration file - if it appears in some other scope,
 it will have no effect.  Furthermore, it has no effect if overridden
 by the
@@ -2337,7 +2336,7 @@ statement
 .PP
 .I Name
 is the name of the lease file to use if and only if the server is running
-in DHCPv6 mode.  By default, this is DBDIR/dhcpd6.leases.  This statement,
+in DHCPv6 mode.  By default, this is /private/var/db/dhcpd/dhcpd6.leases.  This statement,
 like
 .I lease-file-name,
 \fBmust\fR appear in the outer scope of the configuration file.  It
@@ -2495,7 +2494,8 @@ statement
 The \fInext-server\fR statement is used to specify the host address of
 the server from which the initial boot file (specified in the
 \fIfilename\fR statement) is to be loaded.   \fIServer-name\fR should
-be a numeric IP address or a domain name.
+be a numeric IP address or a domain name.  If no \fInext-server\fR statement
+applies to a given client, the address 0.0.0.0 is used.
 .RE
 .PP
 The
@@ -2540,7 +2540,7 @@ statement
 .I Name
 should be the name of the DHCP server's process ID file.   This is the
 file in which the DHCP server's process ID is stored when the server
-starts.   By default, this is RUNDIR/dhcpd.pid.   Like the
+starts.   By default, this is /private/var/run/dhcpd.pid.   Like the
 .I lease-file-name
 statement, this statement must appear in the outer scope
 of the configuration file.  It has no effect if overridden by the
@@ -2558,7 +2558,7 @@ statement
 .PP
 .I Name
 is the name of the pid file to use if and only if the server is running
-in DHCPv6 mode.  By default, this is DBDIR/dhcpd6.pid.  This statement,
+in DHCPv6 mode.  By default, this is /private/var/db/dhcpd/dhcpd6.pid.  This statement,
 like
 .I pid-file-name,
 \fBmust\fR appear in the outer scope of the configuration file.  It

dhcp-4.1.0-memory.patch:

--- NEW FILE dhcp-4.1.0-memory.patch ---
diff -up dhcp-4.1.0/common/lpf.c.memory dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.memory	2008-03-18 08:28:14.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c	2009-01-06 07:57:54.000000000 -1000
@@ -247,6 +247,7 @@ static void lpf_tr_filter_setup (info)
 	struct interface_info *info;
 {
 	struct sock_fprog p;
+	memset(&p,'\0', sizeof(struct sock_fprog));
 
 	/* Set up the bpf filter program structure.    This is defined in
 	   bpf.c */
diff -up dhcp-4.1.0/common/packet.c.memory dhcp-4.1.0/common/packet.c
--- dhcp-4.1.0/common/packet.c.memory	2007-11-30 11:51:43.000000000 -1000
+++ dhcp-4.1.0/common/packet.c	2009-01-06 07:57:54.000000000 -1000
@@ -135,6 +135,7 @@ void assemble_udp_ip_header (interface, 
 	struct ip ip;
 	struct udphdr udp;
 
+	memset( &ip, '\0', sizeof ip);
 	/* Fill out the IP header */
 	IP_V_SET (&ip, 4);
 	IP_HL_SET (&ip, 20);
diff -up dhcp-4.1.0/minires/ns_name.c.memory dhcp-4.1.0/minires/ns_name.c
--- dhcp-4.1.0/minires/ns_name.c.memory	2005-03-17 10:15:17.000000000 -1000
+++ dhcp-4.1.0/minires/ns_name.c	2009-01-06 07:57:54.000000000 -1000
@@ -71,6 +71,11 @@ ns_name_ntop(const u_char *src, char *ds
 	dn = dst;
 	eom = dst + dstsiz;
 
+	if (dn >= eom) {
+		errno = EMSGSIZE;
+		return (-1);
+	}
+
 	while ((n = *cp++) != 0) {
 		if ((n & NS_CMPRSFLGS) != 0) {
 			/* Some kind of compression pointer. */

dhcp-4.1.0-options.patch:

--- NEW FILE dhcp-4.1.0-options.patch ---
diff -up dhcp-4.1.0/client/clparse.c.options dhcp-4.1.0/client/clparse.c
--- dhcp-4.1.0/client/clparse.c.options	2008-05-23 03:22:23.000000000 -1000
+++ dhcp-4.1.0/client/clparse.c	2009-01-06 07:59:14.000000000 -1000
@@ -136,6 +136,7 @@ isc_result_t read_client_conf ()
 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
 	 */
 	top_level_config.requested_lease = 7200;
+	top_level_config.bootp_broadcast_always = 0;
 
 	group_allocate (&top_level_config.on_receipt, MDL);
 	if (!top_level_config.on_receipt)
@@ -303,7 +304,8 @@ void read_client_leases ()
 	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;
@@ -693,6 +695,12 @@ void parse_client_statement (cfile, ip, 
 		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;
diff -up dhcp-4.1.0/client/dhclient.c.options dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.options	2008-06-11 10:17:10.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 08:27:57.000000000 -1000
@@ -38,6 +38,12 @@
 #include <sys/wait.h>
 #include <limits.h>
 
+/*
+ * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
+ * that when building ISC code.
+ */
+extern int asprintf(char **strp, const char *fmt, ...);
+
 TIME default_lease_time = 43200; /* 12 hours... */
 TIME max_lease_time = 86400; /* 24 hours... */
 
@@ -80,6 +86,9 @@ int wanted_ia_na = -1;		/* the absolute 
 int wanted_ia_ta = 0;
 int wanted_ia_pd = 0;
 char *mockup_relay = NULL;
+int bootp_broadcast_always = 0;
+
+extern u_int32_t default_requested_options[];
 
 void run_stateless(int exit_mode);
 
@@ -110,6 +119,15 @@ main(int argc, char **argv) {
 	int local_family_set = 0;
 #endif /* DHCPv6 */
 	char *s;
+	char *dhcp_client_identifier_arg = NULL;
+	char *dhcp_host_name_arg = NULL;
+	char *dhcp_fqdn_arg = NULL;
+	char *dhcp_vendor_class_identifier_arg = NULL;
+	char *dhclient_request_options = NULL;
+
+	int timeout_arg = 0;
+	char *arg_conf = NULL;
+	int arg_conf_len = 0;
 
 	/* Initialize client globals. */
 	memset(&default_duid, 0, sizeof(default_duid));
@@ -274,6 +292,88 @@ main(int argc, char **argv) {
 		} else if (!strcmp(argv[i], "--version")) {
 			log_info("isc-dhclient-%s", PACKAGE_VERSION);
 			exit(0);
+		} else if (!strcmp(argv[i], "-I")) {
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
+				log_error("-I option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
+				exit(1);
+			}
+
+			dhcp_client_identifier_arg = argv[i];
+		} else if (!strcmp(argv[i], "-B")) {
+			bootp_broadcast_always = 1;
+		} else if (!strcmp(argv[i], "-H")) {
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
+				log_error("-H option host-name string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
+				exit(1);
+			}
+
+			if (dhcp_host_name_arg != NULL) {
+				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] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
+				log_error("-F option fqdn.fqdn string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
+				exit(1);
+			}
+
+			if (dhcp_fqdn_arg != NULL) {
+				log_error("Only one -F <fqdn> argument can be specified");
+				exit(1);
+			}
+
+			if (dhcp_host_name_arg != NULL) {
+				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], "-timeout")) {
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			if ((timeout_arg = atoi(argv[i])) <= 0) {
+				log_error("-T timeout option must be > 0 - bad value: %s",argv[i]);
+				exit(1);
+			}
+		} else if (!strcmp(argv[i], "-V")) {
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
+				log_error("-V option vendor-class-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
+				exit(1);
+			}
+
+			dhcp_vendor_class_identifier_arg = argv[i];
+		} else if (!strcmp(argv[i], "-R")) {
+			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
+				usage();
+				exit(1);
+			}
+
+			dhclient_request_options = argv[i];
 		} else if (argv[i][0] == '-') {
 		    usage();
 		} else if (interfaces_requested < 0) {
@@ -443,6 +543,166 @@ main(int argc, char **argv) {
 	/* Parse the dhclient.conf file. */
 	read_client_conf();
 
+	/* Parse any extra command line configuration arguments: */
+	if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
+		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 != NULL) && (*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 = NULL;
+			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 != NULL) && (*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 = NULL;
+			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 -timeout timeout argument");
+		} else {
+			char *last_arg_conf = arg_conf;
+			arg_conf = NULL;
+			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 -timeout timeout argument");
+
+			free(last_arg_conf);
+		}
+	}
+
+	if ((dhcp_vendor_class_identifier_arg != NULL) && (*dhcp_vendor_class_identifier_arg != '\0')) {
+		if (arg_conf == 0) {
+			arg_conf_len = asprintf(&arg_conf,  "send vendor-class-identifier \"%s\";", dhcp_vendor_class_identifier_arg);
+
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
+				log_fatal("Unable to send -V option vendor-class-identifier");
+		} else {
+			char *last_arg_conf = arg_conf;
+			arg_conf = NULL;
+			arg_conf_len = asprintf(&arg_conf, "%s\nsend vendor-class-identifier \"%s\";", last_arg_conf, dhcp_vendor_class_identifier_arg);
+
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
+				log_fatal("Unable to send -V option vendor-class-identifier");
+
+			free(last_arg_conf);
+		}
+	}
+
+	if (dhclient_request_options != NULL) {
+		if (arg_conf == 0) {
+			arg_conf_len = asprintf(&arg_conf,  "request %s;", dhclient_request_options);
+
+			if ((arg_conf == 0) || (arg_conf_len <= 0))
+				log_fatal("Unable to parse -R <request options list> argument");
+		} else {
+			char *last_arg_conf = arg_conf;
+			arg_conf = NULL;
+			arg_conf_len = asprintf(&arg_conf, "%s\nrequest %s;", last_arg_conf, dhclient_request_options);
+
+			if ((arg_conf == 0)  || (arg_conf_len <= 0))
+				log_fatal("Unable to parse -R <request options list> 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/-timeout/-V/-R configuration arguments");
+
+		/* parse the extra dhclient.conf configuration arguments
+		 * into top level config: */
+		struct parse *cfile = (struct parse *)0;
+		const char *val = NULL;
+		int token;
+
+		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
+
+		if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
+		/* more detailed parse failures will be logged */
+
+		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);
+
+		if (cfile -> warnings_occurred)
+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R 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;
+			}
+		}
+
+		if ((dhclient_request_options != 0) && (top_level_config.requested_options != default_requested_options)) {
+			for (ip=interfaces; ip; ip = ip->next) {
+				if (ip->client->config->requested_options == default_requested_options)
+					ip->client->config->requested_options = top_level_config.requested_options;
+			}
+		}
+
+		free(arg_conf);
+		arg_conf = NULL;
+		arg_conf_len = 0;
+	}
+
 	/* Parse the lease database. */
 	read_client_leases();
 
@@ -2313,7 +2573,8 @@ void make_discover (client, lease)
 	client -> packet.xid = random ();
 	client -> packet.secs = 0; /* filled in by send_discover. */
 
-	if (can_receive_unicast_unconfigured (client -> interface))
+	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);
@@ -2397,7 +2658,9 @@ void make_request (client, lease)
 	} else {
 		memset (&client -> packet.ciaddr, 0,
 			sizeof client -> packet.ciaddr);
-		if (can_receive_unicast_unconfigured (client -> interface))
+		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);
@@ -2459,7 +2722,8 @@ void make_decline (client, lease)
 	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))
+	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);
diff -up dhcp-4.1.0/common/conflex.c.options dhcp-4.1.0/common/conflex.c
--- dhcp-4.1.0/common/conflex.c.options	2009-01-06 07:59:13.000000000 -1000
+++ dhcp-4.1.0/common/conflex.c	2009-01-06 07:59:14.000000000 -1000
@@ -783,6 +783,8 @@ intern(char *atom, enum dhcp_token dfv) 
 			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"))
diff -up dhcp-4.1.0/includes/dhcpd.h.options dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.options	2009-01-06 07:59:13.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 07:59:14.000000000 -1000
@@ -1079,6 +1079,9 @@ struct client_config {
 	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... */
diff -up dhcp-4.1.0/includes/dhctoken.h.options dhcp-4.1.0/includes/dhctoken.h
--- dhcp-4.1.0/includes/dhctoken.h.options	2008-02-20 02:45:53.000000000 -1000
+++ dhcp-4.1.0/includes/dhctoken.h	2009-01-06 08:00:51.000000000 -1000
@@ -352,7 +352,8 @@ enum dhcp_token {
 	ZEROLEN = 655,
 	TEMPORARY = 656,
 	PREFIX6 = 657,
-	FIXED_PREFIX6 = 658
+	FIXED_PREFIX6 = 658,
+	BOOTP_BROADCAST_ALWAYS = 659
 };
 
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\

dhcp-4.1.0-paths.patch:

--- NEW FILE dhcp-4.1.0-paths.patch ---
diff -up dhcp-4.1.0/includes/dhcpd.h.paths dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.paths	2009-01-06 11:52:57.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 11:52:57.000000000 -1000
@@ -1340,15 +1340,15 @@ typedef unsigned char option_mask [16];
 #else /* !DEBUG */
 
 #ifndef _PATH_DHCPD_CONF
-#define _PATH_DHCPD_CONF	"/etc/dhcpd.conf"
+#define _PATH_DHCPD_CONF	"/etc/dhcp/dhcpd.conf"
 #endif /* DEBUG */
 
 #ifndef _PATH_DHCPD_DB
-#define _PATH_DHCPD_DB		LOCALSTATEDIR"/db/dhcpd.leases"
+#define _PATH_DHCPD_DB		LOCALSTATEDIR"/dhcpd/dhcpd.leases"
 #endif
 
 #ifndef _PATH_DHCPD6_DB
-#define _PATH_DHCPD6_DB		LOCALSTATEDIR"/db/dhcpd6.leases"
+#define _PATH_DHCPD6_DB		LOCALSTATEDIR"/dhcpd/dhcpd6.leases"
 #endif
 
 #ifndef _PATH_DHCPD_PID
@@ -1362,7 +1362,7 @@ typedef unsigned char option_mask [16];
 #endif /* DEBUG */
 
 #ifndef _PATH_DHCLIENT_CONF
-#define _PATH_DHCLIENT_CONF	"/etc/dhclient.conf"
+#define _PATH_DHCLIENT_CONF	"/etc/dhcp/dhclient.conf"
 #endif
 
 #ifndef _PATH_DHCLIENT_SCRIPT
@@ -1378,11 +1378,11 @@ typedef unsigned char option_mask [16];
 #endif
 
 #ifndef _PATH_DHCLIENT_DB
-#define _PATH_DHCLIENT_DB	LOCALSTATEDIR"/db/dhclient.leases"
+#define _PATH_DHCLIENT_DB	LOCALSTATEDIR"/dhclient/dhclient.leases"
 #endif
 
 #ifndef _PATH_DHCLIENT6_DB
-#define _PATH_DHCLIENT6_DB	LOCALSTATEDIR"/db/dhclient6.leases"
+#define _PATH_DHCLIENT6_DB	LOCALSTATEDIR"/dhclient/dhclient6.leases"
 #endif
 
 #ifndef _PATH_RESOLV_CONF

dhcp-4.1.0-port-validation.patch:

--- NEW FILE dhcp-4.1.0-port-validation.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.validate dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.validate	2009-01-06 12:11:44.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 12:25:06.000000000 -1000
@@ -190,7 +190,7 @@ main(int argc, char **argv) {
 		} else if (!strcmp(argv[i], "-p")) {
 			if (++i == argc)
 				usage();
-			local_port = htons(atoi(argv[i]));
+			local_port = validate_port(argv[i]);
 			log_debug("binding to user-specified port %d",
 				  ntohs(local_port));
 		} else if (!strcmp(argv[i], "-d")) {
diff -up dhcp-4.1.0/common/inet.c.validate dhcp-4.1.0/common/inet.c
--- dhcp-4.1.0/common/inet.c.validate	2007-07-12 20:43:41.000000000 -1000
+++ dhcp-4.1.0/common/inet.c	2009-01-06 12:11:44.000000000 -1000
@@ -604,3 +604,20 @@ piaddrcidr(const struct iaddr *addr, uns
 	return ret;
 }
 
+/* Check the port number specified */
+u_int16_t
+validate_port(char *port) {
+	u_int16_t local_port = 0;
+	int lower = 1;
+	int upper = 65535;
+
+	errno = 0;
+	local_port = strtol(port, NULL, 10);
+	if ((errno == ERANGE) || (errno == EINVAL))
+		log_fatal ("Invalid port number specification: %s", port);
+
+	if (local_port < lower || local_port > upper)
+		log_fatal("Port number specified is out of range (%d-%d).", lower, upper);
+
+	return htons(local_port);
+}
diff -up dhcp-4.1.0/includes/dhcpd.h.validate dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.validate	2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 12:11:44.000000000 -1000
@@ -65,6 +65,7 @@
 #endif
 
 #include <setjmp.h>
+#include <errno.h>
 
 #include "cdefs.h"
 #include "osdep.h"
@@ -2511,6 +2512,7 @@ isc_result_t free_iaddrcidrnetlist(struc
 const char *piaddr PROTO ((struct iaddr));
 char *piaddrmask(struct iaddr *, struct iaddr *);
 char *piaddrcidr(const struct iaddr *, unsigned int);
+u_int16_t validate_port(char *port);
 
 /* dhclient.c */
 extern int nowait;
diff -up dhcp-4.1.0/relay/dhcrelay.c.validate dhcp-4.1.0/relay/dhcrelay.c
--- dhcp-4.1.0/relay/dhcrelay.c.validate	2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/relay/dhcrelay.c	2009-01-06 12:23:29.000000000 -1000
@@ -222,7 +222,7 @@ main(int argc, char **argv) {
 		} else if (!strcmp(argv[i], "-p")) {
 			if (++i == argc)
 				usage();
-			local_port = htons(atoi (argv[i]));
+			local_port = validate_port(argv[i]);
 			log_debug("binding to user-specified port %d",
 				  ntohs(local_port));
 		} else if (!strcmp(argv[i], "-c")) {
diff -up dhcp-4.1.0/server/dhcpd.c.validate dhcp-4.1.0/server/dhcpd.c
--- dhcp-4.1.0/server/dhcpd.c.validate	2009-01-06 12:11:43.000000000 -1000
+++ dhcp-4.1.0/server/dhcpd.c	2009-01-06 12:11:44.000000000 -1000
@@ -298,15 +298,7 @@ main(int argc, char **argv) {
 		if (!strcmp (argv [i], "-p")) {
 			if (++i == argc)
 				usage ();
-			for (s = argv [i]; *s; s++)
-				if (!isdigit ((unsigned char)*s))
-					log_fatal ("%s: not a valid UDP port",
-					       argv [i]);
-			status = atoi (argv [i]);
-			if (status < 1 || status > 65535)
-				log_fatal ("%s: not a valid UDP port",
-				       argv [i]);
-			local_port = htons (status);
+			local_port = validate_port(argv[i]);
 			log_debug ("binding to user-specified port %d",
 			       ntohs (local_port));
 		} else if (!strcmp (argv [i], "-f")) {
@@ -531,7 +523,7 @@ main(int argc, char **argv) {
 	if (!local_port)
 	{
 		if ((s = getenv ("DHCPD_PORT"))) {
-			local_port = htons (atoi (s));
+			local_port = validate_port(s);
 			log_debug ("binding to environment-specified port %d",
 				   ntohs (local_port));
 		} else {

dhcp-4.1.0-release-by-ifup.patch:

--- NEW FILE dhcp-4.1.0-release-by-ifup.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.ifup dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.ifup	2009-01-06 08:29:14.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-01-06 10:07:08.000000000 -1000
@@ -474,9 +474,81 @@ main(int argc, char **argv) {
 					kill(oldpid, SIGTERM);
 			}
 			fclose(pidfd);
+		} else {
+			/* handle release for interfaces requested with Red Hat
+			 * /sbin/ifup - pidfile will be /var/run/dhclient-$interface.pid
+			 */
+
+			if ((path_dhclient_pid == NULL) || (*path_dhclient_pid == '\0'))
+				path_dhclient_pid = "/var/run/dhclient.pid";
+
+			char *new_path_dhclient_pid;
+			struct interface_info *ip;
+			int pdp_len = strlen(path_dhclient_pid), pfx, dpfx;
+
+			/* find append point: beginning of any trailing '.pid'
+			 * or '-$IF.pid' */
+			for (pfx=pdp_len; (pfx >= 0) && (path_dhclient_pid[pfx] != '.') && (path_dhclient_pid[pfx] != '/'); pfx--);
+				if (pfx == -1)
+					pfx = pdp_len;
+
+			if (path_dhclient_pid[pfx] == '/')
+				pfx += 1;
+
+			for (dpfx=pfx; (dpfx >= 0) && (path_dhclient_pid[dpfx] != '-') && (path_dhclient_pid[dpfx] != '/'); dpfx--);
+				if ((dpfx > -1) && (path_dhclient_pid[dpfx] != '/'))
+					pfx = dpfx;
+
+			for (ip = interfaces; ip; ip = ip->next) {
+				if (interfaces_requested && (ip->flags & (INTERFACE_REQUESTED)) && (ip->name != NULL)) {
+					int n_len = strlen(ip->name);
+
+					new_path_dhclient_pid = (char*) malloc(pfx + n_len + 6);
+					strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
+					sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
+
+					if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) {
+						e = fscanf(pidfd, "%ld\n", &temp);
+						oldpid = (pid_t)temp;
+
+						if (e != 0 && e != EOF) {
+							if (oldpid) {
+								if (kill(oldpid, SIGTERM) == 0)
+									unlink(path_dhclient_pid);
+							}
+						}
+
+						fclose(pidfd);
+					}
+
+					free(new_path_dhclient_pid);
+				}
+			}
+		}
+	} else {
+		FILE *pidfp = NULL;
+		long temp = 0;
+		pid_t dhcpid = 0;
+		int dhc_running = 0;
+		char procfn[256] = "";
+
+		if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) {
+			if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
+				snprintf(procfn,256,"/proc/%u",dhcpid);
+				dhc_running = (access(procfn, F_OK) == 0);
+			}
+
+			fclose(pidfp);
+		}
+
+		if (dhc_running) {
+			log_fatal("dhclient(%u) is already running - exiting. ", dhcpid);
+			return(1);
 		}
 	}
 
+	write_client_pid_file();
+
 	if (!quiet) {
 		log_info("%s %s", message, PACKAGE_VERSION);
 		log_info(copyright);

dhcp-4.1.0-unicast-bootp.patch:

--- NEW FILE dhcp-4.1.0-unicast-bootp.patch ---
diff -up dhcp-4.1.0/server/bootp.c.unicast dhcp-4.1.0/server/bootp.c
--- dhcp-4.1.0/server/bootp.c.unicast	2008-08-20 13:07:19.000000000 -1000
+++ dhcp-4.1.0/server/bootp.c	2009-01-06 10:13:29.000000000 -1000
@@ -58,6 +58,7 @@ void bootp (packet)
 	char msgbuf [1024];
 	int ignorep;
 	int peer_has_leases = 0;
+	int norelay = 0;
 
 	if (packet -> raw -> op != BOOTREQUEST)
 		return;
@@ -73,7 +74,7 @@ void bootp (packet)
 		 ? inet_ntoa (packet -> raw -> giaddr)
 		 : packet -> interface -> name);
 
-	if (!locate_network (packet)) {
+	if ((norelay = locate_network (packet)) == 0) {
 		log_info ("%s: network unknown", msgbuf);
 		return;
 	}
@@ -390,6 +391,13 @@ void bootp (packet)
 					      from, &to, &hto);
 			goto out;
 		}
+	} else if (norelay == 2) {
+		to.sin_addr = raw.ciaddr;
+		to.sin_port = remote_port;
+		if (fallback_interface) {
+			result = send_packet (fallback_interface, (struct packet *)0, &raw, outgoing.packet_length, from, &to, &hto);
+			goto out;
+		}
 
 	/* If it comes from a client that already knows its address
 	   and is not requesting a broadcast response, and we can
diff -up dhcp-4.1.0/server/dhcp.c.unicast dhcp-4.1.0/server/dhcp.c
--- dhcp-4.1.0/server/dhcp.c.unicast	2008-11-03 08:13:58.000000000 -1000
+++ dhcp-4.1.0/server/dhcp.c	2009-01-06 10:13:29.000000000 -1000
@@ -4111,6 +4111,7 @@ int locate_network (packet)
 	struct data_string data;
 	struct subnet *subnet = (struct subnet *)0;
 	struct option_cache *oc;
+	int norelay = 0;
 
 	/* See if there's a Relay Agent Link Selection Option, or a
 	 * Subnet Selection Option.  The Link-Select and Subnet-Select
@@ -4126,12 +4127,24 @@ int locate_network (packet)
 	   from the interface, if there is one.   If not, fail. */
 	if (!oc && !packet -> raw -> giaddr.s_addr) {
 		if (packet -> interface -> shared_network) {
-			shared_network_reference
-				(&packet -> shared_network,
-				 packet -> interface -> shared_network, MDL);
-			return 1;
+			struct in_addr any_addr;
+			any_addr.s_addr = INADDR_ANY;
+
+			if (!packet -> packet_type && memcmp(&packet -> raw -> ciaddr, &any_addr, 4)) {
+				struct iaddr cip;
+				memcpy(cip.iabuf, &packet -> raw -> ciaddr, 4);
+				cip.len = 4;
+				if (!find_grouped_subnet(&subnet, packet->interface->shared_network, cip, MDL))
+					norelay = 2;
+			}
+
+			if (!norelay) {
+				shared_network_reference(&packet -> shared_network, packet -> interface -> shared_network, MDL);
+				return 1;
+			}
+		} else {
+			return 0;
 		}
-		return 0;
 	}
 
 	/* If there's an option indicating link connection, and it's valid,
@@ -4154,7 +4167,10 @@ int locate_network (packet)
 		data_string_forget (&data, MDL);
 	} else {
 		ia.len = 4;
-		memcpy (ia.iabuf, &packet -> raw -> giaddr, 4);
+		if (norelay)
+			memcpy (ia.iabuf, &packet->raw->ciaddr, 4);
+		else
+			memcpy (ia.iabuf, &packet->raw->giaddr, 4);
 	}
 
 	/* If we know the subnet on which the IP address lives, use it. */
@@ -4162,7 +4178,10 @@ int locate_network (packet)
 		shared_network_reference (&packet -> shared_network,
 					  subnet -> shared_network, MDL);
 		subnet_dereference (&subnet, MDL);
-		return 1;
+		if (norelay)
+			return norelay;
+		else
+			return 1;
 	}
 
 	/* Otherwise, fail. */

dhcp-4.1.0-xen-checksum.patch:

--- NEW FILE dhcp-4.1.0-xen-checksum.patch ---
diff -up dhcp-4.1.0/common/bpf.c.xen dhcp-4.1.0/common/bpf.c
--- dhcp-4.1.0/common/bpf.c.xen	2007-08-22 23:49:51.000000000 -1000
+++ dhcp-4.1.0/common/bpf.c	2009-01-06 10:41:32.000000000 -1000
@@ -482,7 +482,7 @@ ssize_t receive_packet (interface, buf, 
 		offset = decode_udp_ip_header (interface,
 					       interface -> rbuf,
 					       interface -> rbuf_offset,
-  					       from, hdr.bh_caplen, &paylen);
+  					       from, hdr.bh_caplen, &paylen, 0);
 
 		/* If the IP or UDP checksum was bad, skip the packet... */
 		if (offset < 0) {
diff -up dhcp-4.1.0/common/dlpi.c.xen dhcp-4.1.0/common/dlpi.c
--- dhcp-4.1.0/common/dlpi.c.xen	2008-02-29 13:57:56.000000000 -1000
+++ dhcp-4.1.0/common/dlpi.c	2009-01-06 10:41:32.000000000 -1000
@@ -689,7 +689,7 @@ ssize_t receive_packet (interface, buf, 
 	length -= offset;
 #endif
 	offset = decode_udp_ip_header (interface, dbuf, bufix,
-				       from, length, &paylen);
+				       from, length, &paylen, 0);
 
 	/* If the IP or UDP checksum was bad, skip the packet... */
 	if (offset < 0) {
diff -up dhcp-4.1.0/common/lpf.c.xen dhcp-4.1.0/common/lpf.c
--- dhcp-4.1.0/common/lpf.c.xen	2009-01-06 10:41:31.000000000 -1000
+++ dhcp-4.1.0/common/lpf.c	2009-01-06 10:41:32.000000000 -1000
@@ -29,18 +29,33 @@
 #include "dhcpd.h"
 #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
 #include <sys/ioctl.h>
+#include <sys/socket.h>
 #include <sys/uio.h>
 #include <errno.h>
 
 #include <asm/types.h>
 #include <linux/filter.h>
 #include <linux/if_ether.h>
+#include <linux/if_packet.h>
 #include <netinet/in_systm.h>
 #include "includes/netinet/ip.h"
 #include "includes/netinet/udp.h"
 #include "includes/netinet/if_ether.h"
 #include <net/if.h>
 
+#ifndef PACKET_AUXDATA
+#define PACKET_AUXDATA 8
+
+struct tpacket_auxdata
+{
+	__u32		tp_status;
+	__u32		tp_len;
+	__u32		tp_snaplen;
+	__u16		tp_mac;
+	__u16		tp_net;
+};
+#endif
+
 /* Reinitializes the specified interface after an address change.   This
    is not required for packet-filter APIs. */
 
@@ -66,10 +81,14 @@ int if_register_lpf (info)
 	struct interface_info *info;
 {
 	int sock;
-	struct sockaddr sa;
+	union {
+		struct sockaddr_ll ll;
+		struct sockaddr common;
+	} sa;
+	struct ifreq ifr;
 
 	/* Make an LPF socket. */
-	if ((sock = socket(PF_PACKET, SOCK_PACKET,
+	if ((sock = socket(PF_PACKET, SOCK_RAW,
 			   htons((short)ETH_P_ALL))) < 0) {
 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
@@ -84,11 +103,16 @@ int if_register_lpf (info)
 		log_fatal ("Open a socket for LPF: %m");
 	}
 
+	memset (&ifr, 0, sizeof ifr);
+	strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof ifr.ifr_name);
+	if (ioctl (sock, SIOCGIFINDEX, &ifr))
+		log_fatal ("Failed to get interface index: %m");
+
 	/* Bind to the interface name */
 	memset (&sa, 0, sizeof sa);
-	sa.sa_family = AF_PACKET;
-	strncpy (sa.sa_data, (const char *)info -> ifp, sizeof sa.sa_data);
-	if (bind (sock, &sa, sizeof sa)) {
+	sa.ll.sll_family = AF_PACKET;
+	sa.ll.sll_ifindex = ifr.ifr_ifindex;
+	if (bind (sock, &sa.common, sizeof sa)) {
 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
 		    errno == EAFNOSUPPORT || errno == EINVAL) {
@@ -170,9 +194,18 @@ static void lpf_gen_filter_setup (struct
 void if_register_receive (info)
 	struct interface_info *info;
 {
+	int val;
+
 	/* Open a LPF device and hang it on this interface... */
 	info -> rfdesc = if_register_lpf (info);
 
+	val = 1;
+	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
+			sizeof val) < 0) {
+		if (errno != ENOPROTOOPT)
+			log_fatal ("Failed to set auxiliary packet data: %m");
+	}
+
 #if defined (HAVE_TR_SUPPORT)
 	if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
 		lpf_tr_filter_setup (info);
@@ -293,7 +326,6 @@ ssize_t send_packet (interface, packet, 
 	double hh [16];
 	double ih [1536 / sizeof (double)];
 	unsigned char *buf = (unsigned char *)ih;
-	struct sockaddr sa;
 	int result;
 	int fudge;
 
@@ -311,15 +343,7 @@ ssize_t send_packet (interface, packet, 
 				(unsigned char *)raw, len);
 	memcpy (buf + ibufp, raw, len);
 
-	/* For some reason, SOCK_PACKET sockets can't be connected,
-	   so we have to do a sentdo every time. */
-	memset (&sa, 0, sizeof sa);
-	sa.sa_family = AF_PACKET;
-	strncpy (sa.sa_data,
-		 (const char *)interface -> ifp, sizeof sa.sa_data);
-
-	result = sendto (interface -> wfdesc,
-			 buf + fudge, ibufp + len - fudge, 0, &sa, sizeof sa);
+	result = write (interface -> wfdesc, buf + fudge, ibufp + len - fudge);
 	if (result < 0)
 		log_error ("send_packet: %m");
 	return result;
@@ -336,14 +360,35 @@ ssize_t receive_packet (interface, buf, 
 {
 	int length = 0;
 	int offset = 0;
+	int nocsum = 0;
 	unsigned char ibuf [1536];
 	unsigned bufix = 0;
 	unsigned paylen;
+	unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
+	struct iovec iov = {
+		.iov_base = ibuf,
+		.iov_len = sizeof ibuf,
+	};
+	struct msghdr msg = {
+		.msg_iov = &iov,
+		.msg_iovlen = 1,
+		.msg_control = cmsgbuf,
+		.msg_controllen = sizeof(cmsgbuf),
+	};
+	struct cmsghdr *cmsg;
 
-	length = read (interface -> rfdesc, ibuf, sizeof ibuf);
+	length = recvmsg (interface -> rfdesc, &msg, 0);
 	if (length <= 0)
 		return length;
 
+	for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+		if (cmsg->cmsg_level == SOL_PACKET &&
+		    cmsg->cmsg_type == PACKET_AUXDATA) {
+			struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
+			nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
+		}
+	}
+
 	bufix = 0;
 	/* Decode the physical header... */
 	offset = decode_hw_header (interface, ibuf, bufix, hfrom);
@@ -360,7 +405,7 @@ ssize_t receive_packet (interface, buf, 
 
 	/* Decode the IP and UDP headers... */
 	offset = decode_udp_ip_header (interface, ibuf, bufix, from,
-				       (unsigned)length, &paylen);
+				       (unsigned)length, &paylen, nocsum);
 
 	/* If the IP or UDP checksum was bad, skip the packet... */
 	if (offset < 0)
diff -up dhcp-4.1.0/common/nit.c.xen dhcp-4.1.0/common/nit.c
--- dhcp-4.1.0/common/nit.c.xen	2007-09-05 07:32:10.000000000 -1000
+++ dhcp-4.1.0/common/nit.c	2009-01-06 10:41:32.000000000 -1000
@@ -366,7 +366,7 @@ ssize_t receive_packet (interface, buf, 
 
 	/* Decode the IP and UDP headers... */
 	offset = decode_udp_ip_header (interface, ibuf, bufix,
-				       from, length, &paylen);
+				       from, length, &paylen, 0);
 
 	/* If the IP or UDP checksum was bad, skip the packet... */
 	if (offset < 0)
diff -up dhcp-4.1.0/common/packet.c.xen dhcp-4.1.0/common/packet.c
--- dhcp-4.1.0/common/packet.c.xen	2009-01-06 10:41:31.000000000 -1000
+++ dhcp-4.1.0/common/packet.c	2009-01-06 10:41:32.000000000 -1000
@@ -210,7 +210,7 @@ ssize_t
 decode_udp_ip_header(struct interface_info *interface,
 		     unsigned char *buf, unsigned bufix,
 		     struct sockaddr_in *from, unsigned buflen,
-		     unsigned *rbuflen)
+		     unsigned *rbuflen, int nocsum)
 {
   unsigned char *data;
   struct ip ip;
@@ -321,7 +321,7 @@ decode_udp_ip_header(struct interface_in
 					   8, IPPROTO_UDP + ulen))));
 
   udp_packets_seen++;
-  if (usum && usum != sum) {
+  if (!nocsum && usum && usum != sum) {
 	  udp_packets_bad_checksum++;
 	  if (udp_packets_seen > 4 &&
 	      (udp_packets_seen / udp_packets_bad_checksum) < 2) {
diff -up dhcp-4.1.0/common/upf.c.xen dhcp-4.1.0/common/upf.c
--- dhcp-4.1.0/common/upf.c.xen	2007-07-12 20:43:42.000000000 -1000
+++ dhcp-4.1.0/common/upf.c	2009-01-06 10:41:32.000000000 -1000
@@ -317,7 +317,7 @@ ssize_t receive_packet (interface, buf, 
 
 	/* Decode the IP and UDP headers... */
 	offset = decode_udp_ip_header (interface, ibuf, bufix,
-				       from, length, &paylen);
+				       from, length, &paylen, 0);
 
 	/* If the IP or UDP checksum was bad, skip the packet... */
 	if (offset < 0)
diff -up dhcp-4.1.0/includes/dhcpd.h.xen dhcp-4.1.0/includes/dhcpd.h
--- dhcp-4.1.0/includes/dhcpd.h.xen	2009-01-06 10:41:32.000000000 -1000
+++ dhcp-4.1.0/includes/dhcpd.h	2009-01-06 10:41:32.000000000 -1000
@@ -2640,7 +2640,7 @@ ssize_t decode_hw_header PROTO ((struct 
 				 unsigned, struct hardware *));
 ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
 				     unsigned, struct sockaddr_in *,
-				     unsigned, unsigned *));
+				     unsigned, unsigned *, int));
 
 /* ethernet.c */
 void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/.cvsignore,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- .cvsignore	13 Jan 2008 21:02:47 -0000	1.22
+++ .cvsignore	6 Jan 2009 23:46:50 -0000	1.23
@@ -1 +1 @@
-dhcp-4.0.0.tar.gz
+dhcp-4.1.0.tar.gz


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcp.spec,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- dhcp.spec	5 Jan 2009 22:45:37 -0000	1.232
+++ dhcp.spec	6 Jan 2009 23:46:51 -0000	1.233
@@ -1,23 +1,18 @@
 # vendor string (e.g., Fedora, EL)
 %define vvendor Fedora
 
-# Make it easy for package rebuilders to select LPF or sockets
-%define netmethod USE_LPF
+# Make it easy for package rebuilders to enable DHCPv6 support
+%define dhcpv6opt --disable-dhcpv6
 
-%define with_USE_SOCKETS %{?_with_USE_SOCKETS: 1} %{?!_with_USE_SOCKETS: 0}
-%if %{with_USE_SOCKETS}
-%define netmethod USE_SOCKETS
-%endif
-
-%define with_USE_LPF %{?_with_USE_LPF: 1} %{?!_with_USE_LPF: 0}
-%if %{with_USE_LPF}
-%define netmethod USE_LPF
+%define with_DHCPv6 %{?_with_DHCPv6: 1} %{?!_with_DHCPv6: 0}
+%if %{with_DHCPv6}
+%define dhcpv6opt --enable-dhcpv6
 %endif
 
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
-Version:  4.0.0
-Release:  34%{?dist}
+Version:  4.1.0
+Release:  1%{?dist}
 # NEVER CHANGE THE EPOCH on this package.  The previous maintainer (prior to
 # dcantrell maintaining the package) made incorrect use of the epoch and
 # that's why it is at 12 now.  It should have never been used, but it was.
@@ -36,28 +31,25 @@
 Source9:  dhcp.schema
 Source10: get-ldap-patch.sh
 
-Patch0:   %{name}-4.0.0-errwarn-message.patch
-Patch1:   %{name}-4.0.0-ldap-configuration.patch
-Patch2:   %{name}-4.0.0-memory.patch
-Patch3:   %{name}-4.0.0-options.patch
-Patch4:   %{name}-4.0.0-release-by-ifup.patch
-Patch5:   %{name}-4.0.0-dhclient-decline-backoff.patch
-Patch6:   %{name}-4.0.0-enable-timeout-functions.patch
-Patch7:   %{name}-4.0.0-unicast-bootp.patch
-Patch8:   %{name}-4.0.0-fast-timeout.patch
-Patch9:   %{name}-4.0.0-failover-ports.patch
-Patch10:  %{name}-4.0.0-dhclient-usage.patch
-Patch11:  %{name}-4.0.0-default-requested-options.patch
-Patch12:  %{name}-4.0.0-xen-checksum.patch
-Patch13:  %{name}-4.0.0-dhclient-anycast.patch
-Patch14:  %{name}-4.0.0-manpages.patch
-Patch15:  %{name}-4.0.0-paths.patch
-Patch16:  %{name}-4.0.0-NetworkManager-crash.patch
-Patch17:  %{name}-4.0.0-CLOEXEC.patch
-Patch18:  %{name}-4.0.0-inherit-leases.patch
-Patch19:  %{name}-4.0.0-garbage-chars.patch
-Patch20:  %{name}-4.0.0-port-validation.patch
-Patch21:  %{name}-4.0.0-invalid-dhclient-conf.patch
+Patch0:   %{name}-4.1.0-errwarn-message.patch
+Patch1:   %{name}-4.1.0-ldap-configuration.patch
+Patch2:   %{name}-4.1.0-memory.patch
+Patch3:   %{name}-4.1.0-options.patch
+Patch4:   %{name}-4.1.0-release-by-ifup.patch
+Patch5:   %{name}-4.1.0-dhclient-decline-backoff.patch
+Patch6:   %{name}-4.1.0-unicast-bootp.patch
+Patch7:   %{name}-4.1.0-failover-ports.patch
+Patch8:   %{name}-4.1.0-dhclient-usage.patch
+Patch9:   %{name}-4.1.0-default-requested-options.patch
+Patch10:  %{name}-4.1.0-xen-checksum.patch
+Patch11:  %{name}-4.1.0-dhclient-anycast.patch
+Patch12:  %{name}-4.1.0-manpages.patch
+Patch13:  %{name}-4.1.0-paths.patch
+Patch14:  %{name}-4.1.0-CLOEXEC.patch
+Patch15:  %{name}-4.1.0-inherit-leases.patch
+Patch16:  %{name}-4.1.0-garbage-chars.patch
+Patch17:  %{name}-4.1.0-port-validation.patch
+Patch18:  %{name}-4.1.0-invalid-dhclient-conf.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf
@@ -111,16 +103,6 @@
 libdhcpctl and libomapi static libraries are also included in this package.
 
 %prep
-case "%{netmethod}" in
-    USE_LPF|USE_SOCKETS)
-        continue ;;
-    *)
-        echo >&2
-        echo "ERROR: Only --with options supported:  USE_LPF, USE_SOCKETS" >&2
-        echo >&2
-        exit 1 ;;
-esac
-
 %setup -q
 
 # Replace the standard ISC warning message about requesting help with an
@@ -138,7 +120,7 @@
 # Init struct sock_prog in common/lpf.c to NULL
 %patch2 -p1
 
-# Add more dhclient options (-I, -B, -H, -F, -T, -V, and -R)
+# Add more dhclient options (-I, -B, -H, -F, -timeout, -V, and -R)
 %patch3 -p1
 
 # Handle releasing interfaces requested by /sbin/ifup
@@ -149,62 +131,52 @@
 # backoff for an amount of time before trying again
 %patch5 -p1
 
-# Enable cancel_all_timeouts() and relinquish_timeouts() regardless of
-# the DEBUG_MEMORY_LEAKAGE_ON_EXIT macro
-%patch6 -p1
-
 # Support unicast BOOTP for IBM pSeries systems (and maybe others)
-%patch7 -p1
-
-# Fast timeout for dhclient
-%patch8 -p1
+%patch6 -p1
 
 # Use the following IANA-registered failover ports:
 # dhcp-failover 647/tcp
 # dhcp-failover 647/udp
 # dhcp-failover 847/tcp
 # dhcp-failover 847/udp
-%patch9 -p1
+%patch7 -p1
 
 # Update the usage screen for dhclient(8) indicating new options
 # Use printf() rather than log_info() to display the information
 # Also, return EXIT_FAILURE when the usage() screen is displayed (stop parsing)
-%patch10 -p1
+%patch8 -p1
 
 # Add NIS domain, NIS servers, and NTP servers to the list of default
 # requested DHCP options
-%patch11 -p1
+%patch9 -p1
 
 # Handle Xen partial UDP checksums
-%patch12 -p1
+%patch10 -p1
 
 # Add anycast support to dhclient (for OLPC)
-%patch13 -p1
+%patch11 -p1
 
 # Patch man page contents
-%patch14 -p1
+%patch12 -p1
 
 # Change paths to conform to our standards
-%patch15 -p1
-
-# Avoid crash when dhclient is run with NetworkManager
-%patch16 -p1
+%patch13 -p1
 
 # Make sure all open file descriptors are closed-on-exec for SELinux (#446632)
-%patch17 -p1
+%patch14 -p1
 
 # If we have an active lease, do not down the interface (#453982)
-%patch18 -p1
+%patch15 -p1
 
 # Fix 'garbage in format string' error (#450052)
-%patch19 -p1
+%patch16 -p1
 
 # Validate port numbers specified for dhclient, dhcpd, and dhcrelay
 # to make sure they are within 1-65535, inclusive.  (#438149)
-%patch20 -p1
+%patch17 -p1
 
 # The sample dhclient.conf should say 'supersede domain-search' (#467955)
-%patch21 -p1
+%patch18 -p1
 
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 %{__install} -p -m 0644 %{SOURCE3} .
@@ -249,14 +221,14 @@
     %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \
                 -e 's|RUNDIR|%{_localstatedir}/run|g' \
                 -e 's|DBDIR|%{_localstatedir}/db/dhclient|g' \
-                -e 's|ETCDIR|%{_sysconfdir}|g' $page
+                -e 's|ETCDIR|%{_sysconfdir}/dhcp|g' $page
 done
 
 for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
     %{__sed} -i -e 's|CLIENTBINDIR|/sbin|g' \
                 -e 's|RUNDIR|%{_localstatedir}/run|g' \
                 -e 's|DBDIR|%{_localstatedir}/db/dhcpd|g' \
-                -e 's|ETCDIR|%{_sysconfdir}|g' $page
+                -e 's|ETCDIR|%{_sysconfdir}/dhcp|g' $page
 done
 
 aclocal
@@ -266,9 +238,9 @@
 automake --foreign --add-missing --copy
 
 %build
-CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE -DUSE_SSL=1 -D%{netmethod}=1" \
+CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE -DLDAP_CONFIGURATION -DUSE_SSL" \
 %configure \
-    --disable-dhcpv6 \
+    %{dhcpv6opt} \
     --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \
     --with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \
     --with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \
@@ -336,9 +308,23 @@
 %{__rm} -rf %{buildroot}
 
 %post
+if [ -f /etc/dhcpd.conf ]; then
+    /bin/cp -a /etc/dhcpd.conf /etc/dhcp/dhcpd.conf >/dev/null 2>&1
+    /bin/rm -f /etc/dhcpd.conf >/dev/null 2>&1
+fi
+
 /sbin/chkconfig --add dhcpd
 /sbin/chkconfig --add dhcrelay || :
 
+%post -n dhclient
+/bin/ls -1 /etc/dhclient* >/dev/null 2>&1
+if [ $? = 0 ]; then
+    /bin/ls -1 /etc/dhclient* 2>/dev/null | while read etcfile ; do
+        /bin/cp -a "${etcfile}" /etc/dhcp
+        /bin/rm -f "${etcfile}"
+    done || :
+fi || :
+
 %preun
 if [ $1 = 0 ]; then
     /sbin/service dhcpd status >/dev/null 2>&1
@@ -410,6 +396,15 @@
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
 %changelog
+* Tue Jan 06 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-1
+- Upgraded to ISC dhcp-4.1.0
+- Had to rename the -T option to -timeout as ISC is now using -T
+- Allow package rebuilders to easily enable DHCPv6 support with:
+      rpmbuild --with DHCPv6 dhcp.spec
+  Note that Fedora is still using the 'dhcpv6' package, but some
+  users may want to experiment with the ISC DHCPv6 implementation
+  locally.
+
 * Thu Dec 18 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-34
 - Move /etc/dhclient.conf to /etc/dhcp/dhclient.conf
 - Move /etc/dhcpd.conf to /etc/dhcp/dhcpd.conf


Index: dhcpd.init
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/dhcpd.init,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- dhcpd.init	18 Dec 2008 22:47:13 -0000	1.27
+++ dhcpd.init	6 Jan 2009 23:46:51 -0000	1.28
@@ -46,7 +46,7 @@
             continue
         fi
     done
-    echo "/etc/dhcpd.conf"
+    echo "/etc/dhcp/dhcpd.conf"
 }
 
 conf="$(findConfig "$DHCPDARGS")"


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/sources,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- sources	13 Jan 2008 21:02:47 -0000	1.23
+++ sources	6 Jan 2009 23:46:51 -0000	1.24
@@ -1 +1 @@
-31d79b27ce4a94089a0b9ce7f72307fa  dhcp-4.0.0.tar.gz
+1fffed2e8c3d67b111316d6a9b33db7a  dhcp-4.1.0.tar.gz




More information about the scm-commits mailing list