[pkg-dhcp-commits] [isc-dhcp] 02/02: release 4.3.3-5

Michael Gilbert mgilbert at moszumanska.debian.org
Sat Oct 3 22:25:00 UTC 2015


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

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

commit 63f55a4e29f01a63b9a682215bd50e22569b9972
Author: Michael Gilbert <mgilbert at debian.org>
Date:   Sat Oct 3 18:24:39 2015 -0400

    release 4.3.3-5
---
 debian/changelog                          | 15 +++++++
 debian/control                            |  1 +
 debian/debug                              | 11 +++---
 debian/dhclient-script.linux              |  5 ++-
 debian/dhclient.conf                      | 12 +++---
 debian/isc-dhcp-client-ddns.postrm        | 10 +++++
 debian/isc-dhcp-client-ddns.preinst       | 10 +++++
 debian/isc-dhcp-server.init.d             |  2 +-
 debian/patches/dhclient-more-detail.patch | 65 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 debian/rfc3442-classless-routes.kfreebsd  | 15 +++++++
 debian/rfc3442-classless-routes.linux     | 15 +++++++
 12 files changed, 147 insertions(+), 15 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fe8c417..6073357 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+isc-dhcp (4.3.3-5) unstable; urgency=medium
+
+  * Add dependencies for the debug package.
+  * Fix comments in the debug script (closes: #773804).
+  * Add diversions for isc-dhcp-client-ddns (closes: #800749).
+  * Fix directory output by the debug script (closes: #794770).
+  * Fix exit code handling in dhclient-script (closes: #692846).
+  * Escape parantheses in init script sed command (closes: #771530).
+  * Add more IP address detail to dhclient output (closes: #486611).
+  * Add dhcp6.fqdn and dhcp6.sntp-servers to the default request options.
+  * Avoid infinite loop caused by misconfigured rfc3442-classless-static-routes
+    (closes: #730294).
+
+ -- Michael Gilbert <mgilbert at debian.org>  Sat, 03 Oct 2015 18:41:26 +0000
+
 isc-dhcp (4.3.3-4) unstable; urgency=medium
 
   * Reenable NSUPDATE (closes: #798237).
diff --git a/debian/control b/debian/control
index 1567d86..87e4d6f 100644
--- a/debian/control
+++ b/debian/control
@@ -56,6 +56,7 @@ Depends:
  ${misc:Depends},
  debianutils (>= 2.8.2),
  lsb-base,
+ isc-dhcp-client (= ${binary:Version}) | isc-dhcp-server (= ${binary:Version}) | isc-dhcp-relay (= ${binary:Version}),
 Replaces:
  isc-dhcp-client-dbg (<< 4.3.0a1),
  isc-dhcp-server-dbg (<< 4.3.0a1),
diff --git a/debian/debug b/debian/debug
index 68bf1ca..593e7df 100644
--- a/debian/debug
+++ b/debian/debug
@@ -1,16 +1,15 @@
 #
 # The purpose of this script is just to show the variables that are
-# available to all the scripts in this directory. All these scripts
-# are called from /etc/dhcp3/dhclient-script, which exports all the
-# variables shown before. If you want to debug a problem with your DHCP
-# setup you can enable this script and take a look at
-# /tmp/dhclient-script.debug.
+# available to all the scripts in this directory. All these scripts are
+# called from dhclient-script, which exports all the variables shown
+# before. If you want to debug a problem with your DHCP setup you can
+# enable this script and take a look at /tmp/dhclient-script.debug.
 
 # To enable this script set the following variable to "yes"
 RUN="no"
 
 if [ "$RUN" = "yes" ]; then
-	echo $(date): entering ${0%/*}, dumping variables. \
+	echo "$(date): entering ${1%/*}, dumping variables." \
 		>> /tmp/dhclient-script.debug
 
 	# loop over the 4 possible prefixes: (empty), cur_, new_, old_
diff --git a/debian/dhclient-script.linux b/debian/dhclient-script.linux
index 376a094..d576935 100644
--- a/debian/dhclient-script.linux
+++ b/debian/dhclient-script.linux
@@ -114,6 +114,7 @@ run_hook() {
 
     if [ -f $script ]; then
         . $script
+        exit_status=$?
     fi
 
     if [ -n "$exit_status" ] && [ "$exit_status" -ne 0 ]; then
@@ -131,8 +132,8 @@ run_hookdir() {
 
     if [ -d "$dir" ]; then
         for script in $(run-parts --list $dir); do
-            run_hook $script || true
-            exit_status=$?
+            run_hook $script
+            exit_status=$((exit_status|$?))
         done
     fi
 
diff --git a/debian/dhclient.conf b/debian/dhclient.conf
index f33f92f..b85301b 100644
--- a/debian/dhclient.conf
+++ b/debian/dhclient.conf
@@ -12,17 +12,17 @@
 
 option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
 
-#send host-name "andare.fugue.com";
 send host-name = gethostname();
-#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
-#send dhcp-lease-time 3600;
-#supersede domain-name "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, domain-search, host-name,
-	dhcp6.name-servers, dhcp6.domain-search,
+	dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
 	netbios-name-servers, netbios-scope, interface-mtu,
 	rfc3442-classless-static-routes, ntp-servers;
+
+#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
+#send dhcp-lease-time 3600;
+#supersede domain-name "fugue.com home.vix.com";
+#prepend domain-name-servers 127.0.0.1;
 #require subnet-mask, domain-name-servers;
 #timeout 60;
 #retry 60;
diff --git a/debian/isc-dhcp-client-ddns.postrm b/debian/isc-dhcp-client-ddns.postrm
new file mode 100644
index 0000000..36fda36
--- /dev/null
+++ b/debian/isc-dhcp-client-ddns.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e 
+
+if [ "$1" = "remove" -o "$1" = "abort-install" -o "$1" = "disappear" ]; then
+        dpkg-divert --package isc-dhcp-client-ddns --remove \
+		--rename --divert /sbin/dhclient-noddns /sbin/dhclient
+fi
+
+#DEBHELPER#
diff --git a/debian/isc-dhcp-client-ddns.preinst b/debian/isc-dhcp-client-ddns.preinst
new file mode 100644
index 0000000..de3e762
--- /dev/null
+++ b/debian/isc-dhcp-client-ddns.preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e 
+
+if [ "$1" != "upgrade" ]; then
+	dpkg-divert --package isc-dhcp-client-ddns --add --rename \
+		--divert /sbin/dhclient-noddns /sbin/dhclient
+fi
+
+#DEBHELPER#
diff --git a/debian/isc-dhcp-server.init.d b/debian/isc-dhcp-server.init.d
index ac32883..1fb1506 100644
--- a/debian/isc-dhcp-server.init.d
+++ b/debian/isc-dhcp-server.init.d
@@ -40,7 +40,7 @@ DESC="ISC DHCP server"
 DHCPD_CONF=${DHCPD_CONF:-/etc/dhcp/dhcpd.conf}
 # try to read pid file name from config file, with fallback to /var/run/dhcpd.pid
 if [ -z "$DHCPD_PID" ]; then
-	DHCPD_PID=$(sed -n -e 's/^[ \t]*pid-file-name[ \t]*"(.*)"[ \t]*;.*$/\1/p' < "$DHCPD_CONF" 2>/dev/null | head -n 1)
+	DHCPD_PID=$(sed -n -e 's/^[ \t]*pid-file-name[ \t]*"\(.*\)"[ \t]*;.*$/\1/p' < "$DHCPD_CONF" 2>/dev/null | head -n 1)
 fi
 DHCPD_PID="${DHCPD_PID:-/var/run/dhcpd.pid}"
 
diff --git a/debian/patches/dhclient-more-detail.patch b/debian/patches/dhclient-more-detail.patch
new file mode 100644
index 0000000..ec8385a
--- /dev/null
+++ b/debian/patches/dhclient-more-detail.patch
@@ -0,0 +1,65 @@
+description: show offered and requested client IP addresses in dhclient output.
+author: Peter Miller <millerp at canb.auug.org.au>
+bug-ubuntu: https://launchpad.net/bugs/35265
+bug-debian: http://bugs.debian.org/486611
+
+--- a/client/dhclient.c
++++ b/client/dhclient.c
+@@ -1069,6 +1069,7 @@ void dhcpack (packet)
+ 	struct interface_info *ip = packet -> interface;
+ 	struct client_state *client;
+ 	struct client_lease *lease;
++	char *leasestr;
+ 	struct option_cache *oc;
+ 	struct data_string ds;
+ 
+@@ -1099,13 +1100,16 @@ void dhcpack (packet)
+ 		return;
+ 	}
+ 
+-	log_info ("DHCPACK from %s", piaddr (packet -> client_addr));
+-
+ 	lease = packet_to_lease (packet, client);
+ 	if (!lease) {
++		log_info ("DHCPACK from %s", piaddr (packet -> client_addr));
+ 		log_info ("packet_to_lease failed.");
+ 		return;
+ 	}
++	leasestr = strdup (piaddr (lease -> address));
++	log_info ("DHCPACK of %s from %s", leasestr,
++		  piaddr (packet -> client_addr));
++	free (leasestr);
+ 
+ 	client -> new = lease;
+ 
+@@ -1537,6 +1541,7 @@ void dhcpoffer (packet)
+ 	struct interface_info *ip = packet -> interface;
+ 	struct client_state *client;
+ 	struct client_lease *lease, *lp;
++	char *leasestr;
+ 	struct option **req;
+ 	int i;
+ 	int stop_selecting;
+@@ -1615,6 +1620,10 @@ void dhcpoffer (packet)
+ 		log_info ("%s: packet_to_lease failed.", obuf);
+ 		return;
+ 	}
++	leasestr = strdup (piaddr (lease -> address));
++	sprintf (obuf, "%s of %s from %s", name, leasestr,
++		 piaddr (packet -> client_addr));
++	free (leasestr);
+ 
+ 	/* If this lease was acquired through a BOOTREPLY, record that
+ 	   fact. */
+@@ -2229,7 +2238,10 @@ void send_request (cpp)
+ 			client -> packet.secs = htons (65535);
+ 	}
+ 
+-	log_info ("DHCPREQUEST on %s to %s port %d",
++	log_info ("DHCPREQUEST of %s on %s to %s port %d", 
++              piaddr ((client -> state == S_BOUND || client -> state ==
++		       S_RENEWING || client -> state == S_REBINDING) ?
++		       client -> active -> address : client -> requested_address),
+ 	      client -> name ? client -> name : client -> interface -> name,
+ 	      inet_ntoa (destination.sin_addr),
+ 	      ntohs (destination.sin_port));
diff --git a/debian/patches/series b/debian/patches/series
index fb8aebc..6e54a4d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@ dhclient-script-exit-status.patch
 dhclient-exit-hook.patch
 dhclient-dividebyzero.patch
 dhclient-64bit-time.patch
+dhclient-more-detail.patch
 
 fix-exit-hook-manpage.patch
 spelling-error.patch
diff --git a/debian/rfc3442-classless-routes.kfreebsd b/debian/rfc3442-classless-routes.kfreebsd
index 985f8af..bd71bd0 100644
--- a/debian/rfc3442-classless-routes.kfreebsd
+++ b/debian/rfc3442-classless-routes.kfreebsd
@@ -20,26 +20,41 @@ if [ "$RUN" = "yes" ]; then
 
 				case $net_length in
 					32|31|30|29|28|27|26|25)
+						if [ $# -lt 9 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.${4}.${5}"
 						gateway="${6}.${7}.${8}.${9}"
 						shift 9
 						;;
 					24|23|22|21|20|19|18|17)
+						if [ $# -lt 8 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.${4}.0"
 						gateway="${5}.${6}.${7}.${8}"
 						shift 8
 						;;
 					16|15|14|13|12|11|10|9)
+						if [ $# -lt 7 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.0.0"
 						gateway="${4}.${5}.${6}.${7}"
 						shift 7
 						;;
 					8|7|6|5|4|3|2|1)
+						if [ $# -lt 6 ]; then
+							return 1
+						fi
 						net_address="${2}.0.0.0"
 						gateway="${3}.${4}.${5}.${6}"
 						shift 6
 						;;
 					0)	# default route
+						if [ $# -lt 5 ]; then
+							return 1
+						fi
 						net_address="0.0.0.0"
 						gateway="${2}.${3}.${4}.${5}"
 						shift 5
diff --git a/debian/rfc3442-classless-routes.linux b/debian/rfc3442-classless-routes.linux
index 462fb46..1ef7b8a 100644
--- a/debian/rfc3442-classless-routes.linux
+++ b/debian/rfc3442-classless-routes.linux
@@ -20,26 +20,41 @@ if [ "$RUN" = "yes" ]; then
 
 				case $net_length in
 					32|31|30|29|28|27|26|25)
+						if [ $# -lt 9 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.${4}.${5}"
 						gateway="${6}.${7}.${8}.${9}"
 						shift 9
 						;;
 					24|23|22|21|20|19|18|17)
+						if [ $# -lt 8 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.${4}.0"
 						gateway="${5}.${6}.${7}.${8}"
 						shift 8
 						;;
 					16|15|14|13|12|11|10|9)
+						if [ $# -lt 7 ]; then
+							return 1
+						fi
 						net_address="${2}.${3}.0.0"
 						gateway="${4}.${5}.${6}.${7}"
 						shift 7
 						;;
 					8|7|6|5|4|3|2|1)
+						if [ $# -lt 6 ]; then
+							return 1
+						fi
 						net_address="${2}.0.0.0"
 						gateway="${3}.${4}.${5}.${6}"
 						shift 6
 						;;
 					0)	# default route
+						if [ $# -lt 5 ]; then
+							return 1
+						fi
 						net_address="0.0.0.0"
 						gateway="${2}.${3}.${4}.${5}"
 						shift 5

-- 
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