[pkg-dhcp-commits] [isc-dhcp] 01/03: import upstream 4.3.5

Michael Gilbert mgilbert at moszumanska.debian.org
Sun Dec 18 23:22:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

mgilbert pushed a commit to branch master
in repository isc-dhcp.

commit f8a32411a10959a1c50e2d79ed6866bf70537db9
Author: Michael Gilbert <mgilbert at debian.org>
Date:   Sat Nov 26 06:43:03 2016 +0000

    import upstream 4.3.5
---
 README                       | 10 +++----
 RELNOTES                     | 35 ++++++++++++++---------
 common/parse.c               |  4 +--
 common/print.c               | 22 +++++++++++----
 common/tests/misc_unittest.c | 66 +++++++++++++++++++++++++++++++++++++++++++-
 configure.ac                 |  2 +-
 server/leasechain.c          |  7 +++--
 7 files changed, 117 insertions(+), 29 deletions(-)

diff --git a/README b/README
index f5a6fdc..aefe857 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 	      Internet Systems Consortium DHCP Distribution
-			    Version 4.3.5b1
-			    7 September 2016
+			     Version 4.3.5
+			     5 October 2016
 
 			      README FILE
 
@@ -142,12 +142,12 @@ information.   On Digital Unix, type ``man pfilt''.
 To build the DHCP Distribution, unpack the compressed tar file using
 the tar utility and the gzip command - type something like:
 
-	gunzip dhcp-4.3.5b1.tar.gz
-	tar xvf dhcp-4.3.5b1.tar
+	gunzip dhcp-4.3.5.tar.gz
+	tar xvf dhcp-4.3.5.tar
 
 			    CONFIGURING IT
 
-Now, cd to the dhcp-4.3.5b1 subdirectory that you've just created and
+Now, cd to the dhcp-4.3.5 subdirectory that you've just created and
 configure the source tree by typing:
 
 	./configure
diff --git a/RELNOTES b/RELNOTES
index 38ec043..cf44b3e 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,6 +1,6 @@
                 Internet Systems Consortium DHCP Distribution
-                            Version 4.3.5b1
-                            7 September 2016
+                             Version 4.3.5
+                             5 October 2016
 
                              Release Notes
 
@@ -52,6 +52,19 @@ ISC DHCP is open source software maintained by Internet Systems
 Consortium.  This product includes cryptographic software written
 by Eric Young (eay at cryptsoft.com).
 
+			Changes since 4.3.5b1
+
+- Corrected a bug which could cause the server to sporadically crash while
+  loading lease files with the lease-id-format is set to "hex".  Our thanks
+  to Jay Ford, University of Iowa for reporting the issue.
+  [ISC-Bugs #43185]
+
+- Eliminated a noisy, but otherwise harmless debug log statment that may
+  appear during server startup when building with --enable-binary-leases
+  and configuring multiple pools in a shared network.  Thanks to Fernando
+  Soto from BlueCat Networks for reporting the issue and supplying a patch.
+  [ISC-Bugs #43262]
+
 			Changes since 4.3.4
 
 - Fixed util/bindvar.sh error handling.
@@ -61,11 +74,6 @@ by Eric Young (eay at cryptsoft.com).
   of circuit id length.
   [ISC-Bugs #42556]
 
-- Add support for including an encapsulated option in a response
-  from the DHCPv6 server.  This allows the v6 FQDN option to be
-  returned in responses.
-  [ISC-Bugs #29246]
-
 - Add logic to test directory Makefiles to avoid copying Attfile(s)
   when building within the source tree.  This eliminates a noisy but
   otherwise harmless error message when running "make check".
@@ -73,9 +81,10 @@ by Eric Young (eay at cryptsoft.com).
 
 - Leases are now scrubbed of certain prior use information when pool
   re-balancing reassigns them from one FO peer to the other.  This
-  corrects an issue where leases that were offered but ignored retained
-  the client hostname from the original client. Thanks to Pavel Polacek,
-  Jan Evangelista Purkyne University for reporting the issue.
+  corrects an issue where leases that were offered but not used
+  by the client retained the client hostname from the original
+  client. Thanks to Pavel Polacek, Jan Evangelista Purkyne University
+  for reporting the issue.
   [ISC-Bugs #42008]
 
 - In the LDAP code and schema add some missing '6' characters to use
@@ -107,7 +116,7 @@ by Eric Young (eay at cryptsoft.com).
   [ISC-Bugs #42226]
 
 - Updates to contrib/dhcp-lease-list.pl to make it more friendly.
-  They are looking for the lease file in more places and skipping
+  The updates are: looking for the lease file in more places and skipping
   the "processing complete" output when creating machine readable
   output.  Thanks to Cameron Paine (cbp at null dot net) for the
   patch.
@@ -124,7 +133,7 @@ by Eric Young (eay at cryptsoft.com).
   in line with the call it will make to malloc().
   [ISC-Bugs #40843]
 
-- If the failover socket can't be bound close it, otherwise if the
+- If the failover socket can't be bound, close it.  Otherwise if the
   user configures an incorrect address in the failover stanza the
   server will continue to open new sockets every 90 seconds until
   it runs out.
@@ -1193,7 +1202,7 @@ by Eric Young (eay at cryptsoft.com).
 
 ! 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]
+  server to crash.  Thanks to a report from John Gibbins.  [ISC-Bugs #21992]
   CERT: VU#102047 CVE: CVE-2010-3611
 
 - ./configure on longer searches for -lcrypto to explicitly link against.
diff --git a/common/parse.c b/common/parse.c
index 22e7d58..a358004 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -3,7 +3,7 @@
    Common parser code for dhcpd and dhclient. */
 
 /*
- * Copyright (c) 2004-2015 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2016 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
@@ -98,7 +98,7 @@ void skip_to_rbrace (cfile, brace_count)
 	enum dhcp_token token;
 	const char *val;
 
-#if defined (DEBUG_TOKEN)
+#if defined (DEBUG_TOKENS)
 	log_error("skip_to_rbrace: %d\n", brace_count);
 #endif
 	do {
diff --git a/common/print.c b/common/print.c
index a694fed..ce368c4 100644
--- a/common/print.c
+++ b/common/print.c
@@ -383,15 +383,27 @@ void print_hex_only (len, data, limit, buf)
 	unsigned limit;
 	char *buf;
 {
-	unsigned i;
+	char *bufptr = buf;
+	int byte = 0;
 
-	if ((buf == NULL) || (limit < 3))
+	if (data == NULL || bufptr == NULL || limit == 0) {
 		return;
+	}
 
-	for (i = 0; (i < limit / 3) && (i < len); i++) {
-		sprintf(&buf[i*3], "%02x:", data[i]);
+	if (((len == 0) || ((len * 3) > limit))) {
+		*bufptr = 0x0;
+		return;
 	}
-	buf[(i * 3) - 1] = 0;
+
+	for ( ; byte < len; ++byte) {
+		if (byte > 0) {
+			*bufptr++ = ':';
+		}
+
+		sprintf(bufptr, "%02x", data[byte]);
+		bufptr += 2;
+	}
+
 	return;
 }
 
diff --git a/common/tests/misc_unittest.c b/common/tests/misc_unittest.c
index 6cefa6e..f858a22 100644
--- a/common/tests/misc_unittest.c
+++ b/common/tests/misc_unittest.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -153,6 +153,69 @@ ATF_TC_BODY(find_percent_adv, tc)
     return;
 }
 
+ATF_TC(print_hex_only);
+
+ATF_TC_HEAD(print_hex_only, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "Verify hex data formatting.");
+}
+
+/* This test exercises the print_hex_only function
+ */
+ATF_TC_BODY(print_hex_only, tc)
+{
+    unsigned char data[] =  {0xaa,0xbb,0xcc,0xdd};
+    char* ref = "aa:bb:cc:dd";
+    char buf[14];
+    memset(buf, 'x', sizeof(buf));
+    int data_len = sizeof(data);
+    int expected_len = 12;
+
+    /* Proper input values should produce proper result */
+    print_hex_only (data_len, data, expected_len, buf);
+    if (strlen(buf) != strlen(ref)) {
+	    atf_tc_fail("len of result is wrong");
+    }
+
+    if (strcmp(buf, ref)) {
+	    atf_tc_fail("result doesn't match ref");
+    }
+
+    /* Make sure we didn't overrun the buffer */
+    if (buf[expected_len] != 'x') {
+	    atf_tc_fail("data over run detected");
+    }
+
+    /* Buffer == null doesn't crash */
+    print_hex_only (data_len, data, expected_len, NULL);
+
+    /* Limit == 0 doesn't write (or crash) */
+    *buf = '-';
+    print_hex_only (data_len, data, 0, buf);
+    if (*buf != '-') {
+	    atf_tc_fail("limit of zero, altered buffer");
+    }
+
+    /* data == NULL doesn't write (or crash) */
+    print_hex_only (data_len, NULL, expected_len, buf);
+    if (*buf != '-') {
+	    atf_tc_fail("limit of zero, altered buffer");
+    }
+
+    /* Limit too small should produce zero length string */
+    *buf = '-';
+    print_hex_only (data_len, data, expected_len - 1, buf);
+    if (*buf != 0x0) {
+	    atf_tc_fail("limit too small should have failed");
+    }
+
+    /* Data length of 0 should produce zero length string */
+    *buf = '-';
+    print_hex_only (0, data, expected_len, buf);
+    if (*buf != 0x0) {
+	    atf_tc_fail("limit too small should have failed");
+    }
+}
     	
 /* This macro defines main() method that will call specified
    test cases. tp and simple_test_case names can be whatever you want
@@ -161,6 +224,7 @@ ATF_TP_ADD_TCS(tp)
 {
     ATF_TP_ADD_TC(tp, find_percent_basic);
     ATF_TP_ADD_TC(tp, find_percent_adv);
+    ATF_TP_ADD_TC(tp, print_hex_only);
 
     return (atf_no_error());
 }
diff --git a/configure.ac b/configure.ac
index e2f5ed0..8cce080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([DHCP],[4.3.5b1],[dhcp-users at isc.org])
+AC_INIT([DHCP],[4.3.5],[dhcp-users at isc.org])
 
 # we specify "foreign" to avoid having to have the GNU mandated files,
 # like AUTHORS, COPYING, and such
diff --git a/server/leasechain.c b/server/leasechain.c
index bf6a2bf..11310a9 100644
--- a/server/leasechain.c
+++ b/server/leasechain.c
@@ -670,8 +670,11 @@ lc_delete_all(struct leasechain *lc) {
 	}
 
 	/* and then get rid of the list itself */
-	dfree(lc->list, MDL);
-	lc->list = NULL;
+	if (lc->list != NULL) {
+		dfree(lc->list, MDL);
+		lc->list = NULL;
+	}
+
 	lc->total = 0;
 	lc->nelem = 0;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-dhcp/isc-dhcp.git



More information about the pkg-dhcp-commits mailing list