[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Would you be open to accepting DHCP 4.1.2 into Squeeze?



Hi,

ISC has just released DHCP 4.1.2, which fixes 
CERT: VU#102047 CVE: CVE-2010-3611

The full release notes are at
http://ftp.isc.org/isc/dhcp/dhcp-4.1.2-RELNOTES

The changes between 4.1.1-P1 and 4.1.2 look to be fairly minimal, and I was
wondering if you'd be willing to accept 4.1.2 into Squeeze if I did an upload?

A complete upstream diff is attached.

regards

Andrew
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/aclocal.m4 dhcp-4.1.2/aclocal.m4
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/aclocal.m4	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/aclocal.m4	2010-10-22 14:45:36.000000000 -0700
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.62],,
-[m4_warning([this file was generated for autoconf 2.62.
+m4_if(AC_AUTOCONF_VERSION, [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/clparse.c dhcp-4.1.2/client/clparse.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/clparse.c	2009-07-24 15:04:51.000000000 -0700
+++ dhcp-4.1.2/client/clparse.c	2010-09-13 15:20:43.000000000 -0700
@@ -3,7 +3,7 @@
    Parser for dhclient config and lease files... */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1510,12 +1510,12 @@
 static struct dhc6_ia *
 parse_client6_ia_na_statement(struct parse *cfile)
 {
-	struct data_string id;
 	struct option_cache *oc = NULL;
 	struct dhc6_ia *ia;
 	struct dhc6_addr **addr;
 	const char *val;
-	int token, no_semi;
+	int token, no_semi, len;
+	u_int8_t buf[5];
 
 	ia = dmalloc(sizeof(*ia), MDL);
 	if (ia == NULL) {
@@ -1526,20 +1526,11 @@
 	ia->ia_type = D6O_IA_NA;
 
 	/* Get IAID. */
-	memset(&id, 0, sizeof(id));
-	if (parse_cshl(&id, cfile)) {
-		if (id.len == 4)
-			memcpy(ia->iaid, id.data, 4);
-		else {
-			parse_warn(cfile, "Expecting IAID of length 4, got %d.",
-				   id.len);
-			skip_to_semi(cfile);
-			dfree(ia, MDL);
-			return NULL;
-		}
-		data_string_forget(&id, MDL);
+	len = parse_X(cfile, buf, 5);
+	if (len == 4) {
+		memcpy(ia->iaid, buf, 4);
 	} else {
-		parse_warn(cfile, "Expecting IAID.");
+		parse_warn(cfile, "Expecting IAID of length 4, got %d.", len);
 		skip_to_semi(cfile);
 		dfree(ia, MDL);
 		return NULL;
@@ -1647,12 +1638,12 @@
 static struct dhc6_ia *
 parse_client6_ia_ta_statement(struct parse *cfile)
 {
-	struct data_string id;
 	struct option_cache *oc = NULL;
 	struct dhc6_ia *ia;
 	struct dhc6_addr **addr;
 	const char *val;
-	int token, no_semi;
+	int token, no_semi, len;
+	u_int8_t buf[5];
 
 	ia = dmalloc(sizeof(*ia), MDL);
 	if (ia == NULL) {
@@ -1663,20 +1654,11 @@
 	ia->ia_type = D6O_IA_TA;
 
 	/* Get IAID. */
-	memset(&id, 0, sizeof(id));
-	if (parse_cshl(&id, cfile)) {
-		if (id.len == 4)
-			memcpy(ia->iaid, id.data, 4);
-		else {
-			parse_warn(cfile, "Expecting IAID of length 4, got %d.",
-				   id.len);
-			skip_to_semi(cfile);
-			dfree(ia, MDL);
-			return NULL;
-		}
-		data_string_forget(&id, MDL);
+	len = parse_X(cfile, buf, 5);
+	if (len == 4) {
+		memcpy(ia->iaid, buf, 4);
 	} else {
-		parse_warn(cfile, "Expecting IAID.");
+		parse_warn(cfile, "Expecting IAID of length 4, got %d.", len);
 		skip_to_semi(cfile);
 		dfree(ia, MDL);
 		return NULL;
@@ -1764,12 +1746,12 @@
 static struct dhc6_ia *
 parse_client6_ia_pd_statement(struct parse *cfile)
 {
-	struct data_string id;
 	struct option_cache *oc = NULL;
 	struct dhc6_ia *ia;
 	struct dhc6_addr **pref;
 	const char *val;
-	int token, no_semi;
+	int token, no_semi, len;
+	u_int8_t buf[5];
 
 	ia = dmalloc(sizeof(*ia), MDL);
 	if (ia == NULL) {
@@ -1780,20 +1762,11 @@
 	ia->ia_type = D6O_IA_PD;
 
 	/* Get IAID. */
-	memset(&id, 0, sizeof(id));
-	if (parse_cshl(&id, cfile)) {
-		if (id.len == 4)
-			memcpy(ia->iaid, id.data, 4);
-		else {
-			parse_warn(cfile, "Expecting IAID of length 4, got %d.",
-				   id.len);
-			skip_to_semi(cfile);
-			dfree(ia, MDL);
-			return NULL;
-		}
-		data_string_forget(&id, MDL);
+	len = parse_X(cfile, buf, 5);
+	if (len == 4) {
+		memcpy(ia->iaid, buf, 4);
 	} else {
-		parse_warn(cfile, "Expecting IAID.");
+		parse_warn(cfile, "Expecting IAID of length 4, got %d.", len);
 		skip_to_semi(cfile);
 		dfree(ia, MDL);
 		return NULL;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhc6.c dhcp-4.1.2/client/dhc6.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhc6.c	2009-07-24 15:04:51.000000000 -0700
+++ dhcp-4.1.2/client/dhc6.c	2010-09-10 13:31:37.000000000 -0700
@@ -1,7 +1,7 @@
 /* dhc6.c - DHCPv6 client routines. */
 
 /*
- * Copyright (c) 2006-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2006-2010 by Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -110,6 +110,10 @@
 				 struct option_state *options);
 static isc_boolean_t active_prefix(struct client_state *client);
 
+static int check_timing6(struct client_state *client, u_int8_t msg_type, 
+		         char *msg_str, struct dhc6_lease *lease,
+		         struct data_string *ds);
+
 extern int onetry;
 extern int stateless;
 
@@ -1453,36 +1457,20 @@
 }
 
 /*
- * do_init6() marshals and transmits a solicit.
+ * check_timing6() check on the timing for sending a v6 message
+ * and then do the basic initialization for a v6 message.
  */
-void
-do_init6(void *input)
+#define CHK_TIM_SUCCESS		0
+#define CHK_TIM_MRC_EXCEEDED	1
+#define CHK_TIM_MRD_EXCEEDED	2
+#define CHK_TIM_ALLOC_FAILURE	3
+
+int
+check_timing6 (struct client_state *client, u_int8_t msg_type, 
+	       char *msg_str, struct dhc6_lease *lease,
+	       struct data_string *ds)
 {
-	struct client_state *client;
-	struct dhc6_ia *old_ia;
-	struct dhc6_addr *old_addr;
-	struct data_string ds;
-	struct data_string ia;
-	struct data_string addr;
-	struct timeval elapsed, tv;
-	u_int32_t t1, t2;
-	int i, idx, len, send_ret;
-
-	client = input;
-
-	/*
-	 * In RFC3315 section 17.1.2, the retransmission timer is
-	 * used as the selecting timer.
-	 */
-	if (client->advertised_leases != NULL) {
-		start_selecting6(client);
-		return;
-	}
-
-	if ((client->MRC != 0) && (client->txcount > client->MRC)) {
-		log_info("Max retransmission count exceeded.");
-		return;
-	}
+	struct timeval elapsed;
 
 	/*
 	 * Start_time starts at the first transmission.
@@ -1490,6 +1478,9 @@
 	if (client->txcount == 0) {
 		client->start_time.tv_sec = cur_tv.tv_sec;
 		client->start_time.tv_usec = cur_tv.tv_usec;
+	} else if ((client->MRC != 0) && (client->txcount > client->MRC)) {
+		log_info("Max retransmission count exceeded.");
+		return(CHK_TIM_MRC_EXCEEDED);
 	}
 
 	/* elapsed = cur - start */
@@ -1499,30 +1490,23 @@
 		elapsed.tv_sec -= 1;
 		elapsed.tv_usec += 1000000;
 	}
+
 	/* Check if finished (-1 argument). */
 	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
 		log_info("Max retransmission duration exceeded.");
-		client->state = S_STOPPED;
-		if (client->active_lease != NULL) {
-			dhc6_lease_destroy(&client->active_lease, MDL);
-			client->active_lease = NULL;
-		}
-		/* Stop if and only if this is the last client. */
-		if (stopping_finished())
-			exit(2);
-		return;
+		return(CHK_TIM_MRD_EXCEEDED);
 	}
 
-	memset(&ds, 0, sizeof(ds));
-	if (!buffer_allocate(&ds.buffer, 4, MDL)) {
-		log_error("Unable to allocate memory for SOLICIT.");
-		return;
+	memset(ds, 0, sizeof(*ds));
+	if (!buffer_allocate(&(ds->buffer), 4, MDL)) {
+		log_error("Unable to allocate memory for %s.", msg_str);
+		return(CHK_TIM_ALLOC_FAILURE);
 	}
-	ds.data = ds.buffer->data;
-	ds.len = 4;
+	ds->data = ds->buffer->data;
+	ds->len = 4;
 
-	ds.buffer->data[0] = DHCPV6_SOLICIT;
-	memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
+	ds->buffer->data[0] = msg_type;
+	memcpy(ds->buffer->data + 1, client->dhcpv6_transaction_id, 3);
 
 	/* Form an elapsed option. */
 	/* Maximum value is 65535 1/100s coded as 0xffff. */
@@ -1535,15 +1519,60 @@
 	}
 
 	if (client->elapsed == 0)
-		log_debug("XMT: Forming Solicit, 0 ms elapsed.");
+		log_debug("XMT: Forming %s, 0 ms elapsed.", msg_str);
 	else
-		log_debug("XMT: Forming Solicit, %u0 ms elapsed.",
+		log_debug("XMT: Forming %s, %u0 ms elapsed.", msg_str,
 			  (unsigned)client->elapsed);
 
 	client->elapsed = htons(client->elapsed);
 
-	make_client6_options(client, &client->sent_options, NULL,
-			     DHCPV6_SOLICIT);
+	make_client6_options(client, &client->sent_options, lease, msg_type);
+
+	return(CHK_TIM_SUCCESS);
+}
+
+/*
+ * do_init6() marshals and transmits a solicit.
+ */
+void
+do_init6(void *input)
+{
+	struct client_state *client;
+	struct dhc6_ia *old_ia;
+	struct dhc6_addr *old_addr;
+	struct data_string ds;
+	struct data_string ia;
+	struct data_string addr;
+	struct timeval tv;
+	u_int32_t t1, t2;
+	int i, idx, len, send_ret;
+
+	client = input;
+
+	/*
+	 * In RFC3315 section 17.1.2, the retransmission timer is
+	 * used as the selecting timer.
+	 */
+	if (client->advertised_leases != NULL) {
+		start_selecting6(client);
+		return;
+	}
+
+	switch(check_timing6(client, DHCPV6_SOLICIT, "Solicit", NULL, &ds)) {
+	      case CHK_TIM_MRC_EXCEEDED:
+	      case CHK_TIM_ALLOC_FAILURE:
+		return;
+	      case CHK_TIM_MRD_EXCEEDED:
+		client->state = S_STOPPED;
+		if (client->active_lease != NULL) {
+			dhc6_lease_destroy(&client->active_lease, MDL);
+			client->active_lease = NULL;
+		}
+		/* Stop if and only if this is the last client. */
+		if (stopping_finished())
+			exit(2);
+		return;
+	}
 
 	/*
 	 * Fetch any configured 'sent' options (includes DUID) in wire format.
@@ -1894,69 +1923,22 @@
 {
 	struct client_state *client;
 	struct data_string ds;
-	struct timeval elapsed, tv;
+	struct timeval tv;
 	int send_ret;
 
 	client = input;
 
-	if ((client->MRC != 0) && (client->txcount > client->MRC)) {
-		log_info("Max retransmission count exceeded.");
+	switch(check_timing6(client, DHCPV6_INFORMATION_REQUEST,
+			     "Info-Request", NULL, &ds)) {
+	      case CHK_TIM_MRC_EXCEEDED:
+	      case CHK_TIM_ALLOC_FAILURE:
 		return;
-	}
-
-	/*
-	 * Start_time starts at the first transmission.
-	 */
-	if (client->txcount == 0) {
-		client->start_time.tv_sec = cur_tv.tv_sec;
-		client->start_time.tv_usec = cur_tv.tv_usec;
-	}
-
-	/* elapsed = cur - start */
-	elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
-	elapsed.tv_usec = cur_tv.tv_usec - client->start_time.tv_usec;
-	if (elapsed.tv_usec < 0) {
-		elapsed.tv_sec -= 1;
-		elapsed.tv_usec += 1000000;
-	}
-	/* Check if finished (-1 argument). */
-	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
-		log_info("Max retransmission duration exceeded.");
+	      case CHK_TIM_MRD_EXCEEDED:
 		exit(2);
+	      case CHK_TIM_SUCCESS:
+		break;
 	}
 
-	memset(&ds, 0, sizeof(ds));
-	if (!buffer_allocate(&ds.buffer, 4, MDL)) {
-		log_error("Unable to allocate memory for INFO-REQUEST.");
-		return;
-	}
-	ds.data = ds.buffer->data;
-	ds.len = 4;
-
-	ds.buffer->data[0] = DHCPV6_INFORMATION_REQUEST;
-	memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
-
-	/* Form an elapsed option. */
-	/* Maximum value is 65535 1/100s coded as 0xffff. */
-	if ((elapsed.tv_sec < 0) || (elapsed.tv_sec > 655) ||
-	    ((elapsed.tv_sec == 655) && (elapsed.tv_usec > 350000))) {
-		client->elapsed = 0xffff;
-	} else {
-		client->elapsed = elapsed.tv_sec * 100;
-		client->elapsed += elapsed.tv_usec / 10000;
-	}
-
-	if (client->elapsed == 0)
-		log_debug("XMT: Forming Info-Request, 0 ms elapsed.");
-	else
-		log_debug("XMT: Forming Info-Request, %u0 ms elapsed.",
-			  (unsigned)client->elapsed);
-
-	client->elapsed = htons(client->elapsed);
-
-	make_client6_options(client, &client->sent_options, NULL,
-			     DHCPV6_INFORMATION_REQUEST);
-
 	/* Fetch any configured 'sent' options (includes DUID) in wire format.
 	 */
 	dhcpv6_universe.encapsulate(&ds, NULL, NULL, client,
@@ -1999,7 +1981,7 @@
 	struct client_state *client;
 	struct data_string ds;
 	int send_ret;
-	struct timeval elapsed, tv;
+	struct timeval tv;
 
 	client = input;
 
@@ -2020,65 +2002,18 @@
 	 * stick there until we get a reply?
 	 */
 
-	if ((client->MRC != 0) && (client->txcount > client->MRC))  {
-		log_info("Max retransmission count exceeded.");
+	switch(check_timing6(client, DHCPV6_CONFIRM, "Confirm",
+			     client->active_lease, &ds)) {
+	      case CHK_TIM_MRC_EXCEEDED:
+	      case CHK_TIM_MRD_EXCEEDED:
 		start_bound(client);
 		return;
-	}
-
-	/*
-	 * Start_time starts at the first transmission.
-	 */
-	if (client->txcount == 0) {
-		client->start_time.tv_sec = cur_tv.tv_sec;
-		client->start_time.tv_usec = cur_tv.tv_usec;
-	}
-
-	/* elapsed = cur - start */
-	elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
-	elapsed.tv_usec = cur_tv.tv_usec - client->start_time.tv_usec;
-	if (elapsed.tv_usec < 0) {
-		elapsed.tv_sec -= 1;
-		elapsed.tv_usec += 1000000;
-	}
-	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
-		log_info("Max retransmission duration exceeded.");
-		start_bound(client);
+	      case CHK_TIM_ALLOC_FAILURE:
 		return;
+	      case CHK_TIM_SUCCESS:
+		break;
 	}
 
-	memset(&ds, 0, sizeof(ds));
-	if (!buffer_allocate(&ds.buffer, 4, MDL)) {
-		log_error("Unable to allocate memory for Confirm.");
-		return;
-	}
-	ds.data = ds.buffer->data;
-	ds.len = 4;
-
-	ds.buffer->data[0] = DHCPV6_CONFIRM;
-	memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
-
-	/* Form an elapsed option. */
-	/* Maximum value is 65535 1/100s coded as 0xffff. */
-	if ((elapsed.tv_sec < 0) || (elapsed.tv_sec > 655) ||
-	    ((elapsed.tv_sec == 655) && (elapsed.tv_usec > 350000))) {
-		client->elapsed = 0xffff;
-	} else {
-		client->elapsed = elapsed.tv_sec * 100;
-		client->elapsed += elapsed.tv_usec / 10000;
-	}
-
-	if (client->elapsed == 0)
-		log_debug("XMT: Forming Confirm, 0 ms elapsed.");
-	else
-		log_debug("XMT: Forming Confirm, %u0 ms elapsed.",
-			  (unsigned)client->elapsed);
-
-	client->elapsed = htons(client->elapsed);
-
-	make_client6_options(client, &client->sent_options,
-			     client->active_lease, DHCPV6_CONFIRM);
-
 	/* Fetch any configured 'sent' options (includes DUID') in wire format.
 	 */
 	dhcpv6_universe.encapsulate(&ds, NULL, NULL, client, NULL,
@@ -2179,17 +2114,14 @@
 	if ((client->active_lease == NULL) || !active_prefix(client))
 		return;
 
-	if ((client->MRC != 0) && (client->txcount > client->MRC))  {
-		log_info("Max retransmission count exceeded.");
+	switch(check_timing6(client, DHCPV6_RELEASE, "Release", 
+			     client->active_lease, &ds)) {
+	      case CHK_TIM_MRC_EXCEEDED:
+	      case CHK_TIM_ALLOC_FAILURE:
+	      case CHK_TIM_MRD_EXCEEDED:
 		goto release_done;
-	}
-
-	/*
-	 * Start_time starts at the first transmission.
-	 */
-	if (client->txcount == 0) {
-		client->start_time.tv_sec = cur_tv.tv_sec;
-		client->start_time.tv_usec = cur_tv.tv_usec;
+	      case CHK_TIM_SUCCESS:
+		break;
 	}
 
 	/*
@@ -2197,20 +2129,6 @@
 	 * available address with enough scope.
 	 */
 
-	memset(&ds, 0, sizeof(ds));
-	if (!buffer_allocate(&ds.buffer, 4, MDL)) {
-		log_error("Unable to allocate memory for Release.");
-		goto release_done;
-	}
-
-	ds.data = ds.buffer->data;
-	ds.len = 4;
-	ds.buffer->data[0] = DHCPV6_RELEASE;
-	memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
-
-	log_debug("XMT: Forming Release.");
-	make_client6_options(client, &client->sent_options,
-			     client->active_lease, DHCPV6_RELEASE);
 	dhcpv6_universe.encapsulate(&ds, NULL, NULL, client, NULL,
 				    client->sent_options, &global_scope,
 				    &dhcpv6_universe);
@@ -3251,8 +3169,7 @@
 	struct client_state *client;
 	struct dhc6_lease *lease;
 	struct data_string ds;
-	struct timeval elapsed, tv;
-	int abort = ISC_FALSE;
+	struct timeval tv;
 	int send_ret;
 
 	client = input;
@@ -3265,32 +3182,9 @@
 		return;
 	}
 
-	if ((client->MRC != 0) && (client->txcount > client->MRC)) {
-		log_info("Max retransmission count exceeded.");
-		abort = ISC_TRUE;
-	}
-
-	/*
-	 * Start_time starts at the first transmission.
-	 */
-	if (client->txcount == 0) {
-		client->start_time.tv_sec = cur_tv.tv_sec;
-		client->start_time.tv_usec = cur_tv.tv_usec;
-	}
-
-	/* elapsed = cur - start */
-	elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
-	elapsed.tv_usec = cur_tv.tv_usec - client->start_time.tv_usec;
-	if (elapsed.tv_usec < 0) {
-		elapsed.tv_sec -= 1;
-		elapsed.tv_usec += 1000000;
-	}
-	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
-		log_info("Max retransmission duration exceeded.");
-		abort = ISC_TRUE;
-	}
-
-	if (abort) {
+	switch(check_timing6(client, DHCPV6_REQUEST, "Request", lease, &ds)) {
+	      case CHK_TIM_MRC_EXCEEDED:
+	      case CHK_TIM_MRD_EXCEEDED:
 		log_debug("PRC: Lease %s failed.",
 			  print_hex_1(lease->server_id.len,
 				      lease->server_id.data, 56));
@@ -3304,8 +3198,11 @@
 			start_selecting6(client);
 		else
 			start_init6(client);
-
 		return;
+	      case CHK_TIM_ALLOC_FAILURE:
+		return;
+	      case CHK_TIM_SUCCESS:
+		break;
 	}
 
 	/* Now make a packet that looks suspiciously like the one we
@@ -3318,37 +3215,6 @@
 	 * construct for the iaid, then we can delve into this matter
 	 * more properly.  In the time being, this will work.
 	 */
-	memset(&ds, 0, sizeof(ds));
-	if (!buffer_allocate(&ds.buffer, 4, MDL)) {
-		log_error("Unable to allocate memory for REQUEST.");
-		return;
-	}
-	ds.data = ds.buffer->data;
-	ds.len = 4;
-
-	ds.buffer->data[0] = DHCPV6_REQUEST;
-	memcpy(ds.buffer->data + 1, client->dhcpv6_transaction_id, 3);
-
-	/* Form an elapsed option. */
-	/* Maximum value is 65535 1/100s coded as 0xffff. */
-	if ((elapsed.tv_sec < 0) || (elapsed.tv_sec > 655) ||
-	    ((elapsed.tv_sec == 655) && (elapsed.tv_usec > 350000))) {
-		client->elapsed = 0xffff;
-	} else {
-		client->elapsed = elapsed.tv_sec * 100;
-		client->elapsed += elapsed.tv_usec / 10000;
-	}
-
-	if (client->elapsed == 0)
-		log_debug("XMT: Forming Request, 0 ms elapsed.");
-	else
-		log_debug("XMT: Forming Request, %u0 ms elapsed.",
-			  (unsigned)client->elapsed);
-
-	client->elapsed = htons(client->elapsed);
-
-	make_client6_options(client, &client->sent_options, lease,
-			     DHCPV6_REQUEST);
 
 	/* Fetch any configured 'sent' options (includes DUID) in wire format.
 	 */
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.8 dhcp-4.1.2/client/dhclient.8
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.8	2009-07-24 15:04:51.000000000 -0700
+++ dhcp-4.1.2/client/dhclient.8	2010-07-14 13:57:49.000000000 -0700
@@ -1,6 +1,6 @@
-.\"	$Id: dhclient.8,v 1.30.8.2 2009/07/24 22:04:51 sar Exp $
+.\"	$Id: dhclient.8,v 1.30.8.4 2010/07/14 20:57:49 sar Exp $
 .\"
-.\" Copyright (c) 2004,2007-2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004,2007-2010 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -22,7 +22,7 @@
 .\"   https://www.isc.org/
 .\"
 .\" Support and other services are available for ISC products - see
-.\" https://www.isc.org for more information.
+.\" https://www.isc.org for more information or to learn more about ISC.
 .\"
 .TH dhclient 8
 .SH NAME
@@ -95,11 +95,11 @@
 ]
 [
 .B -s
-server
+.I server
 ]
 [
 .B -g
-relay
+.I relay
 ]
 [
 .B -n
@@ -123,7 +123,7 @@
 ]
 ]
 .SH DESCRIPTION
-The Internet Systems Consortium DHCP Client, dhclient, provides a
+The Internet Systems Consortium DHCP Client, \fBdhclient\fR, provides a
 means for configuring one or more network interfaces using the Dynamic
 Host Configuration Protocol, BOOTP protocol, or if these protocols
 fail, by statically assigning an address.
@@ -138,33 +138,14 @@
 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.
+There are two versions of the DHCP protocol DHCPv4 and DHCPv6.  At
+startup the client may be started for one or the other via the
+.B -4
+or 
+.B -6
+options.
 .PP
-On startup, dhclient reads the
+On startup, \fBdhclient\fR reads the dhclient.conf
 .IR dhclient.conf
 for configuration instructions.   It then gets a list of all the
 network interfaces that are configured in the current system.   For
@@ -172,21 +153,21 @@
 protocol.
 .PP
 In order to keep track of leases across system reboots and server
-restarts, dhclient keeps a list of leases it has been assigned in the
-dhclient.leases(5) file.   On startup, after reading the dhclient.conf
-file, dhclient reads the dhclient.leases file to refresh its memory
+restarts, \fBdhclient\fR keeps a list of leases it has been assigned in the
+dhclient.leases file.   On startup, after reading the dhclient.conf
+file, \fBdhclient\fR reads the dhclient.leases file to refresh its memory
 about what leases it has been assigned.
 .PP
 When a new lease is acquired, it is appended to the end of the
 dhclient.leases file.   In order to prevent the file from becoming
-arbitrarily large, from time to time dhclient creates a new
+arbitrarily large, from time to time \fBdhclient\fR creates a new
 dhclient.leases file from its in-core lease database.  The old version
 of the dhclient.leases file is retained under the name
 .IR dhclient.leases~
-until the next time dhclient rewrites the database.
+until the next time \fBdhclient\fR rewrites the database.
 .PP
 Old leases are kept around in case the DHCP server is unavailable when
-dhclient is first invoked (generally during the initial system boot
+\fBdhclient\fR is first invoked (generally during the initial system boot
 process).   In that event, old leases from the dhclient.leases file
 which have not yet expired are tested, and if they are determined to
 be valid, they are used until either they expire or the DHCP server
@@ -195,7 +176,7 @@
 A mobile host which may sometimes need to access a network on which no
 DHCP server exists may be preloaded with a lease for a fixed
 address on that network.   When all attempts to contact a DHCP server
-have failed, dhclient will try to validate the static lease, and if it
+have failed, \fBdhclient\fR will try to validate the static lease, and if it
 succeeds, will use that lease until it is restarted.
 .PP
 A mobile host may also travel to some networks on which DHCP is not
@@ -205,155 +186,200 @@
 than cycling through the list of old leases.
 .SH COMMAND LINE
 .PP
-The names of the network interfaces that dhclient should attempt to
+The names of the network interfaces that \fBdhclient\fR should attempt to
 configure may be specified on the command line.  If no interface names
-are specified on the command line dhclient will normally identify all
+are specified on the command line \fBdhclient\fR will normally identify all
 network interfaces, eliminating non-broadcast interfaces if
 possible, and attempt to configure each interface.
 .PP
-It is also possible to specify interfaces by name in the
-.B dhclient.conf(5)
+It is also possible to specify interfaces by name in the dhclient.conf
 file.   If interfaces are specified in this way, then the client will
 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
-The
-.B -x
-flag tells any currently running client to exit gracefully without
-releasing leases first.
-.PP
-If the client is killed by a signal (for example at shutdown or reboot)
-it won't execute the
-.B dhclient-script (8)
-at exit. However if you shut the client down gracefully with
-.B -r
-or
-.B -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
+.B syslog(3)
+facility.
+.SH OPTIONS
+.TP
+.BI \-4
+Use the DHCPv4 protocol to obtain an IPv4 address and configuration
+parameters.  This is the default and cannot be combined with
+\fB\-6\fR.
+.TP
+.BI \-6
+Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available
+along with configuration parameters.  It cannot be combined with
+\fB\-4\fR.  The \fB\-S -T -P\fR and
+\fB\-N\fR arguments provide more control over aspects of the DHCPv6
+processing.  Note: it is not recommended to mix queries of different
+types together or even to share the lease file between them.
+.TP
+.BI \-1
+Try to get a lease once.  On failure exit with code 2.  In DHCPv6 this
+sets the maximum 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)
+(from 
+.IR dhclient.conf(5)
+with a default of sixty seconds).
+.TP
+.BI \-d
+.\" This is not intuitive.
+Force
+.B dhclient
+to run as a foreground process.  Normally the DHCP client will run
+in the foreground until is has configured an interface at which time
+it will revert to running in the background.  This option is useful
+when running the client under a debugger, or when running it out of
+inittab on System V systems.  This implies \fB-v\fR.
+.TP
+.BI \-nw
+Become a daemon immediately (nowait) rather than waiting until an
+an IP address has been acquired.
+.TP
+.BI \-q
+Be quiet at startup, this is the default.
+.TP
+.BI \-v
+Enable verbose log messages.
+.\" This prints the version, copyright and URL.
+.TP
+.BI \-w
+Continue running even if no broadcast interfaces were found.  Normally
+DHCP client will exit 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.  This 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
+.TP
+.BI \-n
+Do not configure any interfaces.  This is most likely to be useful in
+combination with the
 .B -w
 flag.
+.TP
+.BI \-e \ VAR=val
+Define additional environment variables for the environment where 
+.B dhclient-script(8)
+executes.  You may specify multiple 
+.B \-e
+options on the command line.
+.TP
+.BI \-r
+Release the current lease and stop the running DHCP client as previously
+recorded in the PID file.  When shutdown via this method 
+.B dhclient-script(8)
+will be executed with the specific reason for calling the script set.
+The client normally doesn't release the current lease as this is not
+required by the DHCP protocol but some cable ISPs require their clients
+to notify the server if they wish to release an assigned IP address.
+.\" TODO what dhclient-script argument?
+.\" When released,
+.TP
+.BI \-x
+Stop the running DHCP client without releasing the current lease.
+Kills existing \fBdhclient\fR process as previously recorded in the
+PID file.  When shutdown via this method 
+.B dhclient-script(8)
+will be executed with the specific reason for calling the script set.
+.TP
+.BI \-p \ port
+The UDP port number on which the DHCP client should listen and transmit.
+If unspecified,
+.B dhclient
+uses the default port of 68.  This is mostly useful for debugging purposes.
+If a different port is specified on which the client should listen and
+transmit, the client will also use a different destination port -
+one less than the specified port.
+.TP
+.BI \-s \ server
+Specify the server IP address or fully qualified domain name to use as
+a destination for DHCP protocol messages before 
+.B dhclient
+has acquired an IP address.  Normally,
+.B dhclient
+transmits these messages to 255.255.255.255 (the IP limited broadcast
+address).  Overriding this is mostly useful for debugging purposes.  This
+feature is not supported in DHCPv6 (\fB-6\fR) mode.
+.TP
+.BI \-g \ relay
+.\" mockup relay
+Set the giaddr field of all packets to the \fIrelay\fR IP address
+simulating a relay agent.  This is for testing pruposes only and
+should not be expected to work in any consistent or useful way.
+.TP
+.BI \--version
+Print version number and exit.
+.PP
+.I Options available for DHCPv6 mode:
+.TP
+.BI \-S
+.\" TODO: mention DUID?
+Use Information-request to get only stateless configuration parameters
+(i.e., without address).  This implies \fB\-6\fR.  It also doesn't
+rewrite the lease database.
+.\" TODO: May not be used with -N -P or -T. ??
+.TP
+.BI \-T
+.\" TODO wanted_ia_ta++
+Ask for IPv6 temporary addresses, one set per \fB\-T\fR flag.  This
+implies \fB\-6\fR and also disables the normal address query.
+See \fB\-N\fR to restore it.
+.TP
+.BI \-P
+Enable IPv6 prefix delegation.  This implies \fB\-6\fR and also
+disables the normal address query.  See \fB\-N\fR to restore it.
+Note only one requested interface is allowed.
+.TP
+.BI \-N
+.\" TODO: is this for telling an already running dhclient?
+Restore normal address query for IPv6. This implies \fB-6\fR.
+It is used to restore normal operation after using \fB-T\fR or \fB-P\fR.
+.PP
+.I Modifying default file locations:
+The following options can be used to modify the locations a client uses
+for it's files.  They can be particularly useful if, for example,
+.B DBDIR
+or
+.B RUNDIR
+have not been mounted when the DHCP client is started.
+.TP
+.BI \-cf \ config-file
+Path to the client configuration file.  If unspecified, the default
+.B ETCDIR/dhclient.conf
+is used.  See \fBdhclient.conf(5)\fR for a description of this file.
+.TP
+.BI \-lf \ lease-file
+Path to the lease database file.  If unspecified, the default
+.B DBDIR/dhclient.leases
+is used.  See \fBdhclient.leases(5)\fR for a descriptionof this file.
+.TP
+.BI \-pf \ pid-file
+Path to the process ID file.  If unspecified, the default
+.B RUNDIR/dhclient.pid
+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 CLIENTBINDIR/dhclient-script
+is used.  See \fBdhclient-script(8)\fR for a description of this file.
+
+
 .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.
 .SH CONFIGURATION
-The syntax of the dhclient.conf(5) file is discussed separately.
+The syntax of the \fBdhclient.conf(5)\fR file is discussed separately.
 .SH OMAPI
 The DHCP client provides some ability to control it while it is
 running, without stopping it.  This capability is provided using OMAPI,
@@ -364,7 +390,8 @@
 Rather than implementing the underlying OMAPI protocol directly, user
 programs should use the dhcpctl API or OMAPI itself.   Dhcpctl is a
 wrapper that handles some of the housekeeping chores that OMAPI does
-not do automatically.   Dhcpctl and OMAPI are documented in \fBdhcpctl(3)\fR
+not do automatically.   Dhcpctl and OMAPI are documented in
+\fBdhcpctl(3)\fR
 and \fBomapi(3)\fR.   Most things you'd want to do with the client can
 be done directly using the \fBomshell(1)\fR command, rather than
 having to write a special program.
@@ -385,6 +412,25 @@
 do a DHCPRELEASE.   To pause it, set its state attribute to 3.   To
 resume it, set its state attribute to 4.
 .PP
+.SH ENVIRONMENT VARIABLES
+.PP
+The following environment variables may be defined
+to override the builtin defaults for file locations.
+Note that use of the related command-line options
+will ignore the corresponding environment variable settings.
+.TP
+.B PATH_DHCLIENT_CONF
+The dhclient.conf configuration file.
+.TP
+.B PATH_DHCLIENT_DB
+The dhclient.leases database.
+.TP
+.B PATH_DHCLIENT_PID
+The dhclient PID file.
+.TP
+.B PATH_DHCLIENT_SCRIPT
+The dhclient-script file.
+.PP
 .SH FILES
 .B CLIENTBINDIR/dhclient-script,
 .B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.c dhcp-4.1.2/client/dhclient.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.c	2010-01-07 13:53:52.000000000 -0800
+++ dhcp-4.1.2/client/dhclient.c	2010-10-05 17:32:51.000000000 -0700
@@ -135,6 +135,14 @@
 	setlogmask(LOG_UPTO(LOG_INFO));
 #endif
 
+	/*
+	 * Set up the signal handlers, currently we only
+	 * have one to ignore sigpipe.
+	 */
+	if (dhcp_handle_signal(SIGPIPE, SIG_IGN) != ISC_R_SUCCESS) {
+		log_fatal("Can't set up signal handler");
+	}
+
 	/* Set up the OMAPI. */
 	status = omapi_init();
 	if (status != ISC_R_SUCCESS)
@@ -522,7 +530,7 @@
 					    sizeof seed], sizeof seed);
 		seed += junk;
 	}
-	srandom(seed + cur_time);
+	srandom(seed + cur_time + (unsigned)getpid());
 
 	/* Start a configuration state machine for each interface. */
 #ifdef DHCPv6
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.conf dhcp-4.1.2/client/dhclient.conf
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.conf	1997-06-02 15:50:44.000000000 -0700
+++ dhcp-4.1.2/client/dhclient.conf	2010-09-14 15:49:47.000000000 -0700
@@ -1,7 +1,7 @@
 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;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.conf.5 dhcp-4.1.2/client/dhclient.conf.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.conf.5	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/client/dhclient.conf.5	2010-09-14 15:49:47.000000000 -0700
@@ -1,6 +1,7 @@
-.\"	$Id: dhclient.conf.5,v 1.22.64.3 2009/07/23 19:02:09 sar Exp $
+.\"	$Id: dhclient.conf.5,v 1.22.64.7 2010/09/14 22:49:47 sar Exp $
 .\"
-.\" Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,10 +24,9 @@
 .\"
 .\" This software has been written for Internet Software Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Software Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
+.\" 
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
 .\"
 .TH dhclient.conf 5
 .SH NAME
@@ -184,11 +184,12 @@
 The request statement causes the client to request that any server
 responding to the client send the client its values for the specified
 options.   Only the option names should be specified in the request
-statement - not option parameters.   By default, the DHCP server
+statement - not option parameters.   By default, the DHCPv4 client
 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 and host-name options while the DHCPv6
+client requests the dhcp6 name-servers and domain-search options.  Note
+that if you enter a \'request\' statement, you over-ride these defaults
+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
@@ -200,7 +201,7 @@
 .PP
 In most cases, it is desirable to simply add one option to the request
 list which is of interest to the client in question.  In this case, it
-is best to 'also request' the additional options:
+is best to \'also request\' the additional options:
 .PP
 .nf
 	also request domain-search, dhcp6.sip-servers-addresses;
@@ -234,22 +235,11 @@
 the server with the specified values.  These are full option
 declarations as described in \fBdhcp-options(5)\fR.  Options that are
 always sent in the DHCP protocol should not be specified here, except
-that the client can specify a \fBrequested-lease-time\fR option other
+that the client can specify a requested \fBdhcp-lease-time\fR option other
 than the default requested lease time, which is two hours.  The other
 obvious use for this statement is to send information to the server
 that will allow it to differentiate between this client and other
 clients or kinds of clients.
-.SH DHCPV6 OPERATION
-The client does not yet have a default DHCPv6 Option Request Option (ORO),
-nor has it been integrated with the 'request' and 'require' syntax above.
-It is neccessary to configure an ORO then.
-.PP
-.nf
-  send dhcp6.oro 1, 2, 7, 12, 13, 23, 24, 39;
-.fi
-.PP
-The above ORO will request both identifiers (server, client), the preference,
-unicast, nameservers, domain-search, and FQDN(v6) options.
 .SH DYNAMIC DNS
 The client now has some very limited support for doing DNS updates
 when a lease is acquired.   This is prototypical, and probably doesn't
@@ -680,7 +670,7 @@
     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;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.leases.5 dhcp-4.1.2/client/dhclient.leases.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient.leases.5	2009-07-24 15:04:51.000000000 -0700
+++ dhcp-4.1.2/client/dhclient.leases.5	2010-07-02 16:37:06.000000000 -0700
@@ -1,6 +1,7 @@
-.\"	$Id: dhclient.leases.5,v 1.4.786.2 2009/07/24 22:04:51 sar Exp $
+.\"	$Id: dhclient.leases.5,v 1.4.786.3 2010/07/02 23:37:06 sar Exp $
 .\"
-.\" Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1997-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -22,12 +23,12 @@
 .\"   https://www.isc.org/
 .\"
 .\" This software has been written for Internet Systems Consortium
-.\" by Ted Lemon in cooperation with Vixie
-.\" Enterprises.  To learn more about Internet Systems Consortium,
-.\" see ``https://www.isc.org/''.  To learn more about Vixie
-.\" Enterprises, see ``http://www.vix.com''.
+.\" by Ted Lemon in cooperation with Vixie Enterprises.
 .\"
-.\" $Id: dhclient.leases.5,v 1.4.786.2 2009/07/24 22:04:51 sar Exp $
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.\" $Id: dhclient.leases.5,v 1.4.786.3 2010/07/02 23:37:06 sar Exp $
 .\"
 .TH dhclient.leases 5
 .SH NAME
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient-script.8 dhcp-4.1.2/client/dhclient-script.8
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/dhclient-script.8	2009-07-24 15:04:51.000000000 -0700
+++ dhcp-4.1.2/client/dhclient-script.8	2010-07-02 16:37:06.000000000 -0700
@@ -1,6 +1,7 @@
 .\"	dhclient-script.8
 .\"
-.\" Copyright (c) 2004-2005,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,12 +24,11 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
 .\"
-.\" $Id: dhclient-script.8,v 1.11.762.2 2009/07/24 22:04:51 sar Exp $
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.\" $Id: dhclient-script.8,v 1.11.762.3 2010/07/02 23:37:06 sar Exp $
 .\"
 .TH dhclient-script 8
 .SH NAME
@@ -70,7 +70,7 @@
 for the presence of an executable
 .B ETCDIR/dhclient-enter-hooks
 script, and if present, it invokes the script inline, using the Bourne
-shell '.' command.   The entire environment documented under OPERATION
+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
@@ -82,7 +82,7 @@
 .B CLIENTBINDIR/dhclient-script
 checks for the presence of an executable
 .B ETCDIR/dhclient-exit-hooks
-script, which if present is invoked using the '.' command.  The exit
+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
@@ -122,8 +122,8 @@
 new ip address is passed in $new_ip_address, and the interface name is
 passed in $interface.   The media type is passed in $medium.   Any
 options acquired from the server are passed using the option name
-described in \fBdhcp-options\fR, except that dashes ('-') are replaced
-by underscores ('_') in order to make valid shell variables, and the
+described in \fBdhcp-options\fR, except that dashes (\'-\') are replaced
+by underscores (\'_\') in order to make valid shell variables, and the
 variable names start with new_.   So for example, the new subnet mask
 would be passed in $new_subnet_mask.
 .PP
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/Makefile.am dhcp-4.1.2/client/Makefile.am
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/Makefile.am	2008-11-18 14:33:22.000000000 -0800
+++ dhcp-4.1.2/client/Makefile.am	2010-09-14 15:49:47.000000000 -0700
@@ -10,9 +10,9 @@
 EXTRA_DIST = $(man_MANS)
 
 dhclient.o: dhclient.c
-	$(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
+	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
 		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
 
 dhc6.o: dhc6.c
-	$(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
+	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
 		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/Makefile.in dhcp-4.1.2/client/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/client/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -112,6 +112,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
@@ -548,11 +549,11 @@
 
 
 dhclient.o: dhclient.c
-	$(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
+	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
 		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
 
 dhc6.o: dhc6.c
-	$(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
+	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
 		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/linux dhcp-4.1.2/client/scripts/linux
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/linux	2009-04-21 07:21:09.000000000 -0700
+++ dhcp-4.1.2/client/scripts/linux	2010-09-14 15:49:48.000000000 -0700
@@ -250,6 +250,13 @@
 fi
 
 if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ] ; then
+  if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  ${ip} -f inet6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
+	dev ${interface} scope global
+
   # Make sure nothing has moved around on us.
 
   # Nameservers/domains/etc.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/netbsd dhcp-4.1.2/client/scripts/netbsd
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/netbsd	2009-04-21 07:21:09.000000000 -0700
+++ dhcp-4.1.2/client/scripts/netbsd	2010-09-14 15:49:48.000000000 -0700
@@ -3,9 +3,9 @@
 make_resolv_conf() {
   if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
     cat /dev/null > /etc/resolv.conf.dhclient
-    if [ "x$new_domain_search != x ]; then
+    if [ "x$new_domain_search" != x ]; then
       echo search $new_domain_search >> /etc/resolv.conf.dhclient
-    elif [ "x$new_domain_name != x ]; then
+    elif [ "x$new_domain_name" != x ]; then
       # Note that the DHCP 'Domain Name Option' is really just a domain
       # name, and that this practice of using the domain name option as
       # a search path is both nonstandard and deprecated.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/nextstep dhcp-4.1.2/client/scripts/nextstep
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/nextstep	2006-07-21 19:24:16.000000000 -0700
+++ dhcp-4.1.2/client/scripts/nextstep	2010-09-14 15:49:48.000000000 -0700
@@ -33,9 +33,9 @@
   fi
   if [ x"$new_domain_name_servers" != x ]; then
     cat /dev/null > /etc/resolv.conf.dhclient
-    if [ "x$new_domain_search != x ]; then
+    if [ "x$new_domain_search" != x ]; then
       echo search $new_domain_search >> /etc/resolv.conf.dhclient
-    elif [ "x$new_domain_name != x ]; then
+    elif [ "x$new_domain_name" != x ]; then
       # Note that the DHCP 'Domain Name Option' is really just a domain
       # name, and that this practice of using the domain name option as
       # a search path is both nonstandard and deprecated.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/openwrt dhcp-4.1.2/client/scripts/openwrt
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/client/scripts/openwrt	2009-04-21 07:21:09.000000000 -0700
+++ dhcp-4.1.2/client/scripts/openwrt	2010-09-14 15:49:48.000000000 -0700
@@ -216,6 +216,12 @@
 fi
 
 if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then
+  if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+    exit_with_hooks 2;
+  fi
+
+  ifconfig ${interface} inet6 ${new_ip6_address}/${new_ip6_prefixlen} alias
+
   # Make sure nothing has moved around on us.
 
   # Nameservers/domains/etc.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dhcp-eval.5 dhcp-4.1.2/common/dhcp-eval.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dhcp-eval.5	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/common/dhcp-eval.5	2010-07-02 16:37:06.000000000 -0700
@@ -1,6 +1,7 @@
-.\"	$Id: dhcp-eval.5,v 1.27.364.2 2009/07/24 22:04:52 sar Exp $
+.\"	$Id: dhcp-eval.5,v 1.27.364.3 2010/07/02 23:37:06 sar Exp $
 .\"
-.\" Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,10 +24,10 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
+.\"
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
 .TH dhcp-eval 5
 .SH NAME
 dhcp-eval - ISC DHCP conditional evaluation
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dhcp-options.5 dhcp-4.1.2/common/dhcp-options.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dhcp-options.5	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/common/dhcp-options.5	2010-07-13 13:57:18.000000000 -0700
@@ -1,6 +1,6 @@
-.\"	$Id: dhcp-options.5,v 1.43.8.2 2009/07/24 22:04:52 sar Exp $
+.\"	$Id: dhcp-options.5,v 1.43.8.4 2010/07/13 20:57:18 dhankins Exp $
 .\"
-.\" Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,11 +23,11 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
-.TH dhcpd-options 5
+.\"
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.TH dhcp-options 5
 .SH NAME
 dhcp-options - Dynamic Host Configuration Protocol options
 .SH DESCRIPTION
@@ -320,7 +320,7 @@
 .B option \fBdhcp-option-overload\fR \fIuint8\fR\fB;\fR
 .RS 0.25i
 .PP
-This option is used to indicate that the DHCP 'sname' or 'file'
+This option is used to indicate that the DHCP \'sname\' or \'file\'
 fields are being overloaded by using them to carry DHCP options. A
 DHCP server inserts this option if the returned parameters will
 exceed the usual space allotted for options.
@@ -332,8 +332,8 @@
 Legal values for this option are:
 .PP
 .nf
-             1     the 'file' field is used to hold options
-             2     the 'sname' field is used to hold options
+             1     the \'file\' field is used to hold options
+             2     the \'sname\' field is used to hold options
              3     both fields are used to hold options                        
 .fi
 .PP
@@ -395,7 +395,7 @@
 optionally be included in the DHCPACK and DHCPNAK messages.  DHCP
 servers include this option in the DHCPOFFER in order to allow the
 client to distinguish between lease offers.  DHCP clients use the
-contents of the 'server identifier' field as the destination address
+contents of the \'server identifier\' field as the destination address
 for any DHCP messages unicast to the DHCP server.  DHCP clients also
 indicate which of several lease offers is being accepted by including
 this option in a DHCPREQUEST message.
@@ -427,7 +427,7 @@
 .B option \fBdomain-search\fR \fIdomain-list\fR\fB;\fR
 .RS 0.25i
 .PP
-The domain-search option specifies a 'search list' of Domain Names to be
+The domain-search option specifies a \'search list\' of Domain Names to be
 used by the client to locate not-fully-qualified domain names.  The difference
 between this option and historic use of the domain-name option for the same
 ends is that this option is encoded in RFC1035 compressed labels on the wire.
@@ -1230,7 +1230,7 @@
 .PP
 Specifies the domain name that the client wishes to use.   This can be a
 fully-qualified domain name, or a single label.   If there is no trailing
-'.' character in the name, it is not fully-qualified, and the server will
+\'.\' character in the name, it is not fully-qualified, and the server will
 generally update that name in some locally-defined domain.
 .RE
 .PP
@@ -1396,7 +1396,7 @@
 .RS 0.25i
 .PP
 The \fBpreference\fR option informs a DHCPv6 client which server is
-'preferred' for use on a given subnet.  This preference is only
+\'preferred\' for use on a given subnet.  This preference is only
 applied during the initial stages of configuration - once a client
 is bound to an IA, it will remain bound to that IA until it is no
 longer valid or has expired.  This value may be configured on the
@@ -1538,18 +1538,18 @@
 .RS 0.25i
 .PP
 The \fBia-pd\fR option is manufactured by clients and servers to create a
-Prefix Delegation binding - to delegate an IPv6 prefix to the client.  There
-is not yet any support for prefix delegation in this software, and this
-option is provided informationally only.
+Prefix Delegation binding - to delegate an IPv6 prefix to the client.  It is
+not directly edited in dhcpd.conf(5) or dhclient.conf(5), but rather is
+manufactured and consumed by the software.
 .RE
 .PP
 .B option \fBdhcp6.ia-prefix\fR \fIstring\fR\fB;\fR
 .RS 0.25i
 .PP
 The \fBia-prefix\fR option is placed inside \fBia-pd\fR options in order
-to identify the prefix(es) allocated to the client.  There is not yet
-any suport for prefix delegation in this software, and this option is
-provided informationally only.
+to identify the prefix(es) allocated to the client.  It is not directly
+edited in dhcpd.conf(5) or dhclient.conf(5), but rather is
+manufactured and consumed by the software.
 .RE
 .PP
 .B option
@@ -1712,7 +1712,7 @@
 that no official DHCP option name will ever start with "local".
 .PP
 Once you have chosen a name, you must choose a code.  All codes between
-224 and 254 are reserved as 'site-local' DHCP options, so you can pick
+224 and 254 are reserved as \'site-local\' DHCP options, so you can pick
 any one of these for your site (not for your product/application).  In
 RFC3942, site-local space was moved from starting at 128 to starting at
 224.  In practice, some vendors have interpreted the protocol rather
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dlpi.c dhcp-4.1.2/common/dlpi.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dlpi.c	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/common/dlpi.c	2010-09-09 15:29:57.000000000 -0700
@@ -3,7 +3,8 @@
    Data Link Provider Interface (DLPI) network interface code. */
 
 /*
- * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -978,7 +979,7 @@
 	
 	dlp = (union DL_primitives *)ctl.buf;
 	
-	if (!expected (DL_BIND_ACK, dlp, flags) < 0) {
+	if (expected (DL_BIND_ACK, dlp, flags) == -1) {
 		return -1;
 	}
 	
@@ -1012,7 +1013,7 @@
 	
 	dlp = (union DL_primitives *)ctl.buf;
 	
-	if (!expected (DL_OK_ACK, dlp, flags) < 0) {
+	if (expected (DL_OK_ACK, dlp, flags) == -1) {
 		return -1;
 	}
 	
@@ -1046,7 +1047,7 @@
 	
 	dlp = (union DL_primitives *) ctl.buf;
 	
-	if (!expected (DL_INFO_ACK, dlp, flags) < 0) {
+	if (expected (DL_INFO_ACK, dlp, flags) == -1) {
 		return -1;
 	}
 	
@@ -1080,7 +1081,7 @@
 
 	dlp = (union DL_primitives *)ctl.buf;
 	
-	if (!expected (DL_PHYS_ADDR_ACK, dlp, flags) < 0) {
+	if (expected (DL_PHYS_ADDR_ACK, dlp, flags) == -1) {
 		return -1;
 	}
 
@@ -1222,15 +1223,15 @@
 {
 	if (msgflags != RS_HIPRI) {
 		/* Message was not M_PCPROTO */
-		return 0;
+		return -1;
 	}
 
-	if (dlp -> dl_primitive != prim) {
+	if (dlp->dl_primitive != prim) {
 		/* Incorrect/unexpected return message */
-		return 0;
+		return -1;
 	}
 	
-	return 1;
+	return 0;
 }
 
 /*
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dns.c dhcp-4.1.2/common/dns.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/dns.c	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/common/dns.c	2010-09-08 15:40:51.000000000 -0700
@@ -3,7 +3,8 @@
    Domain Name Service subroutines. */
 
 /*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2001-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -292,12 +293,18 @@
 	if (!dname || !*dname)
 		return ISC_R_INVALIDARG;
 
-	/* For each subzone, try to find a cached zone. */
-	for (np = dname; np; np = strchr (np, '.')) {
-		np++;
+	/*
+	 * For each subzone, try to find a cached zone.
+	 */
+	for (np = dname;;) {
 		status = dns_zone_lookup (&zone, np);
 		if (status == ISC_R_SUCCESS)
 			break;
+
+		np = strchr(np, '.');
+		if (np == NULL)
+			break;
+		np++;
 	}
 
 	if (status != ISC_R_SUCCESS)
@@ -483,7 +490,11 @@
 	 */
 
 	/* Put the type in the first two bytes. */
-	id -> buffer -> data [0] = "0123456789abcdef" [type >> 4];
+	id->buffer->data[0] = "0123456789abcdef"[(type >> 4) & 0xf];
+	/* This should have been [type & 0xf] but now that
+	 * it is in use we need to leave it this way in order
+	 * to avoid disturbing customer's lease files
+	 */
 	id -> buffer -> data [1] = "0123456789abcdef" [type % 15];
 
 	/* Mash together an MD5 hash of the identifier. */
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/Makefile.in dhcp-4.1.2/common/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/common/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -117,6 +117,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/options.c dhcp-4.1.2/common/options.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/options.c	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/common/options.c	2010-04-20 16:32:48.000000000 -0700
@@ -3,7 +3,7 @@
    DHCP options parsing and reassembly. */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -637,6 +637,8 @@
 	/*
 	 * Preload the option priority list with protocol-mandatory options.
 	 * This effectively gives these options the highest priority.
+	 * This provides the order for any available options, the option
+	 * must be in the option cache in order to actually be included.
 	 */
 	priority_len = 0;
 	priority_list[priority_len++] = DHO_DHCP_MESSAGE_TYPE;
@@ -3776,13 +3778,13 @@
 	}
 	if ((packet[0] == DHCPV6_RELAY_FORW) || 
 	    (packet[0] == DHCPV6_RELAY_REPL)) {
-		if (len >= sizeof(struct dhcpv6_relay_packet)) {
+		if (len >= offsetof(struct dhcpv6_relay_packet, options)) {
 			return 1;
 		} else {
 			return 0;
 		}
 	} else {
-		if (len >= sizeof(struct dhcpv6_packet)) {
+		if (len >= offsetof(struct dhcpv6_packet, options)) {
 			return 1;
 		} else {
 			return 0;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/parse.c dhcp-4.1.2/common/parse.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/parse.c	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/common/parse.c	2010-09-16 19:48:42.000000000 -0700
@@ -3,7 +3,7 @@
    Common parser code for dhcpd and dhclient. */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -889,9 +889,10 @@
 
 /*
  * date :== NUMBER NUMBER SLASH NUMBER SLASH NUMBER 
- *		NUMBER COLON NUMBER COLON NUMBER SEMI |
+ *		NUMBER COLON NUMBER COLON NUMBER |
  *          NUMBER NUMBER SLASH NUMBER SLASH NUMBER 
- *		NUMBER COLON NUMBER COLON NUMBER NUMBER SEMI |
+ *		NUMBER COLON NUMBER COLON NUMBER NUMBER |
+ *          EPOCH NUMBER |
  *	    NEVER
  *
  * Dates are stored in UTC or with a timezone offset; first number is day
@@ -900,7 +901,10 @@
  * optional.
  */
 
-/* just parse the date */
+/*
+ * just parse the date
+ * any trailing semi must be consumed by the caller of this routine
+ */
 TIME 
 parse_date_core(cfile)
 	struct parse *cfile;
@@ -909,157 +913,171 @@
 	int tzoff, wday, year, mon, mday, hour, min, sec;
 	const char *val;
 	enum dhcp_token token;
-	static int months [11] = { 31, 59, 90, 120, 151, 181,
-					  212, 243, 273, 304, 334 };
+	static int months[11] = { 31, 59, 90, 120, 151, 181,
+				  212, 243, 273, 304, 334 };
 
-	/* Day of week, or "never"... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	/* "never", "epoch" or day of week */
+	token = peek_token(&val, NULL, cfile);
 	if (token == NEVER) {
-		if (!parse_semi (cfile))
-			return 0;
-		return MAX_TIME;
+		token = next_token(&val, NULL, cfile); /* consume NEVER */
+		return(MAX_TIME);
 	}
 
 	/* This indicates 'local' time format. */
 	if (token == EPOCH) {
-		token = next_token(&val, NULL, cfile);
+		token = next_token(&val, NULL, cfile); /* consume EPOCH */
+		token = peek_token(&val, NULL, cfile);
 
 		if (token != NUMBER) {
-			parse_warn(cfile, "Seconds since epoch expected.");
 			if (token != SEMI)
-				skip_to_semi(cfile);
-			return (TIME)0;
+				token = next_token(&val, NULL, cfile);
+			parse_warn(cfile, "Seconds since epoch expected.");
+			return((TIME)0);
 		}
 
+		token = next_token(&val, NULL, cfile); /* consume number */
 		guess = atoi(val);
 
-		if (!parse_semi(cfile))
-			return (TIME)0;
-
-		return guess;
+		return((TIME)guess);
 	}
 
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric day of week expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric day of week expected.");
+		return((TIME)0);
 	}
-	wday = atoi (val);
+	token = next_token(&val, NULL, cfile); /* consume day of week */
+	wday = atoi(val);
 
 	/* Year... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric year expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric year expected.");
+		return((TIME)0);
 	}
+	token = next_token(&val, NULL, cfile); /* consume year */
 
 	/* Note: the following is not a Y2K bug - it's a Y1.9K bug.   Until
 	   somebody invents a time machine, I think we can safely disregard
 	   it.   This actually works around a stupid Y2K bug that was present
 	   in a very early beta release of dhcpd. */
-	year = atoi (val);
+	year = atoi(val);
 	if (year > 1900)
 		year -= 1900;
 
 	/* Slash separating year from month... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != SLASH) {
-		parse_warn (cfile,
-			    "expected slash separating year from month.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile,
+			   "expected slash separating year from month.");
+		return((TIME)0);
 	}
+	token = next_token(&val, NULL, cfile); /* consume SLASH */
 
 	/* Month... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric month expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric month expected.");
+		return((TIME)0);
 	}
-	mon = atoi (val) - 1;
+	token = next_token(&val, NULL, cfile); /* consume month */	
+	mon = atoi(val) - 1;
 
 	/* Slash separating month from day... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != SLASH) {
-		parse_warn (cfile,
-			    "expected slash separating month from day.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile,
+			   "expected slash separating month from day.");
+		return((TIME)0);
 	}
+	token = next_token(&val, NULL, cfile); /* consume SLASH */
 
 	/* Day of month... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric day of month expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric day of month expected.");
+		return((TIME)0);
 	}
-	mday = atoi (val);
+	token = next_token(&val, NULL, cfile); /* consume day of month */
+	mday = atoi(val);
 
 	/* Hour... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric hour expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric hour expected.");
+		return((TIME)0);
 	}
-	hour = atoi (val);
+	token = next_token(&val, NULL, cfile); /* consume hour */
+	hour = atoi(val);
 
 	/* Colon separating hour from minute... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != COLON) {
-		parse_warn (cfile,
-			    "expected colon separating hour from minute.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile,
+			   "expected colon separating hour from minute.");
+		return((TIME)0);
 	}
+	token = next_token(&val, NULL, cfile); /* consume colon */
 
 	/* Minute... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric minute expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric minute expected.");
+		return((TIME)0);
 	}
-	min = atoi (val);
+	token = next_token(&val, NULL, cfile); /* consume minute */
+	min = atoi(val);
 
 	/* Colon separating minute from second... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != COLON) {
-		parse_warn (cfile,
-			    "expected colon separating minute from second.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile,
+			   "expected colon separating minute from second.");
+		return((TIME)0);
 	}
+	token = next_token(&val, NULL, cfile); /* consume colon */
 
 	/* Second... */
-	token = next_token (&val, (unsigned *)0, cfile);
+	token = peek_token(&val, NULL, cfile);
 	if (token != NUMBER) {
-		parse_warn (cfile, "numeric second expected.");
 		if (token != SEMI)
-			skip_to_semi (cfile);
-		return (TIME)0;
+			token = next_token(&val, NULL, cfile);
+		parse_warn(cfile, "numeric second expected.");
+		return((TIME)0);
 	}
-	sec = atoi (val);
+	token = next_token(&val, NULL, cfile); /* consume second */
+	sec = atoi(val);
 
-	token = peek_token (&val, (unsigned *)0, cfile);
+	tzoff = 0;
+	token = peek_token(&val, NULL, cfile);
 	if (token == NUMBER) {
-		token = next_token (&val, (unsigned *)0, cfile);
-		tzoff = atoi (val);
-	} else
-		tzoff = 0;
+		token = next_token(&val, NULL, cfile); /* consume tzoff */
+		tzoff = atoi(val);
+	} else if (token != SEMI) {
+		token = next_token(&val, NULL, cfile);
+		parse_warn(cfile,
+			   "Time zone offset or semicolon expected.");
+		return((TIME)0);
+	}
 
 	/* Guess the time value... */
 	guess = ((((((365 * (year - 70) +	/* Days in years since '70 */
@@ -1082,21 +1100,25 @@
 	   is reread), the error could accumulate into something
 	   significant. */
 
-	return guess;
+	return((TIME)guess);
 }
 
-/* Wrapper to consume the semicolon after the date */
+/*
+ * Wrapper to consume the semicolon after the date
+ * :== date semi
+ */
+
 TIME 
 parse_date(cfile)
        struct parse *cfile;
 {
-       int guess;
+       TIME guess;
        guess = parse_date_core(cfile);
 
        /* Make sure the date ends in a semicolon... */
        if (!parse_semi(cfile))
-               return 0;
-       return guess;
+	       return((TIME)0);
+       return(guess);
 }
 
 
@@ -4925,7 +4947,7 @@
 			fmt = option->format;
 
 		/* 'a' means always uniform */
-		if ((fmt[0] != 'Z') && (tolower((int)fmt[1]) == 'a')) 
+		if ((fmt[0] != 'Z') && (tolower((unsigned char)fmt[1]) == 'a')) 
 			uniform = 1;
 
 		do {
@@ -5058,6 +5080,7 @@
 	unsigned len;
 	struct iaddr addr;
 	int compress;
+	isc_boolean_t freeval = ISC_FALSE;
 	const char *f, *g;
 	struct enumeration_value *e;
 
@@ -5141,6 +5164,7 @@
 			return 0;
 		}
 		len = strlen (val);
+		freeval = ISC_TRUE;
 		goto make_string;
 
 	      case 't': /* Text string... */
@@ -5157,6 +5181,10 @@
 		if (!make_const_data (&t, (const unsigned char *)val,
 				      len, 1, 1, MDL))
 			log_fatal ("No memory for concatenation");
+		if (freeval == ISC_TRUE) {
+			dfree((char *)val, MDL);
+			freeval = ISC_FALSE;
+		}
 		break;
 		
 	      case 'N':
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/print.c dhcp-4.1.2/common/print.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/print.c	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/common/print.c	2010-09-16 16:16:46.000000000 -0700
@@ -3,7 +3,8 @@
    Turn data structures into printable text. */
 
 /*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -357,44 +358,118 @@
 	}
 }
 
+/*
+ * print a string as hex.  This only outputs
+ * colon separated hex list no matter what
+ * the input looks like.  See print_hex
+ * for a function that prints either cshl
+ * or a string if all bytes are printible
+ * It only uses limit characters from buf
+ * and doesn't do anything if buf == NULL
+ *
+ * len - length of data
+ * data - input data
+ * limit - length of buf to use
+ * buf - output buffer
+ */
+void print_hex_only (len, data, limit, buf)
+	unsigned len;
+	const u_int8_t *data;
+	unsigned limit;
+	char *buf;
+{
+	unsigned i;
+
+	if ((buf == NULL) || (limit < 3))
+		return;
+
+	for (i = 0; (i < limit / 3) && (i < len); i++) {
+		sprintf(&buf[i*3], "%02x:", data[i]);
+	}
+	buf[(i * 3) - 1] = 0;
+	return;
+}
+
+/*
+ * print a string as either text if all the characters
+ * are printable or colon separated hex if they aren't
+ *
+ * len - length of data
+ * data - input data
+ * limit - length of buf to use
+ * buf - output buffer
+ */
+void print_hex_or_string (len, data, limit, buf)
+	unsigned len;
+	const u_int8_t *data;
+	unsigned limit;
+	char *buf;
+{
+	unsigned i;
+	if ((buf == NULL) || (limit < 3))
+		return;
+
+	for (i = 0; (i < (limit - 3)) && (i < len); i++) {
+		if (!isascii(data[i]) || !isprint(data[i])) {
+			print_hex_only(len, data, limit, buf);
+			return;
+		}
+	}
+
+	buf[0] = '"';
+	i = len;
+	if (i > (limit - 3))
+		i = limit - 3;
+	memcpy(&buf[1], data, i);
+	buf[i + 1] = '"';
+	buf[i + 2] = 0;
+	return;
+}
+
+/*
+ * print a string as either hex or text
+ * using static buffers to hold the output
+ * 
+ * len - length of data
+ * data - input data
+ * limit - length of buf
+ * buf_num - the output buffer to use
+ */
 #define HBLEN 60
+char *print_hex(len, data, limit, buf_num)
+	unsigned len;
+	const u_int8_t *data;
+	unsigned limit;
+	unsigned buf_num;
+{
+	static char hex_buf_1[HBLEN + 1];
+	static char hex_buf_2[HBLEN + 1];
+	static char hex_buf_3[HBLEN + 1];
+	char *hex_buf;
+
+	switch(buf_num) {
+	  case 0:
+		hex_buf = hex_buf_1;
+		if (limit >= sizeof(hex_buf_1))
+			limit = sizeof(hex_buf_1);
+		break;
+	  case 1:
+		hex_buf = hex_buf_2;
+		if (limit >= sizeof(hex_buf_2))
+			limit = sizeof(hex_buf_2);
+		break;
+	  case 2:
+		hex_buf = hex_buf_3;
+		if (limit >= sizeof(hex_buf_3))
+			limit = sizeof(hex_buf_3);
+		break;
+	  default:
+		return(NULL);
+	}
 
-#define DECLARE_HEX_PRINTER(x)						      \
-char *print_hex##x (len, data, limit)					      \
-	unsigned len;							      \
-	const u_int8_t *data;						      \
-	unsigned limit;							      \
-{									      \
-									      \
-	static char hex_buf##x [HBLEN + 1];				      \
-	unsigned i;							      \
-									      \
-	if (limit > HBLEN)						      \
-		limit = HBLEN;						      \
-									      \
-	for (i = 0; i < (limit - 2) && i < len; i++) {			      \
-		if (!isascii (data [i]) || !isprint (data [i])) {	      \
-			for (i = 0; i < limit / 3 && i < len; i++) {	      \
-				sprintf (&hex_buf##x [i * 3],		      \
-					 "%02x:", data [i]);		      \
-			}						      \
-			hex_buf##x [i * 3 - 1] = 0;			      \
-			return hex_buf##x;				      \
-		}							      \
-	}								      \
-	hex_buf##x [0] = '"';						      \
-	i = len;							      \
-	if (i > limit - 2)						      \
-		i = limit - 2;						      \
-	memcpy (&hex_buf##x [1], data, i);				      \
-	hex_buf##x [i + 1] = '"';					      \
-	hex_buf##x [i + 2] = 0;						      \
-	return hex_buf##x;						      \
-}
-
-DECLARE_HEX_PRINTER (_1)
-DECLARE_HEX_PRINTER (_2)
-DECLARE_HEX_PRINTER (_3)
+	print_hex_or_string(len, data, limit, hex_buf);
+	return(hex_buf);
+}
 
 #define DQLEN	80
 
@@ -1457,6 +1532,8 @@
 {
 	static char buf[sizeof("epoch 9223372036854775807; "
 			       "# Wed Jun 30 21:49:08 2147483647")];
+	static char buf1[sizeof("# Wed Jun 30 21:49:08 2147483647")];
+	time_t since_epoch;
 	/* The string: 	       "6 2147483647/12/31 23:59:60;"
 	 * is smaller than the other, used to declare the buffer size, so
 	 * we can use one buffer for both.
@@ -1478,10 +1555,14 @@
 #endif
 
 	if (db_time_format == LOCAL_TIME_FORMAT) {
-		if (strftime(buf, sizeof(buf),
-			     "epoch %s; # %a %b %d %H:%M:%S %Y",
-			     localtime(&t)) == 0)
+		since_epoch = mktime(localtime(&t));
+		if ((strftime(buf1, sizeof(buf1),
+			      "# %a %b %d %H:%M:%S %Y",
+			      localtime(&t)) == 0) ||
+		    (snprintf(buf, sizeof(buf), "epoch %lu; %s",
+			      (unsigned long)since_epoch, buf1) >= sizeof(buf)))
 			return NULL;
+
 	} else {
 		/* No bounds check for the year is necessary - in this case,
 		 * strftime() will run out of space and assert an error.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/socket.c dhcp-4.1.2/common/socket.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/socket.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/common/socket.c	2010-10-05 17:32:52.000000000 -0700
@@ -3,7 +3,7 @@
    BSD socket interface code... */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -45,6 +45,7 @@
 #include <sys/ioctl.h>
 #include <sys/uio.h>
 #include <sys/uio.h>
+#include <signal.h>
 
 #ifdef USE_SOCKET_FALLBACK
 # if !defined (USE_SOCKET_SEND)
@@ -559,6 +560,21 @@
 #endif /* DHCPv6 */
 
 #ifdef DHCPv6
+/*
+ * For both send_packet6() and receive_packet6() we need to allocate
+ * space for the cmsg header information.  We do this once and reuse
+ * the buffer.
+ */
+static void   *control_buf = NULL;
+static size_t  control_buf_len = 0;
+
+static void
+allocate_cmsg_cbuf(void) {
+	control_buf_len = CMSG_SPACE(sizeof(struct in6_pktinfo));
+	control_buf = dmalloc(control_buf_len, MDL);
+	return;
+}
+
 /* 
  * For both send_packet6() and receive_packet6() we need to use the 
  * sendmsg()/recvmsg() functions rather than the simpler send()/recv()
@@ -586,10 +602,20 @@
 	int result;
 	struct in6_pktinfo *pktinfo;
 	struct cmsghdr *cmsg;
-	union {
-		struct cmsghdr cmsg_sizer;
-		u_int8_t pktinfo_sizer[CMSG_SPACE(sizeof(struct in6_pktinfo))];
-	} control_buf;
+
+	/*
+	 * If necessary allocate space for the control message header.
+	 * The space is common between send and receive.
+	 */
+
+	if (control_buf == NULL) {
+		allocate_cmsg_cbuf();
+		if (control_buf == NULL) {
+			log_error("send_packet6: unable to allocate cmsg header");
+			return(ENOMEM);
+		}
+	}
+	memset(control_buf, 0, control_buf_len);
 
 	/*
 	 * Initialize our message header structure.
@@ -620,8 +646,8 @@
 	 * source address if we wanted, but we can safely let the
 	 * kernel decide what that should be. 
 	 */
-	m.msg_control = &control_buf;
-	m.msg_controllen = sizeof(control_buf);
+	m.msg_control = control_buf;
+	m.msg_controllen = control_buf_len;
 	cmsg = CMSG_FIRSTHDR(&m);
 	cmsg->cmsg_level = IPPROTO_IPV6;
 	cmsg->cmsg_type = IPV6_PKTINFO;
@@ -687,10 +713,20 @@
 	struct cmsghdr *cmsg;
 	struct in6_pktinfo *pktinfo;
 	int found_pktinfo;
-	union {
-	        struct cmsghdr cmsg_sizer;
-	        u_int8_t pktinfo_sizer[CMSG_SPACE(sizeof(struct in6_pktinfo))];
-	} control_buf;
+
+	/*
+	 * If necessary allocate space for the control message header.
+	 * The space is common between send and receive.
+	 */
+	if (control_buf == NULL) {
+		allocate_cmsg_cbuf();
+		if (control_buf == NULL) {
+			log_error("receive_packet6: unable to allocate cmsg "
+				  "header");
+			return(ENOMEM);
+		}
+	}
+	memset(control_buf, 0, control_buf_len);
 
 	/*
 	 * Initialize our message header structure.
@@ -721,8 +757,8 @@
 	 * information (when we initialized the interface), so we
 	 * should get the destination address from that.
 	 */
-	m.msg_control = &control_buf;
-	m.msg_controllen = sizeof(control_buf);
+	m.msg_control = control_buf;
+	m.msg_controllen = control_buf_len;
 
 	result = recvmsg(interface->rfdesc, &m, 0);
 
@@ -841,3 +877,26 @@
 #endif
 }
 #endif /* USE_SOCKET_SEND */
+
+/*
+ * Code to set a handler for signals.  This
+ * exists to allow us to ignore SIGPIPE signals
+ * but could be used for other purposes in the
+ * future.
+ */
+
+isc_result_t
+dhcp_handle_signal(int sig, void (*handler)(int)) {
+	struct sigaction sa;
+
+	memset(&sa, 0, sizeof(sa));
+	sa.sa_handler = handler;
+
+	if (sigfillset(&sa.sa_mask) != 0 ||
+	    sigaction(sig, &sa, NULL) < 0) {
+		log_error("Unable to set up signal handler for %d, %m", sig);
+		return (ISC_R_UNEXPECTED);
+	}
+
+	return (ISC_R_SUCCESS);
+}
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/tests/Makefile.in dhcp-4.1.2/common/tests/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/common/tests/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/common/tests/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -94,6 +94,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/configure dhcp-4.1.2/configure
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/configure	2010-10-05 21:41:51.000000000 -0700
+++ dhcp-4.1.2/configure	2010-10-22 14:45:36.000000000 -0700
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for DHCP 4.1.1-P1.
+# Generated by GNU Autoconf 2.61 for DHCP 4.1.2.
 #
 # Report bugs to <dhcp-users@isc.org>.
 #
@@ -574,8 +574,8 @@
 # Identity of this package.
 PACKAGE_NAME='DHCP'
 PACKAGE_TARNAME='dhcp'
-PACKAGE_VERSION='4.1.1-P1'
-PACKAGE_STRING='DHCP 4.1.1-P1'
+PACKAGE_VERSION='4.1.2'
+PACKAGE_STRING='DHCP 4.1.2'
 PACKAGE_BUGREPORT='dhcp-users@isc.org'
 
 # Factoring default headers for most tests.
@@ -1209,7 +1209,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures DHCP 4.1.1-P1 to adapt to many kinds of systems.
+\`configure' configures DHCP 4.1.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1275,7 +1275,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of DHCP 4.1.1-P1:";;
+     short | recursive ) echo "Configuration of DHCP 4.1.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1402,7 +1402,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-DHCP configure 4.1.1-P1
+DHCP configure 4.1.2
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1416,7 +1416,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by DHCP $as_me 4.1.1-P1, which was
+It was created by DHCP $as_me 4.1.2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2109,7 +2109,7 @@
 
 # Define the identity of the package.
  PACKAGE='dhcp'
- VERSION='4.1.1-P1'
+ VERSION='4.1.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5400,6 +5400,120 @@
   esac
 
 
+  { echo "$as_me:$LINENO: checking for int64_t" >&5
+echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
+if test "${ac_cv_c_int64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_int64_t=no
+     for ac_type in 'int64_t' 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
+	         < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $ac_type in
+  int64_t) ac_cv_c_int64_t=yes ;;
+  *) ac_cv_c_int64_t=$ac_type ;;
+esac
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_int64_t" != no && break
+     done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
+echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
+  case $ac_cv_c_int64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+  esac
+
+
 # Some systems need the u_intX_t types defined across.
 { echo "$as_me:$LINENO: checking for u_int8_t" >&5
 echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; }
@@ -5820,6 +5934,147 @@
 
 fi
 
+{ echo "$as_me:$LINENO: checking for u_int64_t" >&5
+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_u_int64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef u_int64_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_u_int64_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_u_int64_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; }
+if test $ac_cv_type_u_int64_t = yes; then
+  :
+else
+
+
+  { echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
+if test "${ac_cv_c_uint64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_uint64_t=no
+     for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  case $ac_type in
+  uint64_t) ac_cv_c_uint64_t=yes ;;
+  *) ac_cv_c_uint64_t=$ac_type ;;
+esac
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test "$ac_cv_c_uint64_t" != no && break
+     done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
+  case $ac_cv_c_uint64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<\_ACEOF
+#define _UINT64_T 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+  esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define u_int64_t uint64_t
+_ACEOF
+
+
+fi
+
 
 # see if ifaddrs.h is available
 
@@ -8186,6 +8441,77 @@
 # AC_TRY_COMPILE & etc).
 CFLAGS="$CFLAGS $STD_CWARNINGS"
 
+
+  { echo "$as_me:$LINENO: checking for flexible array members" >&5
+echo $ECHO_N "checking for flexible array members... $ECHO_C" >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+	    #include <stdio.h>
+	    #include <stddef.h>
+	    struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+	    struct s *p = malloc (offsetof (struct s, d)
+				  + m * sizeof (double));
+	    p->d[0] = 0.0;
+	    return p->d != (double *) NULL;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_flexmember=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_c_flexmember=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_flexmember" >&5
+echo "${ECHO_T}$ac_cv_c_flexmember" >&6; }
+  if test $ac_cv_c_flexmember = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FLEXIBLE_ARRAY_MEMBER
+_ACEOF
+
+  else
+    cat >>confdefs.h <<\_ACEOF
+#define FLEXIBLE_ARRAY_MEMBER 1
+_ACEOF
+
+  fi
+
+
 ac_config_files="$ac_config_files Makefile client/Makefile common/Makefile common/tests/Makefile dhcpctl/Makefile dst/Makefile includes/Makefile minires/Makefile omapip/Makefile relay/Makefile server/Makefile tests/Makefile"
 
 cat >confcache <<\_ACEOF
@@ -8598,7 +8924,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by DHCP $as_me 4.1.1-P1, which was
+This file was extended by DHCP $as_me 4.1.2, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8651,7 +8977,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-DHCP config.status 4.1.1-P1
+DHCP config.status 4.1.2
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/configure.ac dhcp-4.1.2/configure.ac
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/configure.ac	2010-10-05 21:41:54.000000000 -0700
+++ dhcp-4.1.2/configure.ac	2010-10-22 14:21:05.000000000 -0700
@@ -1,4 +1,4 @@
-AC_INIT([DHCP], [4.1.1-P1], [dhcp-users@isc.org])
+AC_INIT([DHCP], [4.1.2], [dhcp-users@isc.org])
 
 # we specify "foreign" to avoid having to have the GNU mandated files,
 # like AUTHORS, COPYING, and such
@@ -322,6 +322,7 @@
 AC_TYPE_INT8_T
 AC_TYPE_INT16_T
 AC_TYPE_INT32_T
+AC_TYPE_INT64_T
 
 # Some systems need the u_intX_t types defined across.
 AC_CHECK_TYPE([u_int8_t], [], [
@@ -339,6 +340,11 @@
   AC_DEFINE(u_int32_t, [uint32_t], [Define a type for 32-bit unsigned
 				    integers.])
 ])
+AC_CHECK_TYPE([u_int64_t], [], [
+  AC_TYPE_UINT64_T
+  AC_DEFINE(u_int64_t, [uint64_t], [Define a type for 64-bit unsigned
+				    integers.])
+])
 
 # see if ifaddrs.h is available
 AC_CHECK_HEADERS(ifaddrs.h)
@@ -487,6 +493,8 @@
 # AC_TRY_COMPILE & etc).
 CFLAGS="$CFLAGS $STD_CWARNINGS"
 
+AC_C_FLEXIBLE_ARRAY_MEMBER
+
 AC_OUTPUT([
   Makefile
   client/Makefile
Only in /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp: debian
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dhcpctl/Makefile.in dhcp-4.1.2/dhcpctl/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dhcpctl/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/dhcpctl/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -123,6 +123,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dhcpctl/omshell.c dhcp-4.1.2/dhcpctl/omshell.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dhcpctl/omshell.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/dhcpctl/omshell.c	2010-09-13 15:20:43.000000000 -0700
@@ -3,7 +3,8 @@
    Examine and modify omapi objects. */
 
 /*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2001-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -32,6 +33,8 @@
  * ``http://www.nominum.com''.
  */
 
+#include "config.h"
+
 #include <time.h>
 #include <sys/time.h>
 #include <stdio.h>
@@ -96,6 +99,7 @@
 	char buf[1024];
 	char s1[1024];
 	int connected = 0;
+	char hex_buf[61];
 
 	for (i = 1; i < argc; i++) {
 		usage(argv[0]);
@@ -157,10 +161,10 @@
 			    break;
 				
 			  case omapi_datatype_data:
-			    printf ("%s\n",
-				    print_hex_1 (v -> value -> u.buffer.len,
-						 v -> value -> u.buffer.value,
-						 60));
+			    print_hex_only(v->value->u.buffer.len,
+					   v->value->u.buffer.value,
+					   sizeof(hex_buf), hex_buf);
+			    printf("%s\n", hex_buf);
 			    break;
 			    
 			  case omapi_datatype_object:
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/doc/ja_JP.eucJP/dhcp-options.5 dhcp-4.1.2/doc/ja_JP.eucJP/dhcp-options.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/doc/ja_JP.eucJP/dhcp-options.5	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/doc/ja_JP.eucJP/dhcp-options.5	2010-07-13 13:57:18.000000000 -0700
@@ -1,4 +1,4 @@
-.\"	$Id: dhcp-options.5,v 1.2.786.2 2009/07/24 22:04:52 sar Exp $
+.\"	$Id: dhcp-options.5,v 1.2.786.3 2010/07/13 20:57:18 dhankins Exp $
 .\"
 .\" Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
@@ -36,7 +36,7 @@
 .\" WORD: Router Solicitation   �롼����
 .\" WORD: Mask Discovery	�ޥ���õ��\"
-.TH dhcpd-options 5
+.TH dhcp-options 5
 .SH ̾�� dhcp-options - ưŪ�ۥ��ȹ���ץ��������ץ���
 .SH ��diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dst/Makefile.in dhcp-4.1.2/dst/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/dst/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/dst/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -105,6 +105,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
Only in /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp: .git
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/config.h.in dhcp-4.1.2/includes/config.h.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/config.h.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/includes/config.h.in	2010-10-22 14:45:36.000000000 -0700
@@ -22,6 +22,15 @@
 /* Define to include Failover Protocol support. */
 #undef FAILOVER_PROTOCOL
 
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+   not. That way, with a declaration like `struct s { int n; double
+   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+   compilers. When computing the size of such an object, don't use 'sizeof
+   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+   MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
 /* Define to 1 to use the Berkeley Packet Filter interface code. */
 #undef HAVE_BPF
 
@@ -181,6 +190,11 @@
    #define below would cause a syntax error. */
 #undef _UINT32_T
 
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT64_T
+
 /* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
    <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
    #define below would cause a syntax error. */
@@ -205,6 +219,10 @@
    such a type exists and the standard includes do not define it. */
 #undef int32_t
 
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int64_t
+
 /* Define to the type of a signed integer type of width exactly 8 bits if such
    a type exists and the standard includes do not define it. */
 #undef int8_t
@@ -215,6 +233,9 @@
 /* Define a type for 32-bit unsigned integers. */
 #undef u_int32_t
 
+/* Define a type for 64-bit unsigned integers. */
+#undef u_int64_t
+
 /* Define a type for 8-bit unsigned integers. */
 #undef u_int8_t
 
@@ -226,6 +247,10 @@
    such a type exists and the standard includes do not define it. */
 #undef uint32_t
 
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
 /* Define to the type of an unsigned integer type of width exactly 8 bits if
    such a type exists and the standard includes do not define it. */
 #undef uint8_t
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/dhcp6.h dhcp-4.1.2/includes/dhcp6.h
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/dhcp6.h	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/includes/dhcp6.h	2010-09-16 16:16:46.000000000 -0700
@@ -3,7 +3,7 @@
    DHCPv6 Protocol structures... */
 
 /*
- * Copyright (c) 2006-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2006-2010 by Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -177,7 +177,7 @@
 struct dhcpv6_packet {
 	unsigned char msg_type;
 	unsigned char transaction_id[3];
-	unsigned char options[0];
+	unsigned char options[FLEXIBLE_ARRAY_MEMBER];
 };
 
 /* Offset into DHCPV6 Reply packets where Options spaces commence. */
@@ -191,7 +191,7 @@
 	unsigned char hop_count;
 	unsigned char link_address[16];
 	unsigned char peer_address[16];
-	unsigned char options[0];
+	unsigned char options[FLEXIBLE_ARRAY_MEMBER];
 };
 
 /* Leasequery query-types (RFC 5007) */
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/dhcpd.h dhcp-4.1.2/includes/dhcpd.h
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/dhcpd.h	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/includes/dhcpd.h	2010-10-05 17:32:52.000000000 -0700
@@ -3,7 +3,7 @@
    Definitions for dhcpd... */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -47,6 +47,7 @@
 #define fd_set cygwin_fd_set
 #include <sys/types.h>
 #endif
+#include <stddef.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -2121,9 +2122,11 @@
 			 struct binding_scope **, struct universe *, void *);
 void dump_packet PROTO ((struct packet *));
 void hash_dump PROTO ((struct hash_table *));
-char *print_hex_1 PROTO ((unsigned, const u_int8_t *, unsigned));
-char *print_hex_2 PROTO ((unsigned, const u_int8_t *, unsigned));
-char *print_hex_3 PROTO ((unsigned, const u_int8_t *, unsigned));
+char *print_hex PROTO ((unsigned, const u_int8_t *, unsigned, unsigned));
+void print_hex_only PROTO ((unsigned, const u_int8_t *, unsigned, char *));
+#define print_hex_1(len, data, limit) print_hex(len, data, limit, 0)
+#define print_hex_2(len, data, limit) print_hex(len, data, limit, 1)
+#define print_hex_3(len, data, limit) print_hex(len, data, limit, 2)
 char *print_dotted_quads PROTO ((unsigned, const u_int8_t *));
 char *print_dec_1 PROTO ((unsigned long));
 char *print_dec_2 PROTO ((unsigned long));
@@ -2198,6 +2201,7 @@
 			unsigned int *if_index);
 void if_deregister6(struct interface_info *info);
 
+isc_result_t dhcp_handle_signal(int sig, void (*handler)(int));
 
 /* bpf.c */
 #if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE)
@@ -3236,9 +3240,9 @@
 
 
 /* mdb6.c */
-HASH_FUNCTIONS_DECL(ia, unsigned char *, struct ia_xx, ia_hash_t);
+HASH_FUNCTIONS_DECL(ia, unsigned char *, struct ia_xx, ia_hash_t)
 HASH_FUNCTIONS_DECL(iasubopt, struct in6_addr *, struct iasubopt,
-		    iasubopt_hash_t);
+		    iasubopt_hash_t)
 
 isc_result_t iasubopt_allocate(struct iasubopt **iasubopt,
 			       const char *file, int line);
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/Makefile.in dhcp-4.1.2/includes/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/includes/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -91,6 +91,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/minires/minires.h dhcp-4.1.2/includes/minires/minires.h
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/minires/minires.h	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/includes/minires/minires.h	2010-07-27 14:23:34.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004,2007-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004,2007-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2001-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -209,7 +209,7 @@
 			    ns_tcp_tsig_state *, int);
 int b64_ntop (unsigned char const *, size_t, char *, size_t);
 
-ns_rcode find_cached_zone (const char *, ns_class, char *,
+isc_result_t find_cached_zone (const char *, ns_class, char *,
 			   size_t, struct in_addr *, int, int *, void *);
 int find_tsig_key (ns_tsig_key **, const char *, void *);
 int forget_zone (void *);
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/omapip/omapip_p.h dhcp-4.1.2/includes/omapip/omapip_p.h
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/omapip/omapip_p.h	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/includes/omapip/omapip_p.h	2010-09-07 16:20:52.000000000 -0700
@@ -3,7 +3,8 @@
    Private master include file for the OMAPI library. */
 
 /*
- * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") 
+ * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -274,6 +275,8 @@
 OMAPI_ARRAY_TYPE_DECL(omapi_listener, omapi_listener_object_t);
 OMAPI_ARRAY_TYPE_DECL(omapi_connection, omapi_connection_object_t);
 
+isc_result_t omapi_handle_clear(omapi_handle_t);
+
 extern int log_priority;
 extern int log_perror;
 extern void (*log_cleanup) (void);
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/osdep.h dhcp-4.1.2/includes/osdep.h
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/includes/osdep.h	2009-07-23 12:02:09.000000000 -0700
+++ dhcp-4.1.2/includes/osdep.h	2010-09-09 15:29:57.000000000 -0700
@@ -3,7 +3,7 @@
    Operating system dependencies... */
 
 /*
- * Copyright (c) 2004-2005,2007-2009 by Internet Systems Consortium,
+ * Copyright (c) 2004-2005,2007-2010 by Internet Systems Consortium,
  *                                      Inc. ("ISC")
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
@@ -41,14 +41,6 @@
 #include "config.h"
 
 #include <inttypes.h>
-/* XXX: now that we have a nice autoconf, we should sense this in
- * ./configure.
- */
-#if defined(__sun__) || defined(__hpux__)
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-#endif
 
 #ifndef LITTLE_ENDIAN
 #define LITTLE_ENDIAN 1234
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/Makefile.in dhcp-4.1.2/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -114,6 +114,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/Makefile.in dhcp-4.1.2/minires/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/minires/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -100,6 +100,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/ns_parse.c dhcp-4.1.2/minires/ns_parse.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/ns_parse.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/minires/ns_parse.c	2010-07-27 14:23:34.000000000 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004
  * Copyright (c) 1996-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -22,7 +23,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.3.786.2 2009/07/24 22:04:52 sar Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.3.786.3 2010/07/27 21:23:34 sar Exp $";
 #endif
 
 /* Import. */
@@ -126,7 +127,7 @@
 					  handle->_counts[i], &b);
 
 			if (status != ISC_R_SUCCESS)
-				return STATUS;
+				return status;
 			handle->_sections[i] = msg;
 			msg += b;
 		}
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/res_findzonecut.c dhcp-4.1.2/minires/res_findzonecut.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/minires/res_findzonecut.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/minires/res_findzonecut.c	2010-07-27 14:23:34.000000000 -0700
@@ -1,9 +1,10 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.16.786.2 2009/07/24 22:04:52 sar Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.16.786.3 2010/07/27 21:23:34 sar Exp $";
 #endif /* not lint */
 
 /*
- * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -67,7 +68,7 @@
 static int	satisfy(res_state,
 			const char *, rrset_ns *, struct in_addr *, int);
 static int	add_addrs(res_state, rr_ns *, struct in_addr *, int);
-static ns_rcode	get_soa(res_state, const char *, ns_class,
+static isc_result_t get_soa(res_state, const char *, ns_class,
 			char *, size_t, char *, size_t,
 			rrset_ns *);
 static isc_result_t get_ns(res_state, const char *, ns_class, rrset_ns *);
@@ -240,7 +241,7 @@
 	return (n);
 }
 
-static ns_rcode
+static isc_result_t
 get_soa(res_state statp, const char *dname, ns_class class,
 	char *zname, size_t zsize, char *mname, size_t msize,
 	rrset_ns *nsrrsp)
@@ -250,17 +251,16 @@
 	int n, i, ancount, nscount;
 	ns_sect sect;
 	ns_msg msg;
-	u_int rcode;
-	isc_result_t status;
+	isc_result_t rcode;
 
 	/*
 	 * Find closest enclosing SOA, even if it's for the root zone.
 	 */
 
 	/* First canonicalize dname (exactly one unescaped trailing "."). */
-	status = ns_makecanon(dname, tname, sizeof tname);
-	if (status != ISC_R_SUCCESS)
-		return status;
+	rcode = ns_makecanon(dname, tname, sizeof tname);
+	if (rcode != ISC_R_SUCCESS)
+		return rcode;
 	dname = tname;
 
 	/* Now grovel the subdomains, hunting for an SOA answer or auth. */
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/alloc.c dhcp-4.1.2/omapip/alloc.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/alloc.c	2009-07-23 12:02:10.000000000 -0700
+++ dhcp-4.1.2/omapip/alloc.c	2010-09-07 16:20:52.000000000 -0700
@@ -4,7 +4,8 @@
    protocol... */
 
 /*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -257,6 +258,7 @@
 	struct dmalloc_preamble *dp;
 #if defined(DEBUG_MALLOC_POOL)
 	unsigned char *foo;
+	int i;
 #endif
 
 	if (!dmalloc_cutoff_point)
@@ -682,6 +684,13 @@
 /*			if (!hp -> type -> freer) */
 				rc_register (file, line, h, hp,
 					     0, 1, hp -> type -> rc_flag);
+			if (handle_reference) {
+				if (omapi_handle_clear(hp->handle) != 
+				    ISC_R_SUCCESS) {
+					log_debug("Attempt to clear null "
+						  "handle pointer");
+				}
+			}
 			if (hp -> type -> destroy)
 				(*(hp -> type -> destroy)) (hp, file, line);
 			if (hp -> type -> freer)
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/connection.c dhcp-4.1.2/omapip/connection.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/connection.c	2009-10-13 16:21:42.000000000 -0700
+++ dhcp-4.1.2/omapip/connection.c	2010-10-05 17:32:52.000000000 -0700
@@ -3,7 +3,8 @@
    Subroutines for dealing with connections. */
 
 /*
- * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -209,6 +210,19 @@
 			return ISC_R_UNEXPECTED;
 		}
 
+#ifdef SO_NOSIGPIPE
+		/*
+		 * If available stop the OS from killing our
+		 * program on a SIGPIPE failure
+		 */
+		flag = 1;
+		if (setsockopt(obj->socket, SOL_SOCKET, SO_NOSIGPIPE,
+			       (char *)&flag, sizeof(flag)) < 0) {
+			omapi_connection_dereference (&obj, MDL);
+			return ISC_R_UNEXPECTED;
+		}			
+#endif
+
 		status = (omapi_register_io_object
 			  ((omapi_object_t *)obj,
 			   0, omapi_connection_writefd,
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/handle.c dhcp-4.1.2/omapip/handle.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/handle.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/omapip/handle.c	2010-09-07 16:20:52.000000000 -0700
@@ -3,7 +3,8 @@
    Functions for maintaining handles on objects. */
 
 /*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -63,9 +64,13 @@
 omapi_handle_table_t *omapi_handle_table;
 omapi_handle_t omapi_next_handle = 1;	/* Next handle to be assigned. */
 
+#define FIND_HAND  0
+#define CLEAR_HAND 1
+
 static isc_result_t omapi_handle_lookup_in (omapi_object_t **,
 					    omapi_handle_t,
-					    omapi_handle_table_t *);
+					    omapi_handle_table_t *,
+					    int);
 static isc_result_t omapi_object_handle_in_table (omapi_handle_t,
 						  omapi_handle_table_t *,
 						  omapi_object_t *);
@@ -239,42 +244,47 @@
 
 isc_result_t omapi_handle_lookup (omapi_object_t **o, omapi_handle_t h)
 {
-	return omapi_handle_lookup_in (o, h, omapi_handle_table);
+	return(omapi_handle_lookup_in(o, h, omapi_handle_table, FIND_HAND));
 }
 
 static isc_result_t omapi_handle_lookup_in (omapi_object_t **o,
 					    omapi_handle_t h,
-					    omapi_handle_table_t *table)
-
+					    omapi_handle_table_t *table,
+					    int op)
 {
 	omapi_handle_table_t *inner;
 	omapi_handle_t scale, index;
 
-	if (!table || table -> first > h || table -> limit <= h)
-		return ISC_R_NOTFOUND;
+	if (!table || table->first > h || table->limit <= h)
+		return(ISC_R_NOTFOUND);
 	
 	/* If this is a leaf table, just grab the object. */
-	if (table -> leafp) {
+	if (table->leafp) {
 		/* Not there? */
-		if (!table -> children [h - table -> first].object)
-			return ISC_R_NOTFOUND;
-		return omapi_object_reference
-			(o, table -> children [h - table -> first].object,
-			 MDL);
+		if (!table->children[h - table->first].object)
+			return(ISC_R_NOTFOUND);
+		if (op == CLEAR_HAND) {
+			table->children[h - table->first].object = NULL;
+			return(ISC_R_SUCCESS);
+		} else {
+			return(omapi_object_reference
+			       (o, table->children[h - table->first].object,
+				MDL));
+		}
 	}
 
 	/* Scale is the number of handles represented by each child of this
 	   table.   For a leaf table, scale would be 1.   For a first level
 	   of indirection, 120.   For a second, 120 * 120.   Et cetera. */
-	scale = (table -> limit - table -> first) / OMAPI_HANDLE_TABLE_SIZE;
+	scale = (table->limit - table->first) / OMAPI_HANDLE_TABLE_SIZE;
 
 	/* So the next most direct table from this one that contains the
 	   handle must be the subtable of this table whose index into this
 	   table's array of children is the handle divided by the scale. */
-	index = (h - table -> first) / scale;
-	inner = table -> children [index].table;
+	index = (h - table->first) / scale;
+	inner = table->children[index].table;
 
-	return omapi_handle_lookup_in (o, h, table -> children [index].table);
+	return(omapi_handle_lookup_in(o, h, table->children[index].table, op));
 }
 
 /* For looking up objects based on handles that have been sent on the wire. */
@@ -283,13 +293,18 @@
 {
 	omapi_handle_t h;
 
-	if (handle -> type == omapi_datatype_int)
-		h = handle -> u.integer;
-	else if (handle -> type == omapi_datatype_data &&
-		 handle -> u.buffer.len == sizeof h) {
-		memcpy (&h, handle -> u.buffer.value, sizeof h);
-		h = ntohl (h);
+	if (handle->type == omapi_datatype_int)
+		h = handle->u.integer;
+	else if (handle->type == omapi_datatype_data &&
+		 handle->u.buffer.len == sizeof h) {
+		memcpy(&h, handle->u.buffer.value, sizeof h);
+		h = ntohl(h);
 	} else
-		return ISC_R_INVALIDARG;
-	return omapi_handle_lookup (obj, h);
+		return(ISC_R_INVALIDARG);
+	return(omapi_handle_lookup(obj, h));
+}
+
+isc_result_t omapi_handle_clear(omapi_handle_t h)
+{
+	return(omapi_handle_lookup_in(NULL, h, omapi_handle_table, CLEAR_HAND));
 }
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/hash.c dhcp-4.1.2/omapip/hash.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/hash.c	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/omapip/hash.c	2010-05-14 17:01:10.000000000 -0700
@@ -303,23 +303,27 @@
 	if (len == 0)
 		return 0;
 
-	/* The switch indexes our starting position into the do/while loop,
-	 * taking up the remainder after hashing in all the other bytes in
-	 * threes.
+	/*
+	 * The switch handles our starting conditions, then we hash the
+	 * remaining bytes in groups of 3
 	 */
+	   
 	switch (len % 3) {
-		do {
-	      case 0:
-			accum ^= *s++ << 16;
-	      case 2:
-			accum ^= *s++ << 8;
-	      case 1:
-			accum ^= *s++;
-		} while (s < end);
-
+	case 0:
+		break;
+	case 2:
+		accum ^= *s++ << 8;
+	case 1:
+		accum ^= *s++;
 		break;
 	}
 
+	while (s < end) {
+		accum ^= *s++ << 16;
+		accum ^= *s++ << 8;
+		accum ^= *s++;
+	}
+
 	return accum % size;
 }
 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/Makefile.in dhcp-4.1.2/omapip/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/omapip/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -119,6 +119,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/omapi.3 dhcp-4.1.2/omapip/omapi.3
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/omapi.3	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/omapip/omapi.3	2010-07-02 16:37:07.000000000 -0700
@@ -1,6 +1,7 @@
 .\"	omapi.3
 .\"
-.\" Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 2000-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,10 +24,10 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
+.\"
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
 .TH omapi 3
 .SH NAME
 OMAPI - Object Management Application Programming Interface
@@ -37,7 +38,7 @@
 used by the ISC DHCP server and this outline addresses the parts of
 OMAPI appropriate to the clients of DHCP server. It does this by also
 describing the use of a thin API layered on top of OMAPI called
-'dhcpctl'
+\'dhcpctl\'
 .PP
 OMAPI uses TCP/IP as the transport for server communication, and
 security can be imposed by having the client and server
@@ -220,7 +221,7 @@
 .fi
 .PP
 The keyname, algorithm and must all match what is specified in the server's
-dhcpd.conf file, excepting that the secret should appear in 'raw' form, not
+dhcpd.conf file, excepting that the secret should appear in \'raw\' form, not
 in base64 as it would in dhcpd.conf:
 .PP
 .nf
@@ -242,7 +243,5 @@
 dhcpctl(3), omshell(1), dhcpd(8), dhclient(8), dhcpd.conf(5), dhclient.conf(5).
 .SH AUTHOR
 .B omapi
-was created by Ted Lemon of Nominum, Inc.  Information about Nominum
-and support contracts for DHCP and BIND can be found at
-.B http://www.nominum.com.   This documentation was written by James
-Brister of Nominum, Inc. 
+was created by Ted Lemon of Nominum, Inc. This documentation was
+written by James Brister of Nominum, Inc. 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/test.c dhcp-4.1.2/omapip/test.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/omapip/test.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/omapip/test.c	2010-09-16 16:16:46.000000000 -0700
@@ -3,7 +3,8 @@
    Test code for omapip... */
 
 /*
- * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") 
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -32,6 +33,8 @@
  * ``http://www.nominum.com''.
  */
 
+#include "config.h"
+
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/README dhcp-4.1.2/README
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/README	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/README	2010-10-22 14:23:41.000000000 -0700
@@ -1,6 +1,6 @@
 	      Internet Systems Consortium DHCP Distribution
-		             Version 4.1.1-P1
-			      17 May 2010
+		             Version 4.1.2
+			    25 October 2010
 
 			      README FILE
 
@@ -94,10 +94,8 @@
 
 			    RELEASE STATUS
 
-This is ISC DHCP 4.1.1-P1, a patch release which fixes a bug that could
-cause the DHCPv6 server to advertise/assign a previously allocated
-(active) lease to a client that has changed subnets, despite being on
-different shared networks.
+This is ISC DHCP 4.1.2, a maintenance release which fixes bugs
+present in ISC DHCP 4.1.1 or prior.
 
 In this release, the DHCPv6 server should be fully functional on Linux,
 Solaris, or any BSD.  The DHCPv6 client should be similarly functional
@@ -133,12 +131,12 @@
 To build the DHCP Distribution, unpack the compressed tar file using
 the tar utility and the gzip command - type something like:
 
-	gunzip dhcp-4.1.1-P1.tar.gz
-	tar xvf dhcp-4.1.1-P1.tar
+	gunzip dhcp-4.1.2.tar.gz
+	tar xvf dhcp-4.1.2.tar
 
 			    CONFIGURING IT
 
-Now, cd to the dhcp-4.1.1-P1 subdirectory that you've just created and
+Now, cd to the dhcp-4.1.2 subdirectory that you've just created and
 configure the source tree by typing:
 
 	./configure
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/dhcrelay.8 dhcp-4.1.2/relay/dhcrelay.8
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/dhcrelay.8	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/relay/dhcrelay.8	2010-07-02 16:37:07.000000000 -0700
@@ -1,6 +1,7 @@
 .\"	dhcrelay.8
 .\"
-.\" Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1997-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -22,12 +23,12 @@
 .\"   https://www.isc.org/
 .\"
 .\" This software has been written for Internet Systems Consortium
-.\" by Ted Lemon in cooperation with Vixie
-.\" Enterprises.  To learn more about Internet Systems Consortium,
-.\" see ``https://www.isc.org/''.  To learn more about Vixie
-.\" Enterprises, see ``http://www.vix.com''.
+.\" by Ted Lemon in cooperation with Vixie Enterprises.
 .\"
-.\" $Id: dhcrelay.8,v 1.15.38.2 2009/07/24 22:04:52 sar Exp $
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.\" $Id: dhcrelay.8,v 1.15.38.3 2010/07/02 23:37:07 sar Exp $
 .\"
 .TH dhcrelay 8
 .SH NAME
@@ -230,3 +231,7 @@
 to a low value.
 .PP
 The loopback interface is not (yet) recognized as a valid interface.
+.SH AUTHOR
+.B dhcrelay(8)
+To learn more about Internet Systems Consortium, see
+.B https://www.isc.org
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/dhcrelay.c dhcp-4.1.2/relay/dhcrelay.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/dhcrelay.c	2010-01-07 13:53:53.000000000 -0800
+++ dhcp-4.1.2/relay/dhcrelay.c	2010-10-05 17:32:52.000000000 -0700
@@ -35,6 +35,7 @@
 #include "dhcpd.h"
 #include <syslog.h>
 #include <sys/time.h>
+#include <signal.h>
 
 TIME default_lease_time = 43200; /* 12 hours... */
 TIME max_lease_time = 86400; /* 24 hours... */
@@ -193,6 +194,14 @@
 	setlogmask(LOG_UPTO(LOG_INFO));
 #endif	
 
+	/*
+	 * Set up the signal handlers, currently we only
+	 * have one to ignore sigpipe.
+	 */
+	if (dhcp_handle_signal(SIGPIPE, SIG_IGN) != ISC_R_SUCCESS) {
+		log_fatal("Can't set up signal handler");
+	}
+
 	/* Set up the OMAPI. */
 	status = omapi_init();
 	if (status != ISC_R_SUCCESS)
@@ -1349,7 +1358,7 @@
 
 	/* Build the relay-forward header. */
 	relay = (struct dhcpv6_relay_packet *) forw_data;
-	cursor = sizeof(*relay);
+	cursor = offsetof(struct dhcpv6_relay_packet, options);
 	relay->msg_type = DHCPV6_RELAY_FORW;
 	if (packet->dhcpv6_msg_type == DHCPV6_RELAY_FORW) {
 		if (packet->dhcpv6_hop_count >= max_hop_count) {
@@ -1477,7 +1486,7 @@
 	if (!evaluate_option_cache(&relay_msg, packet, NULL, NULL,
 				   packet->options, NULL,
 				   &global_scope, oc, MDL) ||
-	    (relay_msg.len < sizeof(struct dhcpv6_packet))) {
+	    (relay_msg.len < offsetof(struct dhcpv6_packet, options))) {
 		log_error("Can't evaluate relay-msg.");
 		return;
 	}
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/Makefile.in dhcp-4.1.2/relay/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/relay/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/relay/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -99,6 +99,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/RELNOTES dhcp-4.1.2/RELNOTES
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/RELNOTES	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/RELNOTES	2010-11-02 11:58:21.000000000 -0700
@@ -1,6 +1,6 @@
 	      Internet Systems Consortium DHCP Distribution
-			     Version 4.1.1-P1
-			       17 May 2010
+			      Version 4.1.2
+			     25 October 2010
 
 			      Release Notes
 
@@ -47,17 +47,145 @@
 work on other platforms. Please report any problems and suggested fixes to
 <dhcp-users@isc.org>.
 
+			Changes since 4.1.2rc1
+
+! Handle a relay forward message with an unspecified address in the
+  link address field.  Previously such a message would cause the
+  server to crash.  Thanks to a report from John Gibbons.  [ISC-Bugs #21992]
+  CERT: VU#102047 CVE: CVE-2010-3611
+
+			Changes since 4.1.2b1
+
+- Update the code to parse dhcpv6 lease files to accept a semi-colon at
+  the end of the max-life and preferred-life clauses.  In order to be
+  backwards compatible with older lease files not finding a semi-colon
+  is also accepted.  [ISC-Bugs #22303].
+
                         Changes since 4.1.1
 
+- Cleaned up some compiler warnings
+
+- Prohibit including lease time information in a response to a DHCP INFORM
+  Bug ticket 21092.
+
+! Accept a client id of length 0 while hashing.  Previously the server would
+  exit if it attempted to hash a zero length client id, providing attackers
+  with a simple denial of service attack.  Bug ticket 21253.
+  CERT: VU#541921 - CVE: CVE-2010-2156
+
 - A bug was fixed that could cause the DHCPv6 server to advertise/assign a
   previously allocated (active) lease to a client that has changed subnets,
   despite being on different shared networks.  Dynamic prefixes specifically
   allocated in shared networks also now are not offered if the client has
   moved.  [ISC-Bugs #21152]
 
-! Accept a client id of length 0 while hashing.  Previously the server would
-  exit if it attempted to hash a zero length client id, providing attackers
-  with a simple denial of service attack.  [ISC-Bugs #21253]
+- Add declaration for variable in debug code in alloc.c.  [ISC-Bugs #21472]
+
+- Documentation cleanup covering multiple tickets
+  [ISC-Bugs #20265] [ISC-Bugs #20259] [ISC-Bugs #19536] minor cleanup
+  [ISC-Bugs #20263] add text describing some default values
+  [ISC-Bugs #20193] single quotes at the start of a line indicate a control
+  line to nroff, escape them if we actually want a quote.
+  [ISC-Bugs #18916] sync the pointer to web pages amongst the different docs
+  [ISC-Bugs #20107] clarify description of ia-pd and ia-prefix.
+  [ISC-Bugs #20245] clarify editing the failover state in a lease file to put
+  a server into the PARTNER-DOWN state.
+ 
+- 'get-host-names true;' now also works even if 'use-host-decl-names true;'
+  was also configured.  The nature of this repair also fixes another
+  error; the host-name supplied by a client is no longer overridden by a
+  reverse lookup of the lease address.  Thanks to a patch from Wilco Baan
+  Hofman supplied to us by the Debian package maintenance team.
+  [ISC-Bugs #21691] {Debian Bug#509445}
+
+- The .TH tag for the dhcp-options manpage was typo repaired
+  thanks to a report from jidanni and the Debian package maintenance
+  team.  [ISC-Bugs #21676] {Debian Bug#563613}
+ 
+- More documentation changes - primarily to put the options in the dhclient
+  and dhcpd man pages into the standard form.  Thanks in part to a patch
+  from David Cantrell at Red Hat.
+  [ISC-Bugs #20264] and parts of [ISC-Bugs #17744] dhclient.8 changes
+
+- Minor compilation errors - type mismatches, extra semi-colons after macros
+  [ISC-Bugs #20884] [ISC-Bugs #20953] [ISC-Bugs #20955]
+
+- Add code to clear the pointer to an object in an OMAPI handle when the
+  object is freed due to a dereference.  [ISC-Bugs #21306]
+
+- Fixed a bug that leaks host record references onto lease structures,
+  causing the server to apply configuration intended for one host to any
+  other innocent clients that come along later.  [ISC-Bugs #22018]
+
+- Minor code fixes
+  [ISC-Bugs #19566] When trying to find the zone for a name for ddns allow
+  the name to be at the apex of the zone.
+  [ISC-Bugs #19617] Restrict length of interface name read from command line
+  in dhcpd - based on a patch from David Cantrell at Red Hat.
+  [ISC-Bugs #20039] Correct some error messages in dhcpd.c
+  [ISC-Bugs #20070] Better range check on values when creating a DHCID.
+  [ISC-Bugs #20198] Avoid writing past the end of the field when adding 
+  overly long file or server names to a packet and add a log message
+  if the configuration supplied overly long names for these fields.
+  Thanks to Martin Pala.
+  [ISC-Bugs #21497] Add a little more randomness to rng seed in client
+  thanks to a patch from Jeremiah Jinno.
+
+- Correct error handling in DLPI [ISC-Bugs #20378]
+
+- Remove __sun__ and __hpux__ typedefs in osdep.h as they are now being
+  checked in configure.  [ISC-Bugs #20443]
+
+- Modify how the cmsg header is allocated the v6 send and received routines
+  to compile on more compilers.  [ISC-Bugs #20524]
+
+- When parsing a domain name free the memory for the name after we are
+  done with it.  [ISC-Bugs #20824]
+
+- Add an elapsed time option to the release message and refactor the
+  code to move most of the common code to a single routine.
+  [ISC-Bugs #21171].
+
+- Parse date strings more properly - the code now handles semi-colons in
+  date strings correctly.  Thanks to a patch from Jiri Popelka at Red Hat.
+  [ISC-Bugs #21501, #20598]
+
+- Fixes to lease input and output.
+  [ISC-Bugs #20418] - Some systems don't support the "%s" argument to
+  strftime, paste together the same string using mktime instead.
+  [ISC-Bugs #19596] - When parsing iaid values accept printable
+  characters.
+  [ISC-Bugs #21585] - Always print time values in omshell as hex
+  instead of ascii if the values happen to be printable characters.
+
+- Minor changes for scripts, configure.ac and Makefiles
+  [ISC-Bugs #19147] Use domain-search instead of domain-name in manual and
+                    example conf file.  Thanks to a patch from David Cantrell
+                    at Red Hat.
+  [ISC-Bugs #19761] Restore address when doing a rebind in DHCPv6
+  [ISC-Bugs #19945] Properly close the quote on some arguments.
+  [ISC-Bugs #20952] Add 64 bit types to configure.ac
+  [ISC-Bugs #21308] Add "PATH=" to CLIENT_PATH envrionment variable
+
+! Handle pipe failures more gracefully.  Some OSes pass a SIGPIPE
+  signal to a process and will kill the process if the signal isn't
+  caught.  This patch adds code to turn off the SIGPIPE signal via
+  a setsockopt() call and to ignore the SIGPIPE signal in case the
+  OS doesn't support the necessary setsockopt() option.  This problem
+  was found during internal testing when the two servers in a failover
+  pair were repeatedly unable to communicate for longer than the
+  max-response-delay value.  Eventually one of the pair attempted a
+  write() call at just the same time as the other server killed the
+  connection and caused an uncaught SIGPIPE signal which caused the
+  OS to kill the server.
+  This is a minor security issue.  It is a security issue as it can 
+  cause a server to stop.  It is minor as the attacker would need to
+  be able to interrupt traffic between the partners in a failover 
+  pair for max-response-delay seconds at will - in which case the 
+  defender has bigger problems than the DHCP server being killed.
+  Using the NIST CVSS security vulnerability rating system this
+  issue scored 1.2, meaning it is not a major risk for users.
+  [ISC-Bugs #22269]
 
                         Changes since 4.1.1rc1
 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/confpars.c dhcp-4.1.2/server/confpars.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/confpars.c	2009-07-23 12:02:10.000000000 -0700
+++ dhcp-4.1.2/server/confpars.c	2010-10-13 15:39:42.000000000 -0700
@@ -3,7 +3,7 @@
    Parser for dhcpd config file... */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -4290,6 +4290,21 @@
 					continue;
 				}
 				prefer = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Lease valid lifetime. */
@@ -4303,6 +4318,21 @@
 					continue;
 				}
 				valid = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Lease expiration time. */
@@ -4623,6 +4653,21 @@
 					continue;
 				}
 				prefer = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Lease valid lifetime. */
@@ -4636,6 +4681,21 @@
 					continue;
 				}
 				valid = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Lease expiration time. */
@@ -4957,6 +5017,21 @@
 					continue;
 				}
 				prefer = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Lease valid lifetime. */
@@ -4970,6 +5045,21 @@
 					continue;
 				}
 				valid = atoi (val);
+
+				/*
+				 * Currently we peek for the semi-colon to 
+				 * allow processing of older lease files that
+				 * don't have the semi-colon.  Eventually we
+				 * should remove the peeking code.
+				 */
+				token = peek_token(&val, NULL, cfile);
+				if (token == SEMI) {
+					token = next_token(&val, NULL, cfile);
+				} else {
+					parse_warn(cfile,
+						   "corrupt lease file; "
+						   "expecting semicolon.");
+				}
 				break;
 
 				/* Prefix expiration time. */
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/db.c dhcp-4.1.2/server/db.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/db.c	2009-07-24 15:04:52.000000000 -0700
+++ dhcp-4.1.2/server/db.c	2010-09-13 15:20:43.000000000 -0700
@@ -3,7 +3,7 @@
    Persistent database management routines for DHCPD... */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -580,11 +580,11 @@
 			    binding_state) < 0) {
 			goto error_exit;
 		}
-		if (fprintf(db_file, "    preferred-life %u\n",
+		if (fprintf(db_file, "    preferred-life %u;\n",
 			    (unsigned)iasubopt->prefer) < 0) {
 			goto error_exit;
 		}
-		if (fprintf(db_file, "    max-life %u\n",
+		if (fprintf(db_file, "    max-life %u;\n",
 			    (unsigned)iasubopt->valid) < 0) {
 			goto error_exit;
 		}
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcp.c dhcp-4.1.2/server/dhcp.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcp.c	2009-07-24 10:22:27.000000000 -0700
+++ dhcp-4.1.2/server/dhcp.c	2010-09-16 16:16:46.000000000 -0700
@@ -3,7 +3,7 @@
    DHCP Protocol engine. */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1995-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1066,10 +1066,14 @@
 				   packet -> options, (struct option_state *)0,
 				   &global_scope, oc, MDL)) {
 		i = d1.len;
-		if (i > sizeof raw.file)
-			i = sizeof raw.file;
-		else
-			raw.file [i] = 0;
+		if (i >= sizeof(raw.file)) {
+			log_info("file name longer than packet field "
+				 "truncated - field: %lu name: %d %.*s", 
+				 (unsigned long)sizeof(raw.file), i, i,
+				 d1.data);
+			i = sizeof(raw.file);
+		} else
+			raw.file[i] = 0;
 		memcpy (raw.file, d1.data, i);
 		data_string_forget (&d1, MDL);
 	}
@@ -1082,10 +1086,14 @@
 				   packet -> options, (struct option_state *)0,
 				   &global_scope, oc, MDL)) {
 		i = d1.len;
-		if (i > sizeof raw.sname)
-			i = sizeof raw.sname;
-		else
-			raw.sname [i] = 0;
+		if (i >= sizeof(raw.sname)) {
+			log_info("server name longer than packet field "
+				 "truncated - field: %lu name: %d %.*s", 
+				 (unsigned long)sizeof(raw.sname), i, i,
+				 d1.data);
+			i = sizeof(raw.sname);
+		} else
+			raw.sname[i] = 0;
 		memcpy (raw.sname, d1.data, i);
 		data_string_forget (&d1, MDL);
 	}
@@ -1204,6 +1212,13 @@
 		}
 	}
 
+	/*
+	 * Remove any time options, per section 3.4 RFC 2131
+	 */
+	delete_option(&dhcp_universe, options, DHO_DHCP_LEASE_TIME);
+	delete_option(&dhcp_universe, options, DHO_DHCP_RENEWAL_TIME);
+	delete_option(&dhcp_universe, options, DHO_DHCP_REBINDING_TIME);
+
 	/* Set up the option buffer... */
 	outgoing.packet_length =
 		cons_options (packet, outgoing.raw, (struct lease *)0,
@@ -2681,12 +2696,13 @@
 
 	/* If we don't have a hostname yet, and we've been asked to do
 	   a reverse lookup to find the hostname, do it. */
+	i = DHO_HOST_NAME;
 	j = SV_GET_LEASE_HOSTNAMES;
-	if (!lookup_option (&server_universe, state -> options, i) &&
-	    (evaluate_boolean_option_cache
-	     (&ignorep, packet, lease, (struct client_state *)0,
-	      packet -> options, state -> options, &lease -> scope,
-	      lookup_option (&server_universe, state -> options, j), MDL))) {
+	if (!lookup_option(&dhcp_universe, state->options, i) &&
+	    evaluate_boolean_option_cache
+	     (&ignorep, packet, lease, NULL,
+	      packet->options, state->options, &lease->scope,
+	      lookup_option (&server_universe, state->options, j), MDL)) {
 		struct in_addr ia;
 		struct hostent *h;
 		
@@ -3000,6 +3016,12 @@
 		if (sizeof raw.file > state -> filename.len)
 			memset (&raw.file [state -> filename.len], 0,
 				(sizeof raw.file) - state -> filename.len);
+		else 
+			log_info("file name longer than packet field "
+				 "truncated - field: %lu name: %d %.*s", 
+				 (unsigned long)sizeof(raw.file),
+				 state->filename.len, state->filename.len,
+				 state->filename.data);
 	} else
 		bufs |= 1;
 
@@ -3013,6 +3035,13 @@
 		if (sizeof raw.sname > state -> server_name.len)
 			memset (&raw.sname [state -> server_name.len], 0,
 				(sizeof raw.sname) - state -> server_name.len);
+		else 
+			log_info("server name longer than packet field "
+				 "truncated - field: %lu name: %d %.*s", 
+				 (unsigned long)sizeof(raw.sname),
+				 state->server_name.len,
+				 state->server_name.len,
+				 state->server_name.data);
 	} else
 		bufs |= 2; /* XXX */
 
@@ -3429,7 +3458,6 @@
 				  piaddr (hw_lease -> ip_addr));
 #endif
 			goto n_hw;
-			continue;
 		}
 		if (hw_lease -> subnet -> shared_network != share) {
 #if defined (DEBUG_FIND_LEASE)
@@ -3437,7 +3465,6 @@
 				  piaddr (hw_lease -> ip_addr));
 #endif
 			goto n_hw;
-			continue;
 		}
 		if ((hw_lease -> pool -> prohibit_list &&
 		      permitted (packet, hw_lease -> pool -> prohibit_list)) ||
@@ -3788,26 +3815,46 @@
 		lease_dereference (&hw_lease, MDL);
 	}
 
-	/* If we found a host_decl but no matching address, try to
-	   find a host_decl that has no address, and if there is one,
-	   hang it off the lease so that we can use the supplied
-	   options. */
-	if (lease && host && !lease -> host) {
-		struct host_decl *p = (struct host_decl *)0;
-		struct host_decl *n = (struct host_decl *)0;
-		host_reference (&p, host, MDL);
-		while (p) {
-			if (!p -> fixed_addr) {
-				host_reference (&lease -> host, p, MDL);
-				host_dereference (&p, MDL);
+	/*
+	 * If we found a host_decl but no matching address, try to
+	 * find a host_decl that has no address, and if there is one,
+	 * hang it off the lease so that we can use the supplied
+	 * options.
+	 */
+	if (lease && host && !lease->host) {
+		struct host_decl *p = NULL;
+		struct host_decl *n = NULL;
+
+		host_reference(&p, host, MDL);
+		while (p != NULL) {
+			if (!p->fixed_addr) {
+				/*
+				 * If the lease is currently active, then it
+				 * must be allocated to the present client.
+				 * We store a reference to the host record on
+				 * the lease to save a lookup later (in
+				 * ack_lease()).  We mustn't refer to the host
+				 * record on non-active leases because the
+				 * client may be denied later.
+				 *
+				 * XXX: Not having this reference (such as in
+				 * DHCPDISCOVER/INIT) means ack_lease will have
+				 * to perform this lookup a second time.  This
+				 * hopefully isn't a problem as DHCPREQUEST is
+				 * more common than DHCPDISCOVER.
+				 */
+				if (lease->binding_state == FTS_ACTIVE)
+					host_reference(&lease->host, p, MDL);
+
+				host_dereference(&p, MDL);
 				break;
 			}
-			if (p -> n_ipaddr)
-				host_reference (&n, p -> n_ipaddr, MDL);
-			host_dereference (&p, MDL);
-			if (n) {
-				host_reference (&p, n, MDL);
-				host_dereference (&n, MDL);
+			if (p->n_ipaddr != NULL)
+				host_reference(&n, p->n_ipaddr, MDL);
+			host_dereference(&p, MDL);
+			if (n != NULL) {
+				host_reference(&p, n, MDL);
+				host_dereference(&n, MDL);
 			}
 		}
 	}
@@ -4031,10 +4078,23 @@
 			lease = candl;
 	}
 
-	if (lease) {
-		if (lease -> binding_state == FTS_ABANDONED)
-			log_error ("Reclaiming abandoned lease %s.",
-				   piaddr (lease -> ip_addr));
+	if (lease != NULL) {
+		if (lease->binding_state == FTS_ABANDONED)
+			log_error("Reclaiming abandoned lease %s.",
+				  piaddr(lease->ip_addr));
+
+		/*
+		 * XXX: For reliability, we go ahead and remove the host
+		 * record and try to move on.  For correctness, if there
+		 * are any other stale host vectors, we want to find them.
+		 */
+		if (lease->host != NULL) {
+			log_debug("soft impossible condition (%s:%d): stale "
+				  "host \"%s\" found on lease %s", MDL,
+				  lease->host->name,
+				  piaddr(lease->ip_addr));
+			host_dereference(&lease->host, MDL);
+		}
 
 		lease_reference (lp, lease, MDL);
 		return 1;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.8 dhcp-4.1.2/server/dhcpd.8
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.8	2009-07-24 15:04:53.000000000 -0700
+++ dhcp-4.1.2/server/dhcpd.8	2010-07-14 13:57:49.000000000 -0700
@@ -1,6 +1,7 @@
 .\"	dhcpd.8
 .\"
-.\" Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,12 +24,11 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
 .\"
-.\" $Id: dhcpd.8,v 1.29.32.2 2009/07/24 22:04:53 sar Exp $
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.\" $Id: dhcpd.8,v 1.29.32.4 2010/07/14 20:57:49 sar Exp $
 .\"
 .TH dhcpd 8
 .SH NAME
@@ -98,16 +98,6 @@
 and be assigned IP addresses, and also to discover information about
 the network to which they are attached.  BOOTP provides similar
 functionality, with certain restrictions.
-.SH CONTRIBUTIONS
-.PP
-This software is free software.  At various times its development has
-been underwritten by various organizations, including the ISC and
-Vixie Enterprises.  The development of 3.0 has been funded almost
-entirely by Nominum, Inc.
-.PP
-At this point development is being shepherded by Ted Lemon, and hosted
-by the ISC, but the future of this project depends on you.  If you
-have features you want, please consider implementing them.
 .SH OPERATION
 .PP
 The DHCP protocol allows a host which is unknown to the network
@@ -116,6 +106,13 @@
 network administrator allocates address pools in each subnet and
 enters them into the dhcpd.conf(5) file.
 .PP
+There are two versions of the DHCP protocol DHCPv4 and DHCPv6.  At
+startup the server  may be started for one or the other via the
+.B -4
+or 
+.B -6
+arguments.
+.PP
 On startup, dhcpd reads the
 .IR dhcpd.conf
 file and stores a list of available addresses on each subnet in
@@ -187,87 +184,106 @@
 interfaces which are up, eliminating non-broadcast interfaces if
 possible, and listen for DHCP broadcasts on each interface.
 .PP
-The server either operates as a DHCPv6 server or a DHCP server, but
-not both at the same time. To run as a DHCPv6 server, use the
-.B -6
-flag. To run as a DHCP server, use the
-.B -4
-flag. If neither is used, the default is to run as a DHCPv6 server.
-.PP
-If dhcpd should listen on a port other than the standard (port 67),
-the
-.B -p
-flag may used.  It should be followed by the udp port number on which
-dhcpd should listen.  This is mostly useful for debugging purposes.
-.PP
-If dhcpd should send replies to an address other than the broadcast
-address (255.255.255.255), the 
-.B -s
-flag may be used. It is followed by either the IP address or the host 
-name to send replies to. This option is only supported in IPv4.
-.PP
-To run dhcpd as a foreground process, rather than allowing it to run
-as a daemon in the background, the
-.B -f
-flag should be specified.  This is useful when running dhcpd under a
-debugger, or when running it out of inittab on System V systems.
-.PP
-To have dhcpd log to the standard error descriptor, specify the
-.B -d
-flag.  This can be useful for debugging, and also at sites where a
+.SH COMMAND LINE OPTIONS
+.TP
+.BI \-4
+Run as a DHCP server.  This cannot be combined with \fB\-6\fR.
+.TP
+.BI \-6
+Run as a DHCPv6 server.  This is the default and cannot be combined
+with \fB\-4\fR.
+.TP
+.BI \-p \ port
+The udp port number on which 
+.B dhcpd
+should listen.  If unspecified
+.B dhcpd
+uses the default port of 67.  This is mostly useful for debugging
+purposes.
+.TP
+.BI \-s \ address
+Specify an address or host name to which 
+.B dhcpd
+should send replies rather than the broadcast address (255.255.255.255).
+This option is only supported in IPv4.
+.TP
+.BI \-f
+Force
+.B dhcpd
+to run as a foreground process instead of as a daemon in the background.
+This is useful when running 
+.B dhcpd 
+under a debugger, or when running it
+out of inittab on System V systems.
+.TP
+.BI \-d
+Send log messages to the standard error descriptor.
+This can be useful for debugging, and also at sites where a
 complete log of all dhcp activity must be kept but syslogd is not
-reliable or otherwise cannot be used.   Normally, dhcpd will log all
-output using the syslog(3) function with the log facility set to
-LOG_DAEMON.  Note that -d implies -f (the daemon will not fork
-itself into the background).
-.PP
-Dhcpd can be made to use an alternate configuration file with the
-.B -cf
-flag, an alternate lease file with the
-.B -lf
-flag, or an alternate pid file with the
-.B -pf
-flag.   Because of the importance of using the same lease database at
-all times when running dhcpd in production, these options should be
-used \fBonly\fR for testing lease files or database files in a
-non-production environment.
-.PP
-When starting dhcpd up from a system startup script (e.g., /etc/rc),
-it may not be desirable to print out the entire copyright message on
-startup.   To avoid printing this message, the
-.B -q
-flag may be specified.
-.PP
-The DHCP server reads two files on startup: a configuration file, and
-a lease database.   If the
-.B -t
-flag is specified, the server will simply test the configuration file
+reliable or otherwise cannot be used.   Normally, 
+.B dhcpd
+will log all
+output using the \fBsyslog(3)\fR function with the log facility set to
+LOG_DAEMON.  Note that \fB\-d\fR implies \fB\-f\fR (the daemon will
+not fork itself into the background).
+.TP
+.BI \-q 
+Be quiet at startup.  This suppresses the printing of the entire
+copyright message during startup.  This might be desirable when
+starting
+.B dhcpd
+from a system startup script (e.g., /etc/rc).
+.TP
+.BI \-t
+Test the configuration file.  The server tests the configuration file
 for correct syntax, but will not attempt to perform any network
-operations.   This can be used to test the a new configuration file
+operations.   This can be used to test a new configuration file
 automatically before installing it.
-.PP
-The
-.B -T
-flag can be used to test the lease database file in a similar way.
-.PP
-The \fB-tf\fR and \fB-play\fR options allow you to specify a file into
-which the entire startup state of the server and all the transactions
-it processes are either logged or played back from.  This can be
+.TP
+.BI \-T
+Test the lease file.  The server tests the lease file
+for correct syntax, but will not attempt to perform any network
+operations.   This can be used to test a new leaes file
+automatically before installing it.
+.TP
+.BI \-tf \ tracefile
+Specify a file into which the entire startup state of the server and
+all the transactions it processes are logged.  This can be
 useful in submitting bug reports - if you are getting a core dump
 every so often, you can start the server with the \fB-tf\fR option and
 then, when the server dumps core, the trace file will contain all the
 transactions that led up to it dumping core, so that the problem can
 be easily debugged with \fB-play\fR.
-.PP
-The \fB-play\fR option must be specified with an alternate lease file,
+.TP
+.BI \-play \ playfile
+Specify a file from which the entire startup state of the server and
+all the transactions it processed are read.  The \fB-play\fR option
+must be specified with an alternate lease file,
 using the \fB-lf\fR switch, so that the DHCP server doesn't wipe out
 your existing lease file with its test data.  The DHCP server will
 refuse to operate in playback mode unless you specify an alternate
 lease file.
+.TP
+.BI --version
+Print version number and exit.
+.PP
+.I Modifying default file locations:
+The following options can be used to modify the locations 
+.B dhcpd
+uses for it's files.  Because of the importance of using the same
+lease database at all times when running dhcpd in production, these
+options should be used \fBonly\fR for testing lease files or database
+files in a non-production environment.
+.TP
+.BI \-cf \ config-file
+Path to alternate configuration file.
+.TP
+.BI \-lf \ lease-file
+Path to alternate lease file.
+.TP
+.BI \-pf \ pid-file
+Path to alternate pid file.
 .PP
-To find the version of dhcpd that will run, use the
-.B --version
-argument. Instead of running, the version will be printed.
 .SH CONFIGURATION
 The syntax of the dhcpd.conf(5) file is discussed separately.   This
 section should be used as an overview of the configuration process,
@@ -309,7 +325,7 @@
 .PP
 For example, in an office environment where systems are added from
 time to time and removed from time to time, but move relatively
-infrequently, it might make sense to allow lease times of a month of
+infrequently, it might make sense to allow lease times of a month or
 more.   In a final test environment on a manufacturing floor, it may
 make more sense to assign a maximum lease length of 30 minutes -
 enough time to go through a simple test procedure on a network
@@ -779,4 +795,3 @@
 Consortium.   Version 3 of the DHCP server was funded by Nominum, Inc.
 Information about Internet Systems Consortium is available at
 .B https://www.isc.org/\fR.
-Information about Nominum can be found at \fBhttp://www.nominum.com/\fR.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.c dhcp-4.1.2/server/dhcpd.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.c	2010-01-07 13:53:53.000000000 -0800
+++ dhcp-4.1.2/server/dhcpd.c	2010-10-05 17:32:52.000000000 -0700
@@ -280,6 +280,14 @@
 	/* Set up the client classification system. */
 	classification_setup ();
 
+	/*
+	 * Set up the signal handlers, currently we only
+	 * have one to ignore sigpipe.
+	 */
+	if (dhcp_handle_signal(SIGPIPE, SIG_IGN) != ISC_R_SUCCESS) {
+		log_fatal("Can't set up signal handler");
+	}
+
 	/* Initialize the omapi system. */
 	result = omapi_init ();
 	if (result != ISC_R_SUCCESS)
@@ -397,6 +405,10 @@
 		} else {
 			struct interface_info *tmp =
 				(struct interface_info *)0;
+			if (strlen(argv[i]) >= sizeof(tmp->name))
+				log_fatal("%s: interface name too long "
+					  "(is %ld)",
+					  argv[i], (long)strlen(argv[i]));
 			result = interface_allocate (&tmp, MDL);
 			if (result != ISC_R_SUCCESS)
 				log_fatal ("Insufficient memory to %s %s: %s",
@@ -998,7 +1010,7 @@
 		if (db.len == 4) {
 			memcpy (&limited_broadcast, db.data, 4);
 		} else
-			log_fatal ("invalid remote port data length");
+			log_fatal ("invalid broadcast address data length");
 		data_string_forget (&db, MDL);
 	}
 
@@ -1012,7 +1024,7 @@
 		if (db.len == 4) {
 			memcpy (&local_address, db.data, 4);
 		} else
-			log_fatal ("invalid remote port data length");
+			log_fatal ("invalid local address data length");
 		data_string_forget (&db, MDL);
 	}
 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.conf.5 dhcp-4.1.2/server/dhcpd.conf.5
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpd.conf.5	2009-07-23 12:02:10.000000000 -0700
+++ dhcp-4.1.2/server/dhcpd.conf.5	2010-07-02 16:37:07.000000000 -0700
@@ -1,6 +1,6 @@
 .\"	dhcpd.conf.5
 .\"
-.\" Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
 .\" Copyright (c) 1996-2003 by Internet Software Consortium
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -23,12 +23,11 @@
 .\"
 .\" This software has been written for Internet Systems Consortium
 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about Internet Systems Consortium, see
-.\" ``https://www.isc.org/''.  To learn more about Vixie Enterprises,
-.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
-.\" ``http://www.nominum.com''.
 .\"
-.\" $Id: dhcpd.conf.5,v 1.99.10.3 2009/07/23 19:02:10 sar Exp $
+.\" Support and other services are available for ISC products - see
+.\" https://www.isc.org for more information or to learn more about ISC.
+.\"
+.\" $Id: dhcpd.conf.5,v 1.99.10.4 2010/07/02 23:37:07 sar Exp $
 .\"
 .TH dhcpd.conf 5
 .SH NAME
@@ -414,7 +413,7 @@
 try a new IP address.
 .SH DHCP FAILOVER
 This version of the ISC DHCP server supports the DHCP failover
-protocol as documented in draft-ietf-dhc-failover-07.txt.   This is
+protocol as documented in draft-ietf-dhc-failover-12.txt.   This is
 not a final protocol document, and we have not done interoperability
 testing with other vendors' implementations of this protocol, so you
 must not assume that this implementation conforms to the standard.
@@ -437,10 +436,9 @@
 .PP
 You can put the server into the PARTNER-DOWN state either by using the
 .B omshell (1)
-command or by stopping the server, editing the last peer state
+command or by stopping the server, editing the last failover state
 declaration in the lease file, and restarting the server.   If you use
-this last method, be sure to leave the date and time of the start of
-the state blank:
+this last method, change the "my state" line to:
 .PP
 .nf
 .B failover peer "\fIname\fB" state {
@@ -449,6 +447,8 @@
 .B }
 .fi
 .PP
+It is only required to change "my state" as shown above.
+.PP
 When the other server comes back online, it should automatically
 detect that it has been offline and request a complete update from the
 server that was running in the PARTNER-DOWN state, and then both
@@ -758,22 +758,23 @@
 its ability to notice it had run dry.
 .PP
 In order to understand pool balance, some elements of its operation
-first need to be defined.  First, there are 'free' and 'backup' leases.
-Both of these are referred to as 'free state leases'.  'free' and 'backup'
-are 'the free states' for the purpose of this document.  The difference
-is that only the primary may allocate from 'free' leases unless under
-special circumstances, and only the secondary may allocate 'backup' leases.
+first need to be defined.  First, there are \'free\' and \'backup\' leases.
+Both of these are referred to as \'free state leases\'.  \'free\' and
+\'backup\'
+are \'the free states\' for the purpose of this document.  The difference
+is that only the primary may allocate from \'free\' leases unless under
+special circumstances, and only the secondary may allocate \'backup\' leases.
 .PP
 When pool balance is performed, the only plausible expectation is to
 provide a 50/50 split of the free state leases between the two servers.
 This is because no one can predict which server will fail, regardless
 of the relative load placed upon the two servers, so giving each server
-half the leases gives both servers the same amount of 'failure endurance'.
+half the leases gives both servers the same amount of \'failure endurance\'.
 Therefore, there is no way to configure any different behaviour, outside of
 some very small windows we will describe shortly.
 .PP
 The first thing calculated on any pool balance run is a value referred to
-as 'lts', or "Leases To Send".  This, simply, is the difference in the
+as \'lts\', or "Leases To Send".  This, simply, is the difference in the
 count of free and backup leases, divided by two.  For the secondary,
 it is the difference in the backup and free leases, divided by two.
 The resulting value is signed: if it is positive, the local server is
@@ -799,7 +800,7 @@
 the \fBmin-balance\fR and \fBmax-balance\fR configured values.  The
 scheduled pool check time is only moved in a downwards direction, it is
 never increased.  Lastly, if the lts is more than double this number in
-the negative direction, the local server will 'panic' and transmit a
+the negative direction, the local server will \'panic\' and transmit a
 Failover protocol POOLREQ message, in the hopes that the remote system
 will be woken up into action.
 .PP
@@ -817,10 +818,10 @@
 you can permit a small misbalance of the lease pools - for the purpose of
 giving the peer more than a 50/50 share of leases in the hopes that their
 clients might some day return and be allocated by the peer (operating
-normally).  This process is referred to as 'MAC Address Affinity', but this
+normally).  This process is referred to as \'MAC Address Affinity\', but this
 is somewhat misnamed: it applies equally to DHCP Client Identifier options.
 Note also that affinity is applied to leases when they enter the state
-'free' from 'expired' or 'released'.  In this case also, leases will not
+\'free\' from \'expired\' or \'released\'.  In this case also, leases will not
 be moved from free to backup if the secondary already has more than its
 share.
 .PP
@@ -1029,7 +1030,7 @@
 }
 
 class "dv-dsl-modems" {
-  match if opton dhcp-vendor-identifier = "dvdsl";
+  match if option dhcp-vendor-identifier = "dvdsl";
   spawn with option agent.circuit-id;
   lease limit 16;
 }
@@ -1905,7 +1906,7 @@
 Unfortunately, some DHCP and BOOTP clients do not do this, and
 therefore may not receive responses from the DHCP server.   The DHCP
 server can be made to always broadcast its responses to clients by
-setting this flag to 'on' for the relevant scope; relevant scopes would be
+setting this flag to \'on\' for the relevant scope; relevant scopes would be
 inside a conditional statement, as a parameter for a class, or as a parameter
 for a host declaration.   To avoid creating excess broadcast traffic on your
 network, we recommend that you restrict the use of this option to as few
@@ -2084,6 +2085,7 @@
 the client requesting the lease does not ask for a specific expiration
 time.  This is used for both DHCPv4 and DHCPv6 leases (it is also known
 as the "valid lifetime" in DHCPv6).
+The default is 43200 seconds.
 .RE
 .PP
 The
@@ -2114,7 +2116,7 @@
 .PP
 Please note that as delayed-ack is currently experimental, the delayed-ack
 feature is not compiled in by default, but must be enabled at compile time
-with './configure --enable-delayed-ack'.
+with \'./configure --enable-delayed-ack\'.
 .RE
 .PP
 The
@@ -2299,7 +2301,7 @@
 .PP
 .B infinite-is-reserved \fIflag\fB;\fR
 .PP
-ISC DHCP now supports 'reserved' leases.  See the section on RESERVED LEASES
+ISC DHCP now supports \'reserved\' leases.  See the section on RESERVED LEASES
 below.  If this \fIflag\fR is on, the server will automatically reserve leases
 allocated to clients which requested an infinite (0xffffffff) lease-time.
 .PP
@@ -2457,7 +2459,9 @@
 .PP
 .I Time
 should be the maximum length in seconds that will be assigned to a
-lease.   The only exception to this is that Dynamic BOOTP lease
+lease.
+If not defined, the default maximum lease time is 86400.
+The only exception to this is that Dynamic BOOTP lease
 lengths, which are not specified by the client, are not limited by
 this maximum.
 .RE
@@ -2472,6 +2476,8 @@
 .I Time
 should be the minimum length in seconds that will be assigned to a
 lease.
+The default is the minimum of 300 seconds or 
+\fBmax-lease-time\fR.
 .RE
 .PP
 The
@@ -2633,7 +2639,7 @@
 .B preferred-lifetime
 .I seconds\fR\fB;\fR
 .PP
-IPv6 addresses have 'valid' and 'preferred' lifetimes.  The valid lifetime
+IPv6 addresses have \'valid\' and \'preferred\' lifetimes.  The valid lifetime
 determines at what point at lease might be said to have expired, and is no
 longer useable.  A preferred lifetime is an advisory condition to help
 applications move off of the address and onto currently valid addresses
@@ -2912,13 +2918,13 @@
 It's often useful to allocate a single address to a single client, in
 approximate perpetuity.  Host statements with \fBfixed-address\fR clauses
 exist to a certain extent to serve this purpose, but because host statements
-are intended to approximate 'static configuration', they suffer from not being
-referenced in a littany of other Server Services, such as dynamic DNS,
-failover, 'on events' and so forth.
-.PP
-If a standard dynamic lease, as from any range statement, is marked 'reserved',
-then the server will only allocate this lease to the client it is identified
-by (be that by client identifier or hardware address).
+are intended to approximate \'static configuration\', they suffer from not 
+being referenced in a littany of other Server Services, such as dynamic DNS,
+failover, \'on events\' and so forth.
+.PP
+If a standard dynamic lease, as from any range statement, is marked
+\'reserved\', then the server will only allocate this lease to the client it
+is identified by (be that by client identifier or hardware address).
 .PP
 In practice, this means that the lease follows the normal state engine, enters
 ACTIVE state when the client is bound to it, expires, or is released, and any
@@ -2927,18 +2933,18 @@
 is that failover servers treat reserved leases as special when they enter
 the FREE or BACKUP states - each server applies the lease into the state it
 may allocate from - and the leases are not placed on the queue for allocation
-to other clients.  Instead they may only be 'found' by client identity.  The
+to other clients.  Instead they may only be \'found\' by client identity.  The
 result is that the lease is only offered to the returning client.
 .PP
 Care should probably be taken to ensure that the client only has one lease
 within a given subnet that it is identified by.
 .PP
-Leases may be set 'reserved' either through OMAPI, or through the
-\'infinite-is-reserved' configuration option (if this is applicable to your
+Leases may be set \'reserved\' either through OMAPI, or through the
+\'infinite-is-reserved\' configuration option (if this is applicable to your
 environment and mixture of clients).
 .PP
-It should also be noted that leases marked 'reserved' are effectively treated
-the same as leases marked 'bootp'.
+It should also be noted that leases marked \'reserved\' are effectively treated
+the same as leases marked \'bootp\'.
 .RE
 .SH REFERENCE: OPTION STATEMENTS
 DHCP option statements are documented in the
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpv6.c dhcp-4.1.2/server/dhcpv6.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/dhcpv6.c	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/server/dhcpv6.c	2010-10-22 13:15:00.000000000 -0700
@@ -4196,10 +4196,25 @@
 	 * If there is no link address, we will use the interface
 	 * that this packet came in on to pick the shared_network.
 	 */
-	} else {
+	} else if (packet->interface != NULL) {
 		status = shared_network_reference(shared,
 					 packet->interface->shared_network,
 					 MDL);
+                if (packet->dhcpv6_container_packet != NULL) {
+			log_info("[L2 Relay] No link address in relay packet "
+				 "assuming L2 relay and using receiving "
+				 "interface");
+                }
+
+	} else {
+		/*
+		 * We shouldn't be able to get here but if there is no link
+		 * address and no interface we don't know where to get the
+		 * pool from log an error and return an error.
+		 */
+		log_error("No interface and no link address " 
+			  "can't determine pool");
+		status = ISC_R_INVALIDARG;
 	}
 
 	return status;
@@ -4235,7 +4250,7 @@
 	isc_boolean_t inappropriate, has_addrs;
 	char reply_data[65536];
 	struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data;
-	int reply_ofs = (int)((char *)reply->options - (char *)reply);
+	int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options));
 
 	/* 
 	 * Basic client message validation.
@@ -4592,7 +4607,7 @@
 	int iaaddr_is_found;
 	char reply_data[65536];
 	struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data;
-	int reply_ofs = (int)((char *)reply->options - (char *)reply);
+	int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options));
 	char status_msg[32];
 	struct iasubopt *lease;
 	struct ia_xx *existing_ia_na;
@@ -5487,6 +5502,7 @@
 
 	enc_packet->client_port = packet->client_port;
 	enc_packet->client_addr = packet->client_addr;
+	interface_reference(&enc_packet->interface, packet->interface, MDL);
 	enc_packet->dhcpv6_container_packet = packet;
 
 	msg_type = enc_opt_data.data[0];
@@ -5554,7 +5570,7 @@
 	       sizeof(reply->link_address));
 	memcpy(reply->peer_address, &packet->dhcpv6_peer_address,
 	       sizeof(reply->peer_address));
-	reply_ofs = (int)((char *)reply->options - (char *)reply);
+	reply_ofs = (int)(offsetof(struct dhcpv6_relay_packet, options));
 
 	/*
 	 * Get the reply option state.
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/Makefile.in dhcp-4.1.2/server/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/server/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -116,6 +116,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/mdb6.c dhcp-4.1.2/server/mdb6.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/mdb6.c	2008-10-22 04:41:58.000000000 -0700
+++ dhcp-4.1.2/server/mdb6.c	2010-09-16 16:16:46.000000000 -0700
@@ -1,4 +1,5 @@
 /*
+ * Copyright (C) 2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2007-2008 by Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -17,6 +18,8 @@
 /* TODO: assert() */
 /* TODO: simplify functions, as pool is now in iaaddr */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <time.h>
 #include <netinet/in.h>
@@ -30,14 +33,14 @@
 #include "dst/md5.h"
 
 HASH_FUNCTIONS(ia, unsigned char *, struct ia_xx, ia_hash_t,
-	       ia_reference, ia_dereference, do_string_hash);
+	       ia_reference, ia_dereference, do_string_hash)
 
 ia_hash_t *ia_na_active;
 ia_hash_t *ia_ta_active;
 ia_hash_t *ia_pd_active;
 
 HASH_FUNCTIONS(iasubopt, struct in6_addr *, struct iasubopt, iasubopt_hash_t,
-	       iasubopt_reference, iasubopt_dereference, do_string_hash);
+	       iasubopt_reference, iasubopt_dereference, do_string_hash)
 
 struct ipv6_pool **pools;
 int num_pools;
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/omapi.c dhcp-4.1.2/server/omapi.c
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/server/omapi.c	2009-07-24 15:04:53.000000000 -0700
+++ dhcp-4.1.2/server/omapi.c	2010-09-16 16:16:46.000000000 -0700
@@ -3,7 +3,7 @@
    OMAPI object interfaces for the DHCP server. */
 
 /*
- * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1891,7 +1891,12 @@
 		} else
 			return ISC_R_INVALIDARG;
 
-		return ISC_R_SUCCESS;
+		/* 
+		 * Currently no way to get here, if we update the above
+		 * code so that we do get here this return needs to be
+		 * uncommented.
+		 * return ISC_R_SUCCESS;
+		 */
 	}
 
 
diff -ur /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/tests/Makefile.in dhcp-4.1.2/tests/Makefile.in
--- /home/apollock/debian/dhcp/isc-dhcp/isc-dhcp/tests/Makefile.in	2010-06-06 23:02:45.000000000 -0700
+++ dhcp-4.1.2/tests/Makefile.in	2010-10-22 14:45:36.000000000 -0700
@@ -93,6 +93,7 @@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@

Attachment: signature.asc
Description: Digital signature


Reply to: