dhcp: Update to 4.3.5b1

Submitted by Stefan Schantl on Feb. 23, 2017, 11:54 a.m.

Details

Message ID 20170223115433.23219-1-stefan.schantl@ipfire.org
State New
Headers show

Commit Message

Stefan Schantl Feb. 23, 2017, 11:54 a.m.
This is an update to the latest available version of the isc-dhcp.

Also rework the patch handling.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 dhcp/dhcp.nm                                       |  81 +-
 dhcp/patches/0001-dhcp-remove-bind.patch           | 261 +++++++
 dhcp/patches/0002-dhcp-sharedlib.patch             | 140 ++++
 dhcp/patches/0003-dhcp-errwarn-message.patch       |  64 ++
 ...ions.patch => 0004-dhcp-dhclient-options.patch} | 254 +++----
 ...-ifup.patch => 0005-dhcp-release-by-ifup.patch} |  10 +-
 ...ch => 0006-dhcp-dhclient-decline-backoff.patch} |  38 +-
 ...t-bootp.patch => 0007-dhcp-unicast-bootp.patch} |  30 +-
 ...h => 0008-dhcp-default-requested-options.patch} |  14 +-
 ...2.5-manpages.patch => 0009-dhcp-manpages.patch} |  61 +-
 ...hcp-4.2.4-paths.patch => 0010-dhcp-paths.patch} |  16 +-
 ...4.2.2-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch} | 178 +++--
 dhcp/patches/0012-dhcp-garbage-chars.patch         |  12 +
 dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch |  14 +
 ...se.patch => 0014-dhcp-64_bit_lease_parse.patch} |  43 +-
 ...capability.patch => 0015-dhcp-capability.patch} | 100 +--
 ...ndDecline.patch => 0016-dhcp-sendDecline.patch} |  26 +-
 ...017-dhcp-rfc3442-classless-static-routes.patch} | 110 +--
 ...expired.patch => 0018-dhcp-honor-expired.patch} |  10 +-
 .../{dhcp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch}  | 116 +--
 ...p-4.2.5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} | 247 ++++---
 dhcp/patches/0021-dhcp-IPoIB-log-id.patch          | 165 +++++
 ...oved-xid.patch => 0022-dhcp-improved-xid.patch} |  74 +-
 dhcp/patches/0023-dhcp-duidv4.patch                |  34 +
 dhcp/patches/0024-dhcp-duid_uuid.patch             | 111 +++
 ...getifaddrs.patch => 0025-dhcp-getifaddrs.patch} |  50 +-
 ...26-dhcp-client-request-release-bind-iface.patch |  61 ++
 ...-P1-interval.patch => 0027-dhcp-interval.patch} |   8 +-
 dhcp/patches/0028-dhcp-no-subnet-error2info.patch  |  48 ++
 dhcp/patches/0029-dhcp-sd_notify.patch             |  79 ++
 .../patches/0030-dhcp-option97-pxe-client-id.patch | 217 ++++++
 dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch    |  13 +
 dhcp/patches/0032-dhcp-dhclient-preinit6s.patch    |  64 ++
 .../patches/dhcp-4.2.0-add_timeout_when_NULL.patch |  14 -
 dhcp/patches/dhcp-4.2.0-errwarn-message.patch      |  30 -
 dhcp/patches/dhcp-4.2.0-garbage-chars.patch        |  12 -
 dhcp/patches/dhcp-4.2.0-logpid.patch               |  12 -
 dhcp/patches/dhcp-4.2.1-retransmission.patch       |  48 --
 dhcp/patches/dhcp-4.2.2-gpxe-cid.patch             |  83 ---
 dhcp/patches/dhcp-4.2.2-xen-checksum.patch         | 249 -------
 dhcp/patches/dhcp-4.2.3-P2-log_perror.patch        |  11 -
 .../dhcp-4.2.3-dhclient-decline-onetry.patch       |  27 -
 dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch        |  46 --
 .../dhcp-4.2.4-P2-conflex-do-forward-updates.patch |  12 -
 dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch          |  13 -
 dhcp/patches/dhcp-4.2.4-UseMulticast.patch         | 239 ------
 dhcp/patches/dhcp-4.2.4-failOverPeer.patch         |  12 -
 dhcp/patches/dhcp-4.2.4-send_release.patch         |  23 -
 dhcp/patches/dhcp-4.2.5-next-server.patch          |  72 --
 dhcp/patches/dhcp-4.2.5-paranoia.patch             | 202 -----
 dhcp/patches/dhcp-4.2.5-range6.patch               |  42 --
 dhcp/patches/dhcp-4.2.5-remove-bind.patch          | 164 ----
 ...5-rfc5970-dhcpv6-options-for-network-boot.patch |  89 ---
 dhcp/patches/dhcp-4.2.5-sharedlib.patch            | 120 ---
 dhcp/patches/dhcp-4.2.5-systemtap.patch            | 822 ---------------------
 dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch      |  23 -
 56 files changed, 2014 insertions(+), 3100 deletions(-)
 create mode 100644 dhcp/patches/0001-dhcp-remove-bind.patch
 create mode 100644 dhcp/patches/0002-dhcp-sharedlib.patch
 create mode 100644 dhcp/patches/0003-dhcp-errwarn-message.patch
 rename dhcp/patches/{dhcp-4.2.4-dhclient-options.patch => 0004-dhcp-dhclient-options.patch} (72%)
 rename dhcp/patches/{dhcp-4.2.0-release-by-ifup.patch => 0005-dhcp-release-by-ifup.patch} (88%)
 rename dhcp/patches/{dhcp-4.2.0-dhclient-decline-backoff.patch => 0006-dhcp-dhclient-decline-backoff.patch} (56%)
 rename dhcp/patches/{dhcp-4.2.4-unicast-bootp.patch => 0007-dhcp-unicast-bootp.patch} (72%)
 rename dhcp/patches/{dhcp-4.2.0-default-requested-options.patch => 0008-dhcp-default-requested-options.patch} (76%)
 rename dhcp/patches/{dhcp-4.2.5-manpages.patch => 0009-dhcp-manpages.patch} (70%)
 rename dhcp/patches/{dhcp-4.2.4-paths.patch => 0010-dhcp-paths.patch} (57%)
 rename dhcp/patches/{dhcp-4.2.2-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch} (63%)
 create mode 100644 dhcp/patches/0012-dhcp-garbage-chars.patch
 create mode 100644 dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
 rename dhcp/patches/{dhcp-4.2.4-64_bit_lease_parse.patch => 0014-dhcp-64_bit_lease_parse.patch} (51%)
 rename dhcp/patches/{dhcp-4.2.2-capability.patch => 0015-dhcp-capability.patch} (64%)
 rename dhcp/patches/{dhcp-4.2.5-sendDecline.patch => 0016-dhcp-sendDecline.patch} (88%)
 rename dhcp/patches/{dhcp-4.2.5-rfc3442-classless-static-routes.patch => 0017-dhcp-rfc3442-classless-static-routes.patch} (76%)
 rename dhcp/patches/{dhcp-4.2.0-honor-expired.patch => 0018-dhcp-honor-expired.patch} (77%)
 rename dhcp/patches/{dhcp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch} (62%)
 rename dhcp/patches/{dhcp-4.2.5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} (70%)
 create mode 100644 dhcp/patches/0021-dhcp-IPoIB-log-id.patch
 rename dhcp/patches/{dhcp-4.2.4-improved-xid.patch => 0022-dhcp-improved-xid.patch} (71%)
 create mode 100644 dhcp/patches/0023-dhcp-duidv4.patch
 create mode 100644 dhcp/patches/0024-dhcp-duid_uuid.patch
 rename dhcp/patches/{dhcp-4.2.4-getifaddrs.patch => 0025-dhcp-getifaddrs.patch} (89%)
 create mode 100644 dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
 rename dhcp/patches/{dhcp-4.2.4-P1-interval.patch => 0027-dhcp-interval.patch} (72%)
 create mode 100644 dhcp/patches/0028-dhcp-no-subnet-error2info.patch
 create mode 100644 dhcp/patches/0029-dhcp-sd_notify.patch
 create mode 100644 dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
 create mode 100644 dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
 create mode 100644 dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.0-errwarn-message.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.0-garbage-chars.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.0-logpid.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.1-retransmission.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.2-gpxe-cid.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.2-xen-checksum.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.3-P2-log_perror.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-UseMulticast.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-failOverPeer.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.4-send_release.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-next-server.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-paranoia.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-range6.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-remove-bind.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-sharedlib.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5-systemtap.patch
 delete mode 100644 dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch

Patch hide | download patch | download mbox

diff --git a/dhcp/dhcp.nm b/dhcp/dhcp.nm
index 4cee3bd..eafb0b0 100644
--- a/dhcp/dhcp.nm
+++ b/dhcp/dhcp.nm
@@ -4,8 +4,8 @@ 
 ###############################################################################
 
 name       = dhcp
-version    = 4.2.5
-release    = 3
+version    = 4.3.5b1
+release    = 1
 
 groups     = Networking/Daemons
 url        = http://isc.org/products/DHCP/
@@ -22,61 +22,17 @@  end
 
 source_dl  = ftp://ftp.isc.org/isc/dhcp/%{version}/
 
-# Apply patches in a special order.
-patches = \
-	dhcp-4.2.5-remove-bind.patch \
-	dhcp-4.2.4-P1-remove-dst.patch \
-	dhcp-4.2.0-errwarn-message.patch \
-	dhcp-4.2.4-dhclient-options.patch \
-	dhcp-4.2.0-release-by-ifup.patch \
-	dhcp-4.2.0-dhclient-decline-backoff.patch \
-	dhcp-4.2.4-unicast-bootp.patch \
-	dhcp-4.2.0-default-requested-options.patch \
-	dhcp-4.2.2-xen-checksum.patch \
-	dhcp-4.2.5-manpages.patch \
-	dhcp-4.2.4-paths.patch \
-	dhcp-4.2.2-CLOEXEC.patch \
-	dhcp-4.2.0-garbage-chars.patch \
-	dhcp-4.2.0-add_timeout_when_NULL.patch \
-	dhcp-4.2.4-64_bit_lease_parse.patch \
-	dhcp-4.2.2-capability.patch \
-	dhcp-4.2.0-logpid.patch \
-	dhcp-4.2.4-UseMulticast.patch \
-	dhcp-4.2.5-sendDecline.patch \
-	dhcp-4.2.1-retransmission.patch \
-	dhcp-4.2.5-rfc3442-classless-static-routes.patch \
-	dhcp-4.2.0-honor-expired.patch \
-	dhcp-4.2.5-sharedlib.patch \
-	dhcp-4.2.5-PPP.patch \
-	dhcp-4.2.5-paranoia.patch \
-	dhcp-4.2.5-lpf-ib.patch \
-	dhcp-4.2.4-improved-xid.patch \
-	dhcp-4.2.2-gpxe-cid.patch \
-	dhcp-4.2.5-systemtap.patch \
-	dhcp-4.2.3-dhclient-decline-onetry.patch \
-	dhcp-4.2.3-P2-log_perror.patch \
-	dhcp-4.2.4-getifaddrs.patch \
-	dhcp-4.2.4-send_release.patch \
-	dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch \
-	dhcp-4.2.4-failOverPeer.patch \
-	dhcp-4.2.5b1-atf-pkgconfig.patch \
-	dhcp-4.2.4-P1-interval.patch \
-	dhcp-4.2.4-P2-conflex-do-forward-updates.patch \
-	dhcp-4.2.4-P2-dupl-key.patch \
-	dhcp-4.2.5-range6.patch \
-	dhcp-4.2.5-next-server.patch
-
 build
 	requires
 		autoconf
 		automake
-		bind-devel>=9
+		bind-devel>=9.9.9-P6
 		bind-devel<10
 		groff
 		libtool
 		openldap-devel
 		libcap-ng-devel
-		systemd-units
+		systemd-devel
 	end
 
 	CFLAGS += -fno-strict-aliasing
@@ -98,18 +54,37 @@  build
 		--with-libbind-libs=/usr/lib/ \
 		--disable-static \
 		--enable-paranoia \
-		--enable-early-chroot
+		--enable-early-chroot \
+		--enable-binary-leases \
+		--with-systemd
 
 	prepare_cmds
 		# Remove bundled BIND source
 		rm -rvf %{DIR_APP}/bind/bind.tar.gz
 
-		# Remove dst.
-		rm -rvf dst includes/isc-dhcp
-
 		# Regenerate build environment
-		#libtoolize --copy --force
 		autoreconf --verbose --force --install
+
+		# Change DHCLIENT_DEFAULT_PREFIX_LEN  64 -> 128
+		sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' \
+			includes/site.h
+
+		# Update PATH in all manpages
+		for page in client/dhclient.conf.5 client/dhclient.leases.5 \
+			client/dhclient-script.8 client/dhclient.8 ; do
+
+			sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
+				-e 's|RUNDIR|/run|g' \
+				-e 's|DBDIR|%{localstatedir}/lib/dhclient|g' \
+				-e 's|ETCDIR|%{dhcpconfdir}|g' $page
+		done
+
+		for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
+			sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
+				-e 's|RUNDIR|/run|g' \
+				-e 's|DBDIR|%{localstatedir}/lib/dhcpd|g' \
+				-e 's|ETCDIR|%{dhcpconfdir}|g' $page
+		done
 	end
 
 	install_cmds
diff --git a/dhcp/patches/0001-dhcp-remove-bind.patch b/dhcp/patches/0001-dhcp-remove-bind.patch
new file mode 100644
index 0000000..46bd323
--- /dev/null
+++ b/dhcp/patches/0001-dhcp-remove-bind.patch
@@ -0,0 +1,261 @@ 
+diff -up dhcp-4.3.5b1/client/Makefile.am.remove-bind dhcp-4.3.5b1/client/Makefile.am
+--- dhcp-4.3.5b1/client/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/client/Makefile.am	2016-09-12 17:00:22.797902248 +0200
+@@ -4,8 +4,6 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+ 
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+ 	      -DLOCALSTATEDIR='"$(localstatedir)"'
+ 
+@@ -15,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
+ 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
+ 		   scripts/netbsd scripts/nextstep scripts/openbsd \
+ 		   scripts/solaris scripts/openwrt
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-		 $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
++		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
+ EXTRA_DIST = $(man_MANS)
+diff -up dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind dhcp-4.3.5b1/common/tests/Makefile.am
+--- dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/common/tests/Makefile.am	2016-09-12 17:07:42.168232452 +0200
+@@ -1,7 +1,5 @@
+ SUBDIRS = .
+ 
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
+ 
+ EXTRA_DIST = Atffile
+@@ -15,26 +13,26 @@ ATF_TESTS += alloc_unittest dns_unittest
+ alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
+ alloc_unittest_LDADD = $(ATF_LDFLAGS)
+ alloc_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-	$(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++	../../omapip/libomapi.a \
++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ dns_unittest_LDADD = $(ATF_LDFLAGS)
+ dns_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-	$(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++	../../omapip/libomapi.a \
++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ misc_unittest_LDADD = $(ATF_LDFLAGS)
+ misc_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-	$(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++	../../omapip/libomapi.a \
++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
+ ns_name_unittest_LDADD = $(ATF_LDFLAGS)
+ ns_name_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-	$(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++	../../omapip/libomapi.a \
++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ check: $(ATF_TESTS)
+ 	@if test $(top_srcdir) != ${top_builddir}; then \
+diff -up dhcp-4.3.5b1/configure.ac.remove-bind dhcp-4.3.5b1/configure.ac
+--- dhcp-4.3.5b1/configure.ac.remove-bind	2016-08-26 20:24:41.000000000 +0200
++++ dhcp-4.3.5b1/configure.ac	2016-09-12 17:00:22.798902249 +0200
+@@ -682,20 +682,33 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
+ BINDDIR=
+ BINDSRCDIR=
+ AC_ARG_WITH(libbind,
+-	AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
+-		        (default is ./bind)]),
++	AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH
++		        (default is ./bind/includes)]),
+ 	use_libbind="$withval", use_libbind="no")
+ case "$use_libbind" in
++yes|no)
++	libbind="\${top_srcdir}/bind/include"
++	;;
++*)
++	libbind="$use_libbind"
++	;;
++esac
++
++BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
++AC_ARG_WITH(libbind-libs,
++	AC_HELP_STRING([--with-libbind-libs=PATH],
++		       [bind9 export libraries are in PATH]),
++		       [libbind_libs="$withval"], [libbind_libs='no'])
++case "$libbind_libs" in
+ yes)
+-	BINDDIR="\${top_srcdir}/bind"
+-	BINDSRCDIR="\${top_srcdir}/bind"
++	AC_MSG_ERROR([Specify path to bind9 libraries])
+ 	;;
+ no)
+-	BINDDIR="\${top_srcdir}/bind"
+-	BINDSRCDIR="\${top_srcdir}/bind"
++	BUNDLED_BIND=yes
+ 	;;
+ *)
+-	BINDDIR="$use_libbind"
++	BIND9_LIBDIR="-L$libbind_libs"
++	BUNDLED_BIND=no
+ 	if test ! -d "$srcdir/bind"; then
+ 		# no bind directory, create it with a fake Makefile.in
+ 		# (AC_CONFIG_FILES and top Makefile refer to it so
+@@ -709,8 +722,8 @@ EOF
+ 	fi
+ 	;;
+ esac
+-AC_SUBST(BINDDIR)
+-AC_SUBST(BINDSRCDIR)
++AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
++AC_SUBST([BIND9_LIBDIR])
+ 
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+@@ -788,7 +801,7 @@ fi
+ CFLAGS="$CFLAGS $STD_CWARNINGS"
+ 
+ # Try to add the bind and dhcp include directories
+-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
++CFLAGS="$CFLAGS -I$libbind"
+ 
+ case "$host" in
+ *-darwin*)
+diff -up dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind dhcp-4.3.5b1/dhcpctl/Makefile.am
+--- dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/dhcpctl/Makefile.am	2016-09-12 17:00:22.798902249 +0200
+@@ -1,5 +1,3 @@
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ bin_PROGRAMS = omshell
+ lib_LIBRARIES = libdhcpctl.a
+ noinst_PROGRAMS = cltest
+@@ -8,12 +6,10 @@ EXTRA_DIST = $(man_MANS)
+ 
+ omshell_SOURCES = omshell.c
+ omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+-	        $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+-	        $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
++	        $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
+ 
+ cltest_SOURCES = cltest.c
+ cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+-	       $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+-               $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
++	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+diff -up dhcp-4.3.5b1/Makefile.am.remove-bind dhcp-4.3.5b1/Makefile.am
+--- dhcp-4.3.5b1/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/Makefile.am	2016-09-12 17:00:22.798902249 +0200
+@@ -26,7 +26,13 @@ EXTRA_DIST = RELNOTES LICENSE \
+ 	     bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
+ 	     common/tests/Atffile server/tests/Atffile
+ 
+-SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server
++if BUNDLED_BIND
++SUBDIRS = bind
++else
++SUBDIRS = 
++endif
++
++SUBDIRS += includes tests common omapip client dhcpctl relay server
+ 
+ nobase_include_HEADERS = dhcpctl/dhcpctl.h
+ 
+diff -up dhcp-4.3.5b1/omapip/Makefile.am.remove-bind dhcp-4.3.5b1/omapip/Makefile.am
+--- dhcp-4.3.5b1/omapip/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/omapip/Makefile.am	2016-09-12 17:00:22.798902249 +0200
+@@ -1,5 +1,3 @@
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+ 
+@@ -12,6 +10,6 @@ man_MANS = omapi.3
+ EXTRA_DIST = $(man_MANS)
+ 
+ svtest_SOURCES = test.c
+-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+-		$(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
++svtest_LDADD = libomapi.a \
++	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+diff -up dhcp-4.3.5b1/relay/Makefile.am.remove-bind dhcp-4.3.5b1/relay/Makefile.am
+--- dhcp-4.3.5b1/relay/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/relay/Makefile.am	2016-09-12 17:00:22.798902249 +0200
+@@ -1,12 +1,9 @@
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
+ 
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
+ dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+-		 $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
+-		 $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
++		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ man_MANS = dhcrelay.8
+ EXTRA_DIST = $(man_MANS)
+ 
+diff -up dhcp-4.3.5b1/server/Makefile.am.remove-bind dhcp-4.3.5b1/server/Makefile.am
+--- dhcp-4.3.5b1/server/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/Makefile.am	2016-09-12 17:00:22.798902249 +0200
+@@ -4,8 +4,6 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+ 
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+ 
+ dist_sysconf_DATA = dhcpd.conf.example
+@@ -15,10 +13,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
+ 		dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
+ 
+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
+-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+-	      ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+-	      $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+-	      $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
++	      $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
++	      $(LDAP_LIBS)
+ 
+ man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
+ EXTRA_DIST = $(man_MANS)
+diff -up dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind dhcp-4.3.5b1/server/tests/Makefile.am
+--- dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/tests/Makefile.am	2016-09-12 17:00:22.799902249 +0200
+@@ -1,9 +1,7 @@
+ SUBDIRS = .
+ 
+-BINDLIBDIR = @BINDDIR@/lib
+-
+ AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
+-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
++AM_CPPFLAGS += -I$(top_srcdir)
+ AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
+ 
+ EXTRA_DIST = Atffile
+@@ -20,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
+           ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
+ 
+ DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
+-          $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
+-	  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
+-	  $(BINDLIBDIR)/libisc.a
++	   $(top_builddir)/dhcpctl/libdhcpctl.a \
++	   $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ ATF_TESTS =
+ if HAVE_ATF
diff --git a/dhcp/patches/0002-dhcp-sharedlib.patch b/dhcp/patches/0002-dhcp-sharedlib.patch
new file mode 100644
index 0000000..3427f78
--- /dev/null
+++ b/dhcp/patches/0002-dhcp-sharedlib.patch
@@ -0,0 +1,140 @@ 
+diff -up dhcp-4.3.4/client/Makefile.am.sharedlib dhcp-4.3.4/client/Makefile.am
+--- dhcp-4.3.4/client/Makefile.am.sharedlib	2016-04-29 11:48:30.389923087 +0200
++++ dhcp-4.3.4/client/Makefile.am	2016-04-29 11:48:30.393923084 +0200
+@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
+ 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
+ 		   scripts/netbsd scripts/nextstep scripts/openbsd \
+ 		   scripts/solaris scripts/openwrt
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
+ 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
+ EXTRA_DIST = $(man_MANS)
+diff -up dhcp-4.3.4/common/tests/Makefile.am.sharedlib dhcp-4.3.4/common/tests/Makefile.am
+--- dhcp-4.3.4/common/tests/Makefile.am.sharedlib	2016-04-29 11:48:30.394923084 +0200
++++ dhcp-4.3.4/common/tests/Makefile.am	2016-04-29 11:54:16.890716651 +0200
+@@ -13,25 +13,25 @@ ATF_TESTS += alloc_unittest dns_unittest
+ alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
+ alloc_unittest_LDADD = $(ATF_LDFLAGS)
+ alloc_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a \
++	../../omapip/libomapi.la \
+ 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ dns_unittest_LDADD = $(ATF_LDFLAGS)
+ dns_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a \
++	../../omapip/libomapi.la \
+ 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ misc_unittest_LDADD = $(ATF_LDFLAGS)
+ misc_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a \
++	../../omapip/libomapi.la \
+ 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
+ ns_name_unittest_LDADD = $(ATF_LDFLAGS)
+ ns_name_unittest_LDADD += ../libdhcp.a  \
+-	../../omapip/libomapi.a \
++	../../omapip/libomapi.la \
+ 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ check: $(ATF_TESTS)
+diff -up dhcp-4.3.4/configure.ac.sharedlib dhcp-4.3.4/configure.ac
+--- dhcp-4.3.4/configure.ac.sharedlib	2016-04-29 11:48:30.394923084 +0200
++++ dhcp-4.3.4/configure.ac	2016-04-29 11:55:22.729691668 +0200
+@@ -47,7 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$c
+ # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+-AC_PROG_RANLIB
++# Use libtool to simplify building of shared libraries
++AC_PROG_LIBTOOL
+ 
+ AC_PATH_PROG(AR, ar)
+ AC_SUBST(AR)
+diff -up dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib dhcp-4.3.4/dhcpctl/Makefile.am
+--- dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib	2016-04-29 11:48:30.394923084 +0200
++++ dhcp-4.3.4/dhcpctl/Makefile.am	2016-04-29 11:56:18.390670546 +0200
+@@ -1,15 +1,15 @@
+ bin_PROGRAMS = omshell
+-lib_LIBRARIES = libdhcpctl.a
++lib_LTLIBRARIES = libdhcpctl.la
+ noinst_PROGRAMS = cltest
+ man_MANS = omshell.1 dhcpctl.3
+ EXTRA_DIST = $(man_MANS)
+ 
+ omshell_SOURCES = omshell.c
+-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
++omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
+ 	        $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
++libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
+ 
+ cltest_SOURCES = cltest.c
+-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
++cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
+ 	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+diff -up dhcp-4.3.4/omapip/Makefile.am.sharedlib dhcp-4.3.4/omapip/Makefile.am
+--- dhcp-4.3.4/omapip/Makefile.am.sharedlib	2016-04-29 11:48:30.392923085 +0200
++++ dhcp-4.3.4/omapip/Makefile.am	2016-04-29 11:57:33.709641969 +0200
+@@ -1,7 +1,7 @@
+-lib_LIBRARIES = libomapi.a
++lib_LTLIBRARIES = libomapi.la
+ noinst_PROGRAMS = svtest
+ 
+-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
++libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
+ 		     errwarn.c listener.c dispatch.c generic.c support.c \
+ 		     handle.c message.c convert.c hash.c auth.c inet_addr.c \
+ 		     array.c trace.c toisc.c iscprint.c isclib.c
+@@ -10,6 +10,6 @@ man_MANS = omapi.3
+ EXTRA_DIST = $(man_MANS)
+ 
+ svtest_SOURCES = test.c
+-svtest_LDADD = libomapi.a \
++svtest_LDADD = libomapi.la \
+ 	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+diff -up dhcp-4.3.4/relay/Makefile.am.sharedlib dhcp-4.3.4/relay/Makefile.am
+--- dhcp-4.3.4/relay/Makefile.am.sharedlib	2016-04-29 11:48:30.392923085 +0200
++++ dhcp-4.3.4/relay/Makefile.am	2016-04-29 11:48:30.395923083 +0200
+@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
+ 
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
+-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
+ 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ man_MANS = dhcrelay.8
+ EXTRA_DIST = $(man_MANS)
+diff -up dhcp-4.3.4/server/Makefile.am.sharedlib dhcp-4.3.4/server/Makefile.am
+--- dhcp-4.3.4/server/Makefile.am.sharedlib	2016-04-29 11:48:30.392923085 +0200
++++ dhcp-4.3.4/server/Makefile.am	2016-04-29 11:48:30.395923083 +0200
+@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
+ 		dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
+ 
+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
+-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dhcpctl/libdhcpctl.la \
+ 	      $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
+ 	      $(LDAP_LIBS)
+ 
+diff -up dhcp-4.3.4/server/tests/Makefile.am.sharedlib dhcp-4.3.4/server/tests/Makefile.am
+--- dhcp-4.3.4/server/tests/Makefile.am.sharedlib	2016-04-29 11:48:30.395923083 +0200
++++ dhcp-4.3.4/server/tests/Makefile.am	2016-04-29 11:59:13.414604130 +0200
+@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
+           ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c        \
+           ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
+ 
+-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
+-	   $(top_builddir)/dhcpctl/libdhcpctl.a \
++DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \
++	   $(top_builddir)/dhcpctl/libdhcpctl.la \
+ 	   $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
+ 
+ ATF_TESTS =
diff --git a/dhcp/patches/0003-dhcp-errwarn-message.patch b/dhcp/patches/0003-dhcp-errwarn-message.patch
new file mode 100644
index 0000000..f42d1e9
--- /dev/null
+++ b/dhcp/patches/0003-dhcp-errwarn-message.patch
@@ -0,0 +1,64 @@ 
+diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
+--- dhcp-4.3.5/omapip/errwarn.c.errwarn	2016-09-27 21:16:50.000000000 +0200
++++ dhcp-4.3.5/omapip/errwarn.c	2016-11-29 19:44:03.515031147 +0100
+@@ -49,6 +49,41 @@ void (*log_cleanup) (void);
+ static char mbuf [CVT_BUF_MAX + 1];
+ static char fbuf [CVT_BUF_MAX + 1];
+ 
++// get BUG_REPORT_URL from /etc/os-release
++char * bug_report_url(void) {
++    FILE * file = fopen("/etc/os-release", "r");
++    size_t len;
++    char * line = NULL;
++    char * url = NULL;
++    size_t url_len = 256;
++
++    url = (char *) malloc(url_len * sizeof(char));
++    strcpy(url, "https://bugzilla.redhat.com/");
++
++    if (!file)
++        return url;
++
++    while ((getline(&line, &len, file)) != -1) {
++        if (strstr(line, "BUG_REPORT_URL") != NULL) {
++            char * start = strchr(line, '=');
++            char * rquotes = strrchr(line, '"');
++
++            if (rquotes != NULL) {
++                *rquotes = '\0';
++                strncpy(url, start+2, url_len);
++            } else {
++                strncpy(url, start+1, url_len);
++            }
++            url[url_len-1] = '\0';
++            fclose(file);
++            return url;
++        }
++    }
++    fclose(file);
++    return url;
++}
++
++
+ /* Log an error message, then exit... */
+ 
+ void log_fatal (const char * fmt, ... )
+@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... )
+   }
+ 
+   log_error ("%s", "");
+-  log_error ("If you think you have received this message due to a bug rather");
+-  log_error ("than a configuration issue please read the section on submitting");
+-  log_error ("bugs on either our web page at www.isc.org or in the README file");
+-  log_error ("before submitting a bug.  These pages explain the proper");
+-  log_error ("process and the information we find helpful for debugging..");
++  log_error ("This version of ISC DHCP is based on the release available");
++  log_error ("on ftp.isc.org. Features have been added and other changes");
++  log_error ("have been made to the base software release in order to make");
++  log_error ("it work better with this distribution.");
++  log_error ("%s", "");
++  log_error ("Please report issues with this software via: ");
++  log_error ("%s", bug_report_url());
+   log_error ("%s", "");
+   log_error ("exiting.");
+ 
diff --git a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch b/dhcp/patches/0004-dhcp-dhclient-options.patch
similarity index 72%
rename from dhcp/patches/dhcp-4.2.4-dhclient-options.patch
rename to dhcp/patches/0004-dhcp-dhclient-options.patch
index 40c3271..8f0dfe9 100644
--- a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch
+++ b/dhcp/patches/0004-dhcp-dhclient-options.patch
@@ -1,14 +1,48 @@ 
-diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
---- dhcp-4.2.1b1/client/dhclient.8.man	2010-07-14 22:09:34.000000000 +0200
-+++ dhcp-4.2.1b1/client/dhclient.8	2011-01-27 18:19:07.000000000 +0100
-@@ -115,6 +115,33 @@ dhclient - Dynamic Host Configuration Pr
+diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:06:13.485470579 +0200
+@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
+ 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
+ 	 */
+ 	top_level_config.requested_lease = 7200;
++	top_level_config.bootp_broadcast_always = 0;
+ 
+ 	group_allocate (&top_level_config.on_receipt, MDL);
+ 	if (!top_level_config.on_receipt)
+@@ -394,7 +395,8 @@ void read_client_leases ()
+ 	interface-declaration |
+ 	LEASE client-lease-statement |
+ 	ALIAS client-lease-statement |
+-	KEY key-definition */
++	KEY key-definition |
++	BOOTP_BROADCAST_ALWAYS */
+ 
+ void parse_client_statement (cfile, ip, config)
+ 	struct parse *cfile;
+@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip,
+ 		parse_lease_id_format(cfile);
+ 		break;
+ 
++	      case BOOTP_BROADCAST_ALWAYS:
++		token = next_token(&val, (unsigned*)0, cfile);
++		config -> bootp_broadcast_always = 1;
++		parse_semi (cfile);
++		return;
++
+ 
+ 	      default:
+ 		lose = 0;
+diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
+--- dhcp-4.3.4/client/dhclient.8.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/dhclient.8	2016-04-29 11:59:50.446590077 +0200
+@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr
  .B -w
  ]
  [
 +.B -B
 +]
 +[
-+.B -I
++.B -C
 +.I dhcp-client-identifier
 +]
 +[
@@ -24,18 +58,18 @@  diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +.I vendor-class-identifier
 +]
 +[
-+.B -R
++.B --request-options
 +.I request-option-list
 +]
 +[
-+.B -timeout
++.B --timeout
 +.I timeout
 +]
 +[
  .B -v
  ]
  [
-@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc
+@@ -289,6 +316,69 @@ not to exit when it doesn't find any suc
  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.
@@ -46,7 +80,7 @@  diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +broadcast replies.
 +
 +.TP
-+.BI \-I\ <dhcp-client-identifier>
++.BI \-C\ <dhcp-client-identifier>
 +Specify the dhcp-client-identifier option to send to the DHCP server.
 +
 +.TP
@@ -73,7 +107,7 @@  diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +Specify the vendor-class-identifier option to send to the DHCP server.
 +
 +.TP
-+.BI \-R\ <option>[,<option>...]
++.BI \--request-options\ <option>[,<option>...]
 +Specify the list of options the client is to request from the server.  The
 +option list must be a single string consisting of option names separated
 +by at least one command and optional space characters.  The default option
@@ -87,16 +121,16 @@  diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
 +    nis-domain, nis-servers, ntp-servers, interface-mtu
 +
 +.TP
-+.B -R
++.B --request-options
 +option does not append options to the default request, it overrides the
 +default request list.  Keep this in mind if you want to request an
 +additional option besides the default request list.  You will have to
 +specify all option names for the
-+.B -R
++.B --request-options
 +parameter.
 +
 +.TP
-+.BI \-timeout\ <timeout>
++.BI \--timeout\ <timeout>
 +Specify the time after which
 +.B dhclient
 +will decide that no DHCP servers can be contacted when no responses have been
@@ -105,45 +139,11 @@  diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
  .TP
  .BI \-n
  Do not configure any interfaces.  This is most likely to be useful in
-diff -up dhcp-4.2.4-P2/client/clparse.c.options dhcp-4.2.4-P2/client/clparse.c
---- dhcp-4.2.4-P2/client/clparse.c.options	2012-08-24 21:11:21.000000000 +0200
-+++ dhcp-4.2.4-P2/client/clparse.c	2012-09-26 10:34:27.140049896 +0200
-@@ -154,6 +154,7 @@ isc_result_t read_client_conf ()
- 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
- 	 */
- 	top_level_config.requested_lease = 7200;
-+	top_level_config.bootp_broadcast_always = 0;
- 
- 	group_allocate (&top_level_config.on_receipt, MDL);
- 	if (!top_level_config.on_receipt)
-@@ -320,7 +321,8 @@ void read_client_leases ()
- 	interface-declaration |
- 	LEASE client-lease-statement |
- 	ALIAS client-lease-statement |
--	KEY key-definition */
-+	KEY key-definition |
-+	BOOTP_BROADCAST_ALWAYS */
- 
- void parse_client_statement (cfile, ip, config)
- 	struct parse *cfile;
-@@ -739,6 +741,12 @@ void parse_client_statement (cfile, ip,
- 		parse_reject_statement (cfile, config);
- 		return;
- 
-+	      case BOOTP_BROADCAST_ALWAYS:
-+		token = next_token(&val, (unsigned*)0, cfile);
-+		config -> bootp_broadcast_always = 1;
-+		parse_semi (cfile);
-+		return;
-+
- 	      default:
- 		lose = 0;
- 		stmt = (struct executable_statement *)0;
-diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
---- dhcp-4.2.4-P2/client/dhclient.c.options	2012-08-28 04:13:03.000000000 +0200
-+++ dhcp-4.2.4-P2/client/dhclient.c	2012-09-26 10:36:10.396967531 +0200
-@@ -39,6 +39,12 @@
- #include <limits.h>
+diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.options	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:12:14.182364093 +0200
+@@ -40,6 +40,12 @@
+ #include <isc/file.h>
  #include <dns/result.h>
  
 +/*
@@ -155,20 +155,34 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  TIME default_lease_time = 43200; /* 12 hours... */
  TIME max_lease_time = 86400; /* 24 hours... */
  
-@@ -87,6 +93,9 @@ int wanted_ia_na = -1;		/* the absolute
- int wanted_ia_ta = 0;
- int wanted_ia_pd = 0;
- char *mockup_relay = NULL;
+@@ -100,6 +106,10 @@ char *mockup_relay = NULL;
+ 
+ char *progname = NULL;
+ 
 +int bootp_broadcast_always = 0;
 +
-+extern u_int32_t default_requested_options[];
++extern struct option *default_requested_options[];
++
+ void run_stateless(int exit_mode, u_int16_t port);
+ 
+ static isc_result_t write_duid(struct data_string *duid);
+@@ -177,7 +187,11 @@ usage(const char *sfmt, const char *sarg
+ 		  "                [-s server-addr] [-cf config-file]\n"
+ 		  "                [-df duid-file] [-lf lease-file]\n"
+ 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
+-		  "                [-sf script-file] [interface]*",
++		  "                [-sf script-file] [interface]*\n"
++		  "                [-C <dhcp-client-identifier>] [-B]\n"
++		  "                [-H <host-name> | -F <fqdn.fqdn>] [--timeout <timeout>]\n"
++		  "                [-V <vendor-class-identifier>]\n"
++		  "                [--request-options <request option list>]",
+ 		  isc_file_basename(progname));
+ }
  
- void run_stateless(int exit_mode);
+@@ -214,6 +228,16 @@ main(int argc, char **argv) {
+ 	progname = argv[0];
+ #endif
  
-@@ -123,6 +132,15 @@ main(int argc, char **argv) {
- 	int local_family_set = 0;
- #endif /* DHCPv6 */
- 	char *s;
 +	char *dhcp_client_identifier_arg = NULL;
 +	char *dhcp_host_name_arg = NULL;
 +	char *dhcp_fqdn_arg = NULL;
@@ -178,21 +192,22 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +	int timeout_arg = 0;
 +	char *arg_conf = NULL;
 +	int arg_conf_len = 0;
- 
++
  	/* Initialize client globals. */
  	memset(&default_duid, 0, sizeof(default_duid));
-@@ -310,6 +328,88 @@ main(int argc, char **argv) {
- 		} else if (!strcmp(argv[i], "--version")) {
- 			log_info("isc-dhclient-%s", PACKAGE_VERSION);
+ 
+@@ -431,6 +455,88 @@ main(int argc, char **argv) {
+ 					 strlen(PACKAGE_VERSION)));
+ 			IGNORE_RET(write(STDERR_FILENO, "\n", 1));
  			exit(0);
-+		} else if (!strcmp(argv[i], "-I")) {
++		} else if (!strcmp(argv[i], "-C")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
 +			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
-+				log_error("-I option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
++				log_error("-C option dhcp-client-identifier string \"%s\" is too long - maximum length is: %d", argv[i], DHCP_MAX_OPTION_LEN-1);
 +				exit(1);
 +			}
 +
@@ -201,7 +216,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			bootp_broadcast_always = 1;
 +		} else if (!strcmp(argv[i], "-H")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -218,7 +233,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			dhcp_host_name_arg = argv[i];
 +		} else if (!strcmp(argv[i], "-F")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -238,9 +253,9 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +
 +			dhcp_fqdn_arg = argv[i];
-+		} else if (!strcmp(argv[i], "-timeout")) {
++		} else if (!strcmp(argv[i], "--timeout")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -250,7 +265,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +		} else if (!strcmp(argv[i], "-V")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
@@ -260,17 +275,17 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			}
 +
 +			dhcp_vendor_class_identifier_arg = argv[i];
-+		} else if (!strcmp(argv[i], "-R")) {
++		} else if (!strcmp(argv[i], "--request-options")) {
 +			if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
-+				usage();
++				usage(use_noarg, argv[i-1]);
 +				exit(1);
 +			}
 +
 +			dhclient_request_options = argv[i];
  		} else if (argv[i][0] == '-') {
- 		    usage();
+ 			usage("Unknown command: %s", argv[i]);
  		} else if (interfaces_requested < 0) {
-@@ -484,6 +584,156 @@ main(int argc, char **argv) {
+@@ -630,6 +736,156 @@ main(int argc, char **argv) {
  	/* Parse the dhclient.conf file. */
  	read_client_conf();
  
@@ -279,7 +294,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
 +
 +		if ((arg_conf == 0) || (arg_conf_len <= 0))
-+			log_fatal("Unable to send -I option dhcp-client-identifier");
++			log_fatal("Unable to send -C option dhcp-client-identifier");
 +	}
 +
 +	if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
@@ -323,14 +338,14 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			arg_conf_len = asprintf(&arg_conf,  "timeout %d;", timeout_arg);
 +
 +			if ((arg_conf == 0) || (arg_conf_len <= 0))
-+				log_fatal("Unable to process -timeout timeout argument");
++				log_fatal("Unable to process --timeout timeout argument");
 +		} else {
 +			char *last_arg_conf = arg_conf;
 +			arg_conf = NULL;
 +			arg_conf_len = asprintf(&arg_conf, "%s\ntimeout %d;", last_arg_conf, timeout_arg);
 +
 +			if ((arg_conf == 0) || (arg_conf_len == 0))
-+				log_fatal("Unable to process -timeout timeout argument");
++				log_fatal("Unable to process --timeout timeout argument");
 +
 +			free(last_arg_conf);
 +		}
@@ -359,14 +374,14 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +			arg_conf_len = asprintf(&arg_conf,  "request %s;", dhclient_request_options);
 +
 +			if ((arg_conf == 0) || (arg_conf_len <= 0))
-+				log_fatal("Unable to parse -R <request options list> argument");
++				log_fatal("Unable to parse --request-options <request options list> argument");
 +		} else {
 +			char *last_arg_conf = arg_conf;
 +			arg_conf = NULL;
 +			arg_conf_len = asprintf(&arg_conf, "%s\nrequest %s;", last_arg_conf, dhclient_request_options);
 +
 +			if ((arg_conf == 0)  || (arg_conf_len <= 0))
-+				log_fatal("Unable to parse -R <request options list> argument");
++				log_fatal("Unable to parse --request-options <request options list> argument");
 +
 +			free(last_arg_conf);
 +		}
@@ -376,7 +391,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		if (arg_conf_len == 0)
 +			if ((arg_conf_len = strlen(arg_conf)) == 0)
 +				/* huh ? cannot happen ! */
-+				log_fatal("Unable to process -I/-H/-F/-timeout/-V/-R configuration arguments");
++				log_fatal("Unable to process -C/-H/-F/--timeout/-V/--request-options configuration arguments");
 +
 +		/* parse the extra dhclient.conf configuration arguments
 +		 * into top level config: */
@@ -384,10 +399,10 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		const char *val = NULL;
 +		int token;
 +
-+		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
++		status = new_parse(&cfile, -1, arg_conf, arg_conf_len, "extra dhclient -C/-H/-F/--timeout/-V/--request-options configuration arguments", 0);
 +
 +		if ((status != ISC_R_SUCCESS) || (cfile -> warnings_occurred))
-+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
 +		/* more detailed parse failures will be logged */
 +
 +		do {
@@ -399,7 +414,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
 +		} while (1);
 +
 +		if (cfile -> warnings_occurred)
-+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R configuration arguments !");
++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/--request-options configuration arguments !");
 +		end_parse(&cfile);
 +
 +		if (timeout_arg) {
@@ -427,18 +442,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  	/* Parse the lease database. */
  	read_client_leases();
  
-@@ -715,6 +965,10 @@ static void usage()
- 		  "                [-s server-addr] [-cf config-file] "
- 		  "[-lf lease-file]\n"
- 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
-+		  "                [-I <dhcp-client-identifier>] [-B]\n"
-+		  "                [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
-+		  "                [-V <vendor-class-identifier>]\n"
-+		  "                [-R <request option list>]\n"
- 		  "                [-sf script-file] [interface]");
- }
- 
-@@ -2421,7 +2675,8 @@ void make_discover (client, lease)
+@@ -3067,7 +3323,8 @@ void make_discover (client, lease)
  	client -> packet.xid = random ();
  	client -> packet.secs = 0; /* filled in by send_discover. */
  
@@ -448,7 +452,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  		client -> packet.flags = 0;
  	else
  		client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2505,7 +2760,9 @@ void make_request (client, lease)
+@@ -3152,7 +3409,9 @@ void make_request (client, lease)
  	} else {
  		memset (&client -> packet.ciaddr, 0,
  			sizeof client -> packet.ciaddr);
@@ -459,7 +463,7 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  			client -> packet.flags = 0;
  		else
  			client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2567,7 +2824,8 @@ void make_decline (client, lease)
+@@ -3215,7 +3474,8 @@ void make_decline (client, lease)
  	client -> packet.hops = 0;
  	client -> packet.xid = client -> xid;
  	client -> packet.secs = 0; /* Filled in by send_request. */
@@ -469,41 +473,41 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-P2/client/dhclient.c
  		client -> packet.flags = 0;
  	else
  		client -> packet.flags = htons (BOOTP_BROADCAST);
-diff -up dhcp-4.2.4-P2/common/conflex.c.options dhcp-4.2.4-P2/common/conflex.c
---- dhcp-4.2.4-P2/common/conflex.c.options	2012-08-28 04:13:03.000000000 +0200
-+++ dhcp-4.2.4-P2/common/conflex.c	2012-09-26 10:34:27.142049876 +0200
-@@ -808,6 +808,8 @@ intern(char *atom, enum dhcp_token dfv)
- 			return BALANCE;
- 		if (!strcasecmp (atom + 1, "ound"))
- 			return BOUND;
+diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
+--- dhcp-4.3.4/common/conflex.c.options	2016-04-29 11:59:50.448590077 +0200
++++ dhcp-4.3.4/common/conflex.c	2016-04-29 12:13:23.637342420 +0200
+@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
+ 		if (!strcasecmp(atom+1, "ig-endian")) {
+ 			return TOKEN_BIG_ENDIAN;
+ 		}
 +		if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
 +			return BOOTP_BROADCAST_ALWAYS;
  		break;
  	      case 'c':
  		if (!strcasecmp(atom + 1, "ase"))
-diff -up dhcp-4.2.4-P2/includes/dhcpd.h.options dhcp-4.2.4-P2/includes/dhcpd.h
---- dhcp-4.2.4-P2/includes/dhcpd.h.options	2012-08-28 04:13:22.000000000 +0200
-+++ dhcp-4.2.4-P2/includes/dhcpd.h	2012-09-26 10:34:27.143049865 +0200
-@@ -1153,6 +1153,9 @@ struct client_config {
- 	int do_forward_update;		/* If nonzero, and if we have the
- 					   information we need, update the
- 					   A record for the address we get. */
+diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.options	2016-04-29 11:59:50.448590077 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:14:05.361329401 +0200
+@@ -1246,6 +1246,9 @@ struct client_config {
+ 
+ 	int lease_id_format;		/* format for IDs in lease file,
+ 					   TOKEN_OCTAL or TOKEN_HEX */
 +
 +	int bootp_broadcast_always;	/* If nonzero, always set the BOOTP_BROADCAST
 +					   flag in requests */
  };
  
  /* Per-interface state used in the dhcp client... */
-diff -up dhcp-4.2.4-P2/includes/dhctoken.h.options dhcp-4.2.4-P2/includes/dhctoken.h
---- dhcp-4.2.4-P2/includes/dhctoken.h.options	2012-08-28 04:13:03.000000000 +0200
-+++ dhcp-4.2.4-P2/includes/dhctoken.h	2012-09-26 10:34:27.144049854 +0200
-@@ -364,7 +364,8 @@ enum dhcp_token {
- 	GETHOSTBYNAME = 665,
- 	PRIMARY6 = 666,
- 	SECONDARY6 = 667,
--	TOKEN_INFINIBAND = 668
-+	TOKEN_INFINIBAND = 668,
-+	BOOTP_BROADCAST_ALWAYS = 669
+diff -up dhcp-4.3.4/includes/dhctoken.h.options dhcp-4.3.4/includes/dhctoken.h
+--- dhcp-4.3.4/includes/dhctoken.h.options	2016-04-29 11:59:50.449590076 +0200
++++ dhcp-4.3.4/includes/dhctoken.h	2016-04-29 12:15:03.073300846 +0200
+@@ -373,7 +373,8 @@ enum dhcp_token {
+ 	TOKEN_BIG_ENDIAN = 675,
+ 	LEASE_ID_FORMAT = 676,
+ 	TOKEN_HEX = 677,
+-	TOKEN_OCTAL = 678
++	TOKEN_OCTAL = 678,
++	BOOTP_BROADCAST_ALWAYS = 679
  };
  
  #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
diff --git a/dhcp/patches/dhcp-4.2.0-release-by-ifup.patch b/dhcp/patches/0005-dhcp-release-by-ifup.patch
similarity index 88%
rename from dhcp/patches/dhcp-4.2.0-release-by-ifup.patch
rename to dhcp/patches/0005-dhcp-release-by-ifup.patch
index 300c5f3..677eb5c 100644
--- a/dhcp/patches/dhcp-4.2.0-release-by-ifup.patch
+++ b/dhcp/patches/0005-dhcp-release-by-ifup.patch
@@ -1,8 +1,8 @@ 
-diff -up dhcp-4.2.0/client/dhclient.c.ifup dhcp-4.2.0/client/dhclient.c
---- dhcp-4.2.0/client/dhclient.c.ifup	2010-07-21 13:30:10.000000000 +0200
-+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 13:37:03.000000000 +0200
-@@ -497,9 +497,81 @@ main(int argc, char **argv) {
- 					kill(oldpid, SIGTERM);
+diff -up dhcp-4.3.0a1/client/dhclient.c.ifup dhcp-4.3.0a1/client/dhclient.c
+--- dhcp-4.3.0a1/client/dhclient.c.ifup	2013-12-19 14:53:08.817760677 +0100
++++ dhcp-4.3.0a1/client/dhclient.c	2013-12-19 15:05:16.290518574 +0100
+@@ -521,9 +521,81 @@ main(int argc, char **argv) {
+ 				}
  			}
  			fclose(pidfd);
 +		} else {
diff --git a/dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch b/dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
similarity index 56%
rename from dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch
rename to dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
index 81bec7b..645f931 100644
--- a/dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch
+++ b/dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
---- dhcp-4.2.0/client/dhclient.c.backoff	2010-07-21 13:37:03.000000000 +0200
-+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 13:38:31.000000000 +0200
-@@ -1208,6 +1208,8 @@ void state_init (cpp)
+diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.backoff	2016-04-29 12:16:26.976245611 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:16:26.979245609 +0200
+@@ -1423,6 +1423,8 @@ void state_init (cpp)
  	void *cpp;
  {
  	struct client_state *client = cpp;
@@ -10,7 +10,7 @@  diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
  
  	ASSERT_STATE(state, S_INIT);
  
-@@ -1220,9 +1222,18 @@ void state_init (cpp)
+@@ -1435,9 +1437,18 @@ void state_init (cpp)
  	client -> first_sending = cur_time;
  	client -> interval = client -> config -> initial_interval;
  
@@ -32,15 +32,15 @@  diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
  }
  
  /*
-@@ -1501,6 +1512,7 @@ void bind_lease (client)
- 		send_decline (client);
- 		destroy_client_lease (client -> new);
- 		client -> new = (struct client_lease *)0;
-+		client -> state = S_DECLINED;
- 		state_init (client);
- 		return;
- 	}
-@@ -3711,6 +3723,7 @@ void client_location_changed ()
+@@ -1734,6 +1745,7 @@ void bind_lease (client)
+ 					 "try (declined).  Exiting.");
+ 			exit(2);
+ 		} else {
++			client -> state = S_DECLINED;
+ 			state_init(client);
+ 			return;
+ 		}
+@@ -4626,6 +4638,7 @@ void client_location_changed ()
  			      case S_INIT:
  			      case S_REBINDING:
  			      case S_STOPPED:
@@ -48,10 +48,10 @@  diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
  				break;
  			}
  			client -> state = S_INIT;
-diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-4.2.0/includes/dhcpd.h
---- dhcp-4.2.0/includes/dhcpd.h.backoff	2010-07-21 13:29:05.000000000 +0200
-+++ dhcp-4.2.0/includes/dhcpd.h	2010-07-21 13:38:31.000000000 +0200
-@@ -1056,7 +1056,8 @@ enum dhcp_state {
+diff -up dhcp-4.3.4/includes/dhcpd.h.backoff dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.backoff	2016-04-29 12:16:26.980245609 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:17:30.893203533 +0200
+@@ -1171,7 +1171,8 @@ enum dhcp_state {
  	S_BOUND = 5,
  	S_RENEWING = 6,
  	S_REBINDING = 7,
@@ -60,4 +60,4 @@  diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-4.2.0/includes/dhcpd.h
 +	S_DECLINED = 9
  };
  
- /* Authentication and BOOTP policy possibilities (not all values work
+ /* Possible pending client operations. */
diff --git a/dhcp/patches/dhcp-4.2.4-unicast-bootp.patch b/dhcp/patches/0007-dhcp-unicast-bootp.patch
similarity index 72%
rename from dhcp/patches/dhcp-4.2.4-unicast-bootp.patch
rename to dhcp/patches/0007-dhcp-unicast-bootp.patch
index 69ab4c8..abf89f2 100644
--- a/dhcp/patches/dhcp-4.2.4-unicast-bootp.patch
+++ b/dhcp/patches/0007-dhcp-unicast-bootp.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
---- dhcp-4.2.4b1/server/bootp.c.unicast	2012-04-10 23:27:06.000000000 +0200
-+++ dhcp-4.2.4b1/server/bootp.c	2012-04-16 17:28:42.095919022 +0200
-@@ -59,6 +59,7 @@ void bootp (packet)
+diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
+--- dhcp-4.3.4/server/bootp.c.unicast	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/server/bootp.c	2016-05-02 15:09:40.023243008 +0200
+@@ -52,6 +52,7 @@ void bootp (packet)
  	char msgbuf [1024];
  	int ignorep;
  	int peer_has_leases = 0;
@@ -9,7 +9,7 @@  diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
  
  	if (packet -> raw -> op != BOOTREQUEST)
  		return;
-@@ -74,7 +75,7 @@ void bootp (packet)
+@@ -67,7 +68,7 @@ void bootp (packet)
  		 ? inet_ntoa (packet -> raw -> giaddr)
  		 : packet -> interface -> name);
  
@@ -18,7 +18,7 @@  diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
  		log_info ("%s: network unknown", msgbuf);
  		return;
  	}
-@@ -399,6 +400,15 @@ void bootp (packet)
+@@ -428,6 +429,15 @@ void bootp (packet)
  
  			goto out;
  		}
@@ -34,18 +34,18 @@  diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
  
  	/* If it comes from a client that already knows its address
  	   and is not requesting a broadcast response, and we can
-diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
---- dhcp-4.2.4b1/server/dhcp.c.unicast	2012-03-09 12:28:12.000000000 +0100
-+++ dhcp-4.2.4b1/server/dhcp.c	2012-04-16 17:26:55.067418285 +0200
-@@ -4299,6 +4299,7 @@ int locate_network (packet)
+diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
+--- dhcp-4.3.4/server/dhcp.c.unicast	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/server/dhcp.c	2016-05-02 15:10:13.255267511 +0200
+@@ -5132,6 +5132,7 @@ int locate_network (packet)
  	struct data_string data;
  	struct subnet *subnet = (struct subnet *)0;
  	struct option_cache *oc;
 +	int norelay = 0;
  
- 	/* See if there's a Relay Agent Link Selection Option, or a
- 	 * Subnet Selection Option.  The Link-Select and Subnet-Select
-@@ -4314,12 +4315,24 @@ int locate_network (packet)
+ #if defined(DHCPv6) && defined(DHCP4o6)
+ 	if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
+@@ -5153,12 +5154,24 @@ int locate_network (packet)
  	   from the interface, if there is one.   If not, fail. */
  	if (!oc && !packet -> raw -> giaddr.s_addr) {
  		if (packet -> interface -> shared_network) {
@@ -75,7 +75,7 @@  diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
  	}
  
  	/* If there's an option indicating link connection, and it's valid,
-@@ -4342,7 +4355,10 @@ int locate_network (packet)
+@@ -5185,7 +5198,10 @@ int locate_network (packet)
  		data_string_forget (&data, MDL);
  	} else {
  		ia.len = 4;
@@ -87,7 +87,7 @@  diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
  	}
  
  	/* If we know the subnet on which the IP address lives, use it. */
-@@ -4350,7 +4366,10 @@ int locate_network (packet)
+@@ -5193,7 +5209,10 @@ int locate_network (packet)
  		shared_network_reference (&packet -> shared_network,
  					  subnet -> shared_network, MDL);
  		subnet_dereference (&subnet, MDL);
diff --git a/dhcp/patches/dhcp-4.2.0-default-requested-options.patch b/dhcp/patches/0008-dhcp-default-requested-options.patch
similarity index 76%
rename from dhcp/patches/dhcp-4.2.0-default-requested-options.patch
rename to dhcp/patches/0008-dhcp-default-requested-options.patch
index fea8a4b..f57fa1f 100644
--- a/dhcp/patches/dhcp-4.2.0-default-requested-options.patch
+++ b/dhcp/patches/0008-dhcp-default-requested-options.patch
@@ -1,16 +1,16 @@ 
-diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
---- dhcp-4.2.0/client/clparse.c.requested	2010-07-21 13:29:05.000000000 +0200
-+++ dhcp-4.2.0/client/clparse.c	2010-07-21 13:50:29.000000000 +0200
-@@ -37,7 +37,7 @@
+diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.requested	2016-04-29 12:18:50.157151352 +0200
++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:19:22.235137243 +0200
+@@ -31,7 +31,7 @@
  
  struct client_config top_level_config;
  
 -#define NUM_DEFAULT_REQUESTED_OPTS	9
 +#define NUM_DEFAULT_REQUESTED_OPTS	14
- struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
+ /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
+ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
  
- static void parse_client_default_duid(struct parse *cfile);
-@@ -111,6 +111,31 @@ isc_result_t read_client_conf ()
+@@ -116,6 +116,31 @@ isc_result_t read_client_conf ()
  	option_code_hash_lookup(&default_requested_options[8],
  				dhcpv6_universe.code_hash, &code, 0, MDL);
  
diff --git a/dhcp/patches/dhcp-4.2.5-manpages.patch b/dhcp/patches/0009-dhcp-manpages.patch
similarity index 70%
rename from dhcp/patches/dhcp-4.2.5-manpages.patch
rename to dhcp/patches/0009-dhcp-manpages.patch
index fb931bc..24d6972 100644
--- a/dhcp/patches/dhcp-4.2.5-manpages.patch
+++ b/dhcp/patches/0009-dhcp-manpages.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.conf.5
---- dhcp-4.2.5b1/client/dhclient.conf.5.man	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/client/dhclient.conf.5	2012-12-17 12:49:52.818451301 +0100
-@@ -202,7 +202,8 @@ responding to the client send the client
+diff -up dhcp-4.3.5b1/client/dhclient.conf.5.man dhcp-4.3.5b1/client/dhclient.conf.5
+--- dhcp-4.3.5b1/client/dhclient.conf.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/client/dhclient.conf.5	2016-09-12 17:09:23.243313514 +0200
+@@ -228,7 +228,8 @@ responding to the client send the client
  options.  Only the option names should be specified in the request
  statement - not option parameters.  By default, the DHCPv4 client
  requests the subnet-mask, broadcast-address, time-offset, routers,
@@ -11,7 +11,7 @@  diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.co
  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.
-@@ -688,6 +689,17 @@ know the DHCP service(s) anycast MAC add
+@@ -736,6 +737,17 @@ know the DHCP service(s) anycast MAC add
  client.  The \fIlink-type\fR and \fImac-address\fR parameters are configured
  in a similar manner to the \fBhardware\fR statement.
  .PP
@@ -27,21 +27,12 @@  diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-4.2.5b1/client/dhclient.co
 +on IBM s390 Linux guests.
 +.PP
  .SH SAMPLE
- The following configuration file is used on a laptop running NetBSD
- 1.3.  The laptop has an IP alias of 192.5.5.213, and has one
-@@ -713,7 +725,7 @@ interface "ep0" {
-     supersede domain-search "fugue.com", "rc.vix.com", "home.vix.com";
-     prepend domain-name-servers 127.0.0.1;
-     request subnet-mask, broadcast-address, time-offset, routers,
--	    domain-name, domain-name-servers, host-name;
-+	    domain-search, domain-name, domain-name-servers, host-name;
-     require subnet-mask, domain-name-servers;
-     script "CLIENTBINDIR/dhclient-script";
-     media "media 10baseT/UTP", "media 10base2/BNC";
-diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-script.8
---- dhcp-4.2.5b1/client/dhclient-script.8.man	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/client/dhclient-script.8	2012-12-17 12:47:48.410130998 +0100
-@@ -48,7 +48,7 @@ customizations are needed, they should b
+ The following configuration file was used on a laptop running NetBSD
+ 1.3, though the domains have been modified.
+diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-4.3.5b1/client/dhclient-script.8
+--- dhcp-4.3.5b1/client/dhclient-script.8.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/client/dhclient-script.8	2016-09-12 17:08:09.516254385 +0200
+@@ -45,7 +45,7 @@ customizations are needed, they should b
  exit hooks provided (see HOOKS for details).   These hooks will allow the
  user to override the default behaviour of the client in creating a
  .B /etc/resolv.conf
@@ -50,7 +41,7 @@  diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-
  .PP
  No standard client script exists for some operating systems, even though
  the actual client may work, so a pioneering user may well need to create
-@@ -92,6 +92,26 @@ present.   The
+@@ -89,6 +89,26 @@ present.   The
  .B ETCDIR/dhclient-exit-hooks
  script can modify the valid of exit_status to change the exit status
  of dhclient-script.
@@ -77,10 +68,10 @@  diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-4.2.5b1/client/dhclient-
  .SH OPERATION
  When dhclient needs to invoke the client configuration script, it
  defines a set of variables in the environment, and then invokes
-diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-4.2.5b1/common/dhcp-options.5
---- dhcp-4.2.5b1/common/dhcp-options.5.man	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 12:47:48.411130985 +0100
-@@ -914,6 +914,21 @@ classless IP routing - it does not inclu
+diff -up dhcp-4.3.5b1/common/dhcp-options.5.man dhcp-4.3.5b1/common/dhcp-options.5
+--- dhcp-4.3.5b1/common/dhcp-options.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/common/dhcp-options.5	2016-09-12 17:08:09.517254386 +0200
+@@ -1013,6 +1013,21 @@ classless IP routing - it does not inclu
  classless IP routing is now the most widely deployed routing standard,
  this option is virtually useless, and is not implemented by any of the
  popular DHCP clients, for example the Microsoft DHCP client.
@@ -102,10 +93,10 @@  diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-4.2.5b1/common/dhcp-options
  .RE
  .PP
  .nf
-diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
---- dhcp-4.2.5b1/server/dhcpd.conf.5.man	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/server/dhcpd.conf.5	2012-12-17 12:50:52.117650542 +0100
-@@ -519,6 +519,9 @@ pool {
+diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-4.3.5b1/server/dhcpd.conf.5
+--- dhcp-4.3.5b1/server/dhcpd.conf.5.man	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/dhcpd.conf.5	2016-09-12 17:10:11.205351980 +0200
+@@ -528,6 +528,9 @@ pool {
  };
  .fi
  .PP
@@ -115,19 +106,19 @@  diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
  The  server currently  does very  little  sanity checking,  so if  you
  configure it wrong, it will just  fail in odd ways.  I would recommend
  therefore that you either do  failover or don't do failover, but don't
-@@ -533,9 +536,9 @@ primary server might look like this:
+@@ -542,9 +545,9 @@ primary server might look like this:
  failover peer "foo" {
    primary;
-   address anthrax.rc.vix.com;
+   address anthrax.rc.example.com;
 -  port 519;
 +  port 647;
-   peer address trantor.rc.vix.com;
+   peer address trantor.rc.example.com;
 -  peer port 520;
 +  peer port 847;
    max-response-delay 60;
    max-unacked-updates 10;
    mclt 3600;
-@@ -1318,7 +1321,7 @@ the zone containing PTR records - for IS
+@@ -1246,7 +1249,7 @@ the zone containing PTR records - for IS
  .PP
  .nf
  key DHCP_UPDATER {
@@ -136,7 +127,7 @@  diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
    secret pRP5FapFoJ95JEL06sv4PQ==;
  };
  
-@@ -1341,7 +1344,7 @@ dhcpd.conf file:
+@@ -1269,7 +1272,7 @@ dhcpd.conf file:
  .PP
  .nf
  key DHCP_UPDATER {
@@ -145,7 +136,7 @@  diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-4.2.5b1/server/dhcpd.conf.5
    secret pRP5FapFoJ95JEL06sv4PQ==;
  };
  
-@@ -2555,7 +2558,8 @@ statement
+@@ -2742,7 +2745,8 @@ statement
  The \fInext-server\fR statement is used to specify the host address of
  the server from which the initial boot file (specified in the
  \fIfilename\fR statement) is to be loaded.  \fIServer-name\fR should
diff --git a/dhcp/patches/dhcp-4.2.4-paths.patch b/dhcp/patches/0010-dhcp-paths.patch
similarity index 57%
rename from dhcp/patches/dhcp-4.2.4-paths.patch
rename to dhcp/patches/0010-dhcp-paths.patch
index 52647ac..59a711d 100644
--- a/dhcp/patches/dhcp-4.2.4-paths.patch
+++ b/dhcp/patches/0010-dhcp-paths.patch
@@ -1,6 +1,6 @@ 
-diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf
---- dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths  2012-08-24 21:11:21.000000000 +0200
-+++ dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf        2012-10-26 18:10:08.716560729 +0200
+diff -up dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf
+--- dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths	2013-11-07 20:15:08.000000000 +0100
++++ dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf	2013-12-19 15:34:16.262247711 +0100
 @@ -42,7 +42,7 @@ option dhcp6.domain-search "test.example
  option dhcp6.info-refresh-time 21600;
  
@@ -10,10 +10,10 @@  diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.2.4-P2/doc/ex
  
  # Static definition (must be global)
  host myclient {
-diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-4.2.4b1/includes/dhcpd.h
---- dhcp-4.2.4b1/includes/dhcpd.h.paths	2012-04-18 11:12:34.000000000 +0200
-+++ dhcp-4.2.4b1/includes/dhcpd.h	2012-04-18 11:14:38.541272405 +0200
-@@ -1420,7 +1420,7 @@ typedef unsigned char option_mask [16];
+diff -up dhcp-4.3.0a1/includes/dhcpd.h.paths dhcp-4.3.0a1/includes/dhcpd.h
+--- dhcp-4.3.0a1/includes/dhcpd.h.paths	2013-12-19 15:34:16.253247840 +0100
++++ dhcp-4.3.0a1/includes/dhcpd.h	2013-12-19 15:34:16.263247697 +0100
+@@ -1429,7 +1429,7 @@ typedef unsigned char option_mask [16];
  #else /* !DEBUG */
  
  #ifndef _PATH_DHCPD_CONF
@@ -22,7 +22,7 @@  diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-4.2.4b1/includes/dhcpd.h
  #endif /* DEBUG */
  
  #ifndef _PATH_DHCPD_DB
-@@ -1442,11 +1442,11 @@ typedef unsigned char option_mask [16];
+@@ -1451,11 +1451,11 @@ typedef unsigned char option_mask [16];
  #endif /* DEBUG */
  
  #ifndef _PATH_DHCLIENT_CONF
diff --git a/dhcp/patches/dhcp-4.2.2-CLOEXEC.patch b/dhcp/patches/0011-dhcp-CLOEXEC.patch
similarity index 63%
rename from dhcp/patches/dhcp-4.2.2-CLOEXEC.patch
rename to dhcp/patches/0011-dhcp-CLOEXEC.patch
index 1f4538e..309a87c 100644
--- a/dhcp/patches/dhcp-4.2.2-CLOEXEC.patch
+++ b/dhcp/patches/0011-dhcp-CLOEXEC.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
---- dhcp-4.2.2b1/client/clparse.c.cloexec	2011-07-01 14:13:30.973887714 +0200
-+++ dhcp-4.2.2b1/client/clparse.c	2011-07-01 14:15:15.021580693 +0200
-@@ -246,7 +246,7 @@ int read_client_conf_file (const char *n
+diff -up dhcp-4.3.3b1/client/clparse.c.cloexec dhcp-4.3.3b1/client/clparse.c
+--- dhcp-4.3.3b1/client/clparse.c.cloexec	2015-08-10 10:46:20.264755543 +0200
++++ dhcp-4.3.3b1/client/clparse.c	2015-08-10 10:46:20.274755510 +0200
+@@ -247,7 +247,7 @@ int read_client_conf_file (const char *n
  	int token;
  	isc_result_t status;
  
@@ -10,7 +10,7 @@  diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
  		return uerr2isc (errno);
  
  	cfile = NULL;
-@@ -283,7 +283,7 @@ void read_client_leases ()
+@@ -323,7 +323,7 @@ void read_client_leases ()
  
  	/* Open the lease file.   If we can't open it, just return -
  	   we can safely trust the server to remember our state. */
@@ -19,10 +19,10 @@  diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
  		return;
  
  	cfile = NULL;
-diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
---- dhcp-4.2.2b1/client/dhclient.c.cloexec	2011-07-01 14:13:30.970887717 +0200
-+++ dhcp-4.2.2b1/client/dhclient.c	2011-07-01 14:16:51.485930388 +0200
-@@ -148,11 +148,11 @@ main(int argc, char **argv) {
+diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-4.3.3b1/client/dhclient.c
+--- dhcp-4.3.3b1/client/dhclient.c.cloexec	2015-08-10 10:46:20.260755556 +0200
++++ dhcp-4.3.3b1/client/dhclient.c	2015-08-10 10:46:20.275755506 +0200
+@@ -153,11 +153,11 @@ main(int argc, char **argv) {
  	/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
  	   2 (stderr) are open. To do this, we assume that when we
  	   open a file the lowest available file descriptor is used. */
@@ -37,16 +37,16 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  	if (fd == 2)
  		log_perror = 0; /* No sense logging to /dev/null. */
  	else if (fd != -1)
-@@ -506,7 +506,7 @@ main(int argc, char **argv) {
+@@ -519,7 +519,7 @@ main(int argc, char **argv) {
+ 		long temp;
  		int e;
  
- 		oldpid = 0;
 -		if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
 +		if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
  			e = fscanf(pidfd, "%ld\n", &temp);
  			oldpid = (pid_t)temp;
  
-@@ -548,7 +548,7 @@ main(int argc, char **argv) {
+@@ -574,7 +574,7 @@ main(int argc, char **argv) {
  					strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
  					sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
  
@@ -55,7 +55,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  						e = fscanf(pidfd, "%ld\n", &temp);
  						oldpid = (pid_t)temp;
  
-@@ -573,7 +573,7 @@ main(int argc, char **argv) {
+@@ -599,7 +599,7 @@ main(int argc, char **argv) {
  		int dhc_running = 0;
  		char procfn[256] = "";
  
@@ -64,7 +64,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  			if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
  				snprintf(procfn,256,"/proc/%u",dhcpid);
  				dhc_running = (access(procfn, F_OK) == 0);
-@@ -2995,7 +2995,7 @@ void rewrite_client_leases ()
+@@ -3120,7 +3120,7 @@ void rewrite_client_leases ()
  
  	if (leaseFile != NULL)
  		fclose (leaseFile);
@@ -73,7 +73,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  	if (leaseFile == NULL) {
  		log_error ("can't create %s: %m", path_dhclient_db);
  		return;
-@@ -3105,7 +3105,7 @@ write_duid(struct data_string *duid)
+@@ -3313,7 +3313,7 @@ write_duid(struct data_string *duid)
  		return DHCP_R_INVALIDARG;
  
  	if (leaseFile == NULL) {	/* XXX? */
@@ -82,7 +82,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  		if (leaseFile == NULL) {
  			log_error("can't create %s: %m", path_dhclient_db);
  			return ISC_R_IOERROR;
-@@ -3285,7 +3285,7 @@ int write_client_lease (client, lease, r
+@@ -3493,7 +3493,7 @@ int write_client_lease (client, lease, r
  		return 1;
  
  	if (leaseFile == NULL) {	/* XXX */
@@ -91,20 +91,20 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  		if (leaseFile == NULL) {
  			log_error ("can't create %s: %m", path_dhclient_db);
  			return 0;
-@@ -3772,9 +3772,9 @@ void go_daemon ()
- 	close(2);
+@@ -4011,9 +4011,9 @@ void go_daemon ()
+ 	(void) close(2);
  
  	/* Reopen them on /dev/null. */
--	open("/dev/null", O_RDWR);
--	open("/dev/null", O_RDWR);
--	open("/dev/null", O_RDWR);
-+	open("/dev/null", O_RDWR | O_CLOEXEC);
-+	open("/dev/null", O_RDWR | O_CLOEXEC);
-+	open("/dev/null", O_RDWR | O_CLOEXEC);
+-	(void) open("/dev/null", O_RDWR);
+-	(void) open("/dev/null", O_RDWR);
+-	(void) open("/dev/null", O_RDWR);
++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
  
  	write_client_pid_file ();
  
-@@ -3791,14 +3791,14 @@ void write_client_pid_file ()
+@@ -4030,14 +4030,14 @@ void write_client_pid_file ()
  		return;
  	}
  
@@ -121,10 +121,10 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
  	if (!pf) {
  		close(pfdesc);
  		log_error ("Can't fdopen %s: %m", path_dhclient_pid);
-diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
---- dhcp-4.2.2b1/common/bpf.c.cloexec	2011-07-01 14:13:30.976887712 +0200
-+++ dhcp-4.2.2b1/common/bpf.c	2011-07-01 14:13:31.030887673 +0200
-@@ -94,7 +94,7 @@ int if_register_bpf (info)
+diff -up dhcp-4.3.3b1/common/bpf.c.cloexec dhcp-4.3.3b1/common/bpf.c
+--- dhcp-4.3.3b1/common/bpf.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/common/bpf.c	2015-08-10 10:46:20.275755506 +0200
+@@ -95,7 +95,7 @@ int if_register_bpf (info)
  	for (b = 0; 1; b++) {
  		/* %Audit% 31 bytes max. %2004.06.17,Safe% */
  		sprintf(filename, BPF_FORMAT, b);
@@ -133,10 +133,10 @@  diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
  		if (sock < 0) {
  			if (errno == EBUSY) {
  				continue;
-diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
---- dhcp-4.2.2b1/common/dlpi.c.cloexec	2011-07-01 14:13:30.977887712 +0200
-+++ dhcp-4.2.2b1/common/dlpi.c	2011-07-01 14:13:31.032887673 +0200
-@@ -806,7 +806,7 @@ dlpiopen(const char *ifname) {
+diff -up dhcp-4.3.3b1/common/dlpi.c.cloexec dhcp-4.3.3b1/common/dlpi.c
+--- dhcp-4.3.3b1/common/dlpi.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/common/dlpi.c	2015-08-10 10:46:20.275755506 +0200
+@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
  	}
  	*dp = '\0';
  	
@@ -145,10 +145,10 @@  diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
  }
  
  /*
-diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
---- dhcp-4.2.2b1/common/nit.c.cloexec	2011-07-01 14:13:30.978887712 +0200
-+++ dhcp-4.2.2b1/common/nit.c	2011-07-01 14:13:31.033887672 +0200
-@@ -81,7 +81,7 @@ int if_register_nit (info)
+diff -up dhcp-4.3.3b1/common/nit.c.cloexec dhcp-4.3.3b1/common/nit.c
+--- dhcp-4.3.3b1/common/nit.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/common/nit.c	2015-08-10 10:46:20.275755506 +0200
+@@ -75,7 +75,7 @@ int if_register_nit (info)
  	struct strioctl sio;
  
  	/* Open a NIT device */
@@ -157,10 +157,10 @@  diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
  	if (sock < 0)
  		log_fatal ("Can't open NIT device for %s: %m", info -> name);
  
-diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
---- dhcp-4.2.2b1/common/resolv.c.cloexec	2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.2b1/common/resolv.c	2011-07-01 14:13:31.033887672 +0200
-@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
+diff -up dhcp-4.3.3b1/common/resolv.c.cloexec dhcp-4.3.3b1/common/resolv.c
+--- dhcp-4.3.3b1/common/resolv.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/common/resolv.c	2015-08-10 10:46:20.276755503 +0200
+@@ -44,7 +44,7 @@ void read_resolv_conf (parse_time)
  	struct domain_search_list *dp, *dl, *nd;
  	isc_result_t status;
  
@@ -169,10 +169,10 @@  diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
  		log_error ("Can't open %s: %m", path_resolv_conf);
  		return;
  	}
-diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
---- dhcp-4.2.2b1/common/upf.c.cloexec	2011-07-01 14:13:30.979887712 +0200
-+++ dhcp-4.2.2b1/common/upf.c	2011-07-01 14:13:31.034887671 +0200
-@@ -77,7 +77,7 @@ int if_register_upf (info)
+diff -up dhcp-4.3.3b1/common/upf.c.cloexec dhcp-4.3.3b1/common/upf.c
+--- dhcp-4.3.3b1/common/upf.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/common/upf.c	2015-08-10 10:46:20.276755503 +0200
+@@ -71,7 +71,7 @@ int if_register_upf (info)
  		/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
  		sprintf(filename, "/dev/pf/pfilt%d", b);
  
@@ -181,10 +181,10 @@  diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
  		if (sock < 0) {
  			if (errno == EBUSY) {
  				continue;
-diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
---- dhcp-4.2.2b1/omapip/trace.c.cloexec	2010-05-27 02:34:57.000000000 +0200
-+++ dhcp-4.2.2b1/omapip/trace.c	2011-07-01 14:13:31.036887669 +0200
-@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi
+diff -up dhcp-4.3.3b1/omapip/trace.c.cloexec dhcp-4.3.3b1/omapip/trace.c
+--- dhcp-4.3.3b1/omapip/trace.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/omapip/trace.c	2015-08-10 10:46:20.276755503 +0200
+@@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *fi
  		return DHCP_R_INVALIDARG;
  	}
  
@@ -197,7 +197,7 @@  diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
  				     0600);
  	}
  
-@@ -431,7 +431,7 @@ void trace_file_replay (const char *file
+@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
  	isc_result_t result;
  	int len;
  
@@ -206,10 +206,10 @@  diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
  	if (!traceinfile) {
  		log_error("Can't open tracefile %s: %m", filename);
  		return;
-diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
---- dhcp-4.2.2b1/relay/dhcrelay.c.cloexec	2011-05-10 15:07:37.000000000 +0200
-+++ dhcp-4.2.2b1/relay/dhcrelay.c	2011-07-01 14:18:07.630209767 +0200
-@@ -183,11 +183,11 @@ main(int argc, char **argv) {
+diff -up dhcp-4.3.3b1/relay/dhcrelay.c.cloexec dhcp-4.3.3b1/relay/dhcrelay.c
+--- dhcp-4.3.3b1/relay/dhcrelay.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/relay/dhcrelay.c	2015-08-10 10:46:20.276755503 +0200
+@@ -187,11 +187,11 @@ main(int argc, char **argv) {
  	/* Make sure that file descriptors 0(stdin), 1,(stdout), and
  	   2(stderr) are open. To do this, we assume that when we
  	   open a file the lowest available file descriptor is used. */
@@ -224,7 +224,7 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
  	if (fd == 2)
  		log_perror = 0; /* No sense logging to /dev/null. */
  	else if (fd != -1)
-@@ -540,13 +540,13 @@ main(int argc, char **argv) {
+@@ -558,13 +558,13 @@ main(int argc, char **argv) {
  
  		if (no_pid_file == ISC_FALSE) {
  			pfdesc = open(path_dhcrelay_pid,
@@ -240,10 +240,10 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
  				if (!pf)
  					log_error("Can't fdopen %s: %m",
  						  path_dhcrelay_pid);
-diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
---- dhcp-4.2.2b1/server/confpars.c.cloexec	2010-10-14 00:34:45.000000000 +0200
-+++ dhcp-4.2.2b1/server/confpars.c	2011-07-01 14:13:31.039887666 +0200
-@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char 
+diff -up dhcp-4.3.3b1/server/confpars.c.cloexec dhcp-4.3.3b1/server/confpars.c
+--- dhcp-4.3.3b1/server/confpars.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/server/confpars.c	2015-08-10 10:46:20.277755500 +0200
+@@ -111,7 +111,7 @@ isc_result_t read_conf_file (const char
  	}
  #endif
  
@@ -252,10 +252,10 @@  diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
  		if (leasep) {
  			log_error ("Can't open lease database %s: %m --",
  				   path_dhcpd_db);
-diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
---- dhcp-4.2.2b1/server/db.c.cloexec	2010-09-14 00:15:26.000000000 +0200
-+++ dhcp-4.2.2b1/server/db.c	2011-07-01 14:13:31.040887665 +0200
-@@ -1035,7 +1035,7 @@ void db_startup (testp)
+diff -up dhcp-4.3.3b1/server/db.c.cloexec dhcp-4.3.3b1/server/db.c
+--- dhcp-4.3.3b1/server/db.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/server/db.c	2015-08-10 10:47:32.644518358 +0200
+@@ -1072,7 +1072,7 @@ void db_startup (testp)
  	}
  #endif
  	if (!testp) {
@@ -264,7 +264,7 @@  diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
  		if (!db_file)
  			log_fatal ("Can't open %s for append.", path_dhcpd_db);
  		expire_all_pools ();
-@@ -1083,12 +1083,12 @@ int new_lease_file ()
+@@ -1120,7 +1120,7 @@ int new_lease_file ()
  		     path_dhcpd_db, (int)t) >= sizeof newfname)
  		log_fatal("new_lease_file: lease file path too long");
  
@@ -273,16 +273,19 @@  diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
  	if (db_fd < 0) {
  		log_error ("Can't create new lease file: %m");
  		return 0;
+@@ -1141,7 +1141,7 @@ int new_lease_file ()
  	}
+ #endif /* PARANOIA */
+ 
 -	if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
 +	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
  		log_error("Can't fdopen new lease file: %m");
  		close(db_fd);
  		goto fdfail;
-diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
---- dhcp-4.2.2b1/server/dhcpd.c.cloexec	2011-04-21 16:08:15.000000000 +0200
-+++ dhcp-4.2.2b1/server/dhcpd.c	2011-07-01 14:19:40.354124505 +0200
-@@ -270,11 +270,11 @@ main(int argc, char **argv) {
+diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
+--- dhcp-4.3.3b1/server/dhcpd.c.cloexec	2015-07-30 15:17:16.000000000 +0200
++++ dhcp-4.3.3b1/server/dhcpd.c	2015-08-10 10:46:20.278755497 +0200
+@@ -194,11 +194,11 @@ main(int argc, char **argv) {
          /* Make sure that file descriptors 0 (stdin), 1, (stdout), and
             2 (stderr) are open. To do this, we assume that when we
             open a file the lowest available file descriptor is used. */
@@ -297,41 +300,32 @@  diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
          if (fd == 2)
                  log_perror = 0; /* No sense logging to /dev/null. */
          else if (fd != -1)
-@@ -793,7 +793,7 @@ main(int argc, char **argv) {
+@@ -743,7 +743,7 @@ main(int argc, char **argv) {
+ 	 * appropriate.
  	 */
  	if (no_pid_file == ISC_FALSE) {
- 		/*Read previous pid file. */
--		if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
-+		if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) {
- 			status = read(i, pbuf, (sizeof pbuf) - 1);
- 			close (i);
- 			if (status > 0) {
-@@ -812,7 +812,7 @@ main(int argc, char **argv) {
- 		}
- 
- 		/* Write new pid file. */
 -		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644);
 +		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
  		if (i >= 0) {
  			sprintf(pbuf, "%d\n", (int) getpid());
- 			IGNORE_RET (write(i, pbuf, strlen(pbuf)));
-@@ -840,9 +840,9 @@ main(int argc, char **argv) {
-                 close(2);
+ 			IGNORE_RET(write(i, pbuf, strlen(pbuf)));
+@@ -787,9 +787,9 @@ main(int argc, char **argv) {
+                 (void) close(2);
  
                  /* Reopen them on /dev/null. */
--                open("/dev/null", O_RDWR);
--                open("/dev/null", O_RDWR);
--                open("/dev/null", O_RDWR);
-+                open("/dev/null", O_RDWR | O_CLOEXEC);
-+                open("/dev/null", O_RDWR | O_CLOEXEC);
-+                open("/dev/null", O_RDWR | O_CLOEXEC);
+-                (void) open("/dev/null", O_RDWR);
+-                (void) open("/dev/null", O_RDWR);
+-                (void) open("/dev/null", O_RDWR);
++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
                  log_perror = 0; /* No sense logging to /dev/null. */
  
         		IGNORE_RET (chdir("/"));
-diff -up dhcp-4.2.2b1/server/ldap.c.cloexec dhcp-4.2.2b1/server/ldap.c
---- dhcp-4.2.2b1/server/ldap.c.cloexec	2010-03-25 16:26:58.000000000 +0100
-+++ dhcp-4.2.2b1/server/ldap.c	2011-07-01 14:13:31.043887665 +0200
-@@ -685,7 +685,7 @@ ldap_start (void)
+diff -up dhcp-4.3.3b1/server/ldap.c.cloexec dhcp-4.3.3b1/server/ldap.c
+--- dhcp-4.3.3b1/server/ldap.c.cloexec	2015-07-30 21:03:40.000000000 +0200
++++ dhcp-4.3.3b1/server/ldap.c	2015-08-10 10:46:20.279755493 +0200
+@@ -1442,7 +1442,7 @@ ldap_start (void)
  
    if (ldap_debug_file != NULL && ldap_debug_fd == -1)
      {
diff --git a/dhcp/patches/0012-dhcp-garbage-chars.patch b/dhcp/patches/0012-dhcp-garbage-chars.patch
new file mode 100644
index 0000000..131360b
--- /dev/null
+++ b/dhcp/patches/0012-dhcp-garbage-chars.patch
@@ -0,0 +1,12 @@ 
+diff -up dhcp-4.3.0rc1/common/tables.c.garbage dhcp-4.3.0rc1/common/tables.c
+--- dhcp-4.3.0rc1/common/tables.c.garbage	2014-01-29 10:03:52.132624677 +0100
++++ dhcp-4.3.0rc1/common/tables.c	2014-01-29 10:04:51.413875343 +0100
+@@ -213,7 +213,7 @@ static struct option dhcp_options[] = {
+ 	{ "name-service-search", "Sa",		&dhcp_universe, 117, 1 },
+ #endif
+ 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
+-	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
++	{ "domain-search", "D",			&dhcp_universe, 119, 1 },
+ 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
+ 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
+ #if 0
diff --git a/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch b/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
new file mode 100644
index 0000000..103824c
--- /dev/null
+++ b/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
@@ -0,0 +1,14 @@ 
+diff -up dhcp-4.3.0a1/common/dispatch.c.dracut dhcp-4.3.0a1/common/dispatch.c
+--- dhcp-4.3.0a1/common/dispatch.c.dracut	2013-12-11 01:25:12.000000000 +0100
++++ dhcp-4.3.0a1/common/dispatch.c	2013-12-19 15:39:50.350505860 +0100
+@@ -210,6 +210,10 @@ void add_timeout (when, where, what, ref
+ 	isc_interval_t interval;
+ 	isc_time_t expires;
+ 
++	if (when == NULL) {
++		return;
++	}
++
+ 	/* See if this timeout supersedes an existing timeout. */
+ 	t = (struct timeout *)0;
+ 	for (q = timeouts; q; q = q->next) {
diff --git a/dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch b/dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
similarity index 51%
rename from dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch
rename to dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
index c1b978b..a07b5b0 100644
--- a/dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch
+++ b/dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c
---- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse	2012-03-09 12:28:10.000000000 +0100
-+++ dhcp-4.2.4b1/common/parse.c	2012-04-16 17:30:55.867045149 +0200
-@@ -906,8 +906,8 @@ TIME
+diff -up dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse dhcp-4.3.0a1/common/parse.c
+--- dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse	2013-12-11 01:25:12.000000000 +0100
++++ dhcp-4.3.0a1/common/parse.c	2013-12-19 15:45:25.990771814 +0100
+@@ -938,8 +938,8 @@ TIME
  parse_date_core(cfile)
  	struct parse *cfile;
  {
@@ -12,16 +12,16 @@  diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/pars
  	const char *val;
  	enum dhcp_token token;
  	static int months[11] = { 31, 59, 90, 120, 151, 181,
-@@ -933,7 +933,7 @@ parse_date_core(cfile)
+@@ -965,7 +965,7 @@ parse_date_core(cfile)
  		}
  
- 		token = next_token(&val, NULL, cfile); /* consume number */
+ 		skip_token(&val, NULL, cfile); /* consume number */
 -		guess = atoi(val);
 +		guess = atol(val);
  
  		return((TIME)guess);
  	}
-@@ -961,7 +961,7 @@ parse_date_core(cfile)
+@@ -993,7 +993,7 @@ parse_date_core(cfile)
  	   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. */
@@ -30,55 +30,46 @@  diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/pars
  	if (year > 1900)
  		year -= 1900;
  
-@@ -985,7 +985,7 @@ parse_date_core(cfile)
+@@ -1039,7 +1039,7 @@ parse_date_core(cfile)
  		return((TIME)0);
  	}
- 	token = next_token(&val, NULL, cfile); /* consume month */	
--	mon = atoi(val) - 1;
-+	mon = atol(val) - 1;
- 
- 	/* Slash separating month from day... */
- 	token = peek_token(&val, NULL, cfile);
-@@ -1007,7 +1007,7 @@ parse_date_core(cfile)
- 		return((TIME)0);
- 	}
- 	token = next_token(&val, NULL, cfile); /* consume day of month */
+ 	skip_token(&val, NULL, cfile); /* consume day of month */
 -	mday = atoi(val);
 +	mday = atol(val);
  
  	/* Hour... */
  	token = peek_token(&val, NULL, cfile);
-@@ -1018,7 +1018,7 @@ parse_date_core(cfile)
+@@ -1050,7 +1050,7 @@ parse_date_core(cfile)
  		return((TIME)0);
  	}
- 	token = next_token(&val, NULL, cfile); /* consume hour */
+ 	skip_token(&val, NULL, cfile); /* consume hour */
 -	hour = atoi(val);
 +	hour = atol(val);
  
  	/* Colon separating hour from minute... */
  	token = peek_token(&val, NULL, cfile);
-@@ -1040,7 +1040,7 @@ parse_date_core(cfile)
+@@ -1072,7 +1072,7 @@ parse_date_core(cfile)
  		return((TIME)0);
  	}
- 	token = next_token(&val, NULL, cfile); /* consume minute */
+ 	skip_token(&val, NULL, cfile); /* consume minute */
 -	min = atoi(val);
 +	min = atol(val);
  
  	/* Colon separating minute from second... */
  	token = peek_token(&val, NULL, cfile);
-@@ -1062,13 +1062,13 @@ parse_date_core(cfile)
+@@ -1094,13 +1094,13 @@ parse_date_core(cfile)
  		return((TIME)0);
  	}
- 	token = next_token(&val, NULL, cfile); /* consume second */
+ 	skip_token(&val, NULL, cfile); /* consume second */
 -	sec = atoi(val);
 +	sec = atol(val);
  
  	tzoff = 0;
  	token = peek_token(&val, NULL, cfile);
  	if (token == NUMBER) {
- 		token = next_token(&val, NULL, cfile); /* consume tzoff */
+ 		skip_token(&val, NULL, cfile); /* consume tzoff */
 -		tzoff = atoi(val);
 +		tzoff = atol(val);
  	} else if (token != SEMI) {
- 		token = next_token(&val, NULL, cfile);
+ 		skip_token(&val, NULL, cfile);
  		parse_warn(cfile,
diff --git a/dhcp/patches/dhcp-4.2.2-capability.patch b/dhcp/patches/0015-dhcp-capability.patch
similarity index 64%
rename from dhcp/patches/dhcp-4.2.2-capability.patch
rename to dhcp/patches/0015-dhcp-capability.patch
index db2fb38..4572c34 100644
--- a/dhcp/patches/dhcp-4.2.2-capability.patch
+++ b/dhcp/patches/0015-dhcp-capability.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.8
---- dhcp-4.2.2b1/client/dhclient.8.capability	2011-07-01 15:09:06.603784531 +0200
-+++ dhcp-4.2.2b1/client/dhclient.8	2011-07-01 15:09:06.663783913 +0200
-@@ -118,6 +118,9 @@ dhclient - Dynamic Host Configuration Pr
+diff -up dhcp-4.3.4/client/dhclient.8.capability dhcp-4.3.4/client/dhclient.8
+--- dhcp-4.3.4/client/dhclient.8.capability	2016-04-29 12:19:40.657129322 +0200
++++ dhcp-4.3.4/client/dhclient.8	2016-04-29 12:19:40.715129297 +0200
+@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Pr
  .B -w
  ]
  [
@@ -11,7 +11,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.
  .B -B
  ]
  [
-@@ -296,6 +299,32 @@ has been added or removed, so that the c
+@@ -318,6 +321,32 @@ has been added or removed, so that the c
  address on that interface.
  
  .TP
@@ -44,11 +44,11 @@  diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-4.2.2b1/client/dhclient.
  .BI \-B
  Set the BOOTP broadcast flag in request packets so servers will always
  broadcast replies.
-diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.c
---- dhcp-4.2.2b1/client/dhclient.c.capability	2011-07-01 15:09:06.644784107 +0200
-+++ dhcp-4.2.2b1/client/dhclient.c	2011-07-01 15:09:06.664783903 +0200
-@@ -39,6 +39,10 @@
- #include <limits.h>
+diff -up dhcp-4.3.4/client/dhclient.c.capability dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.capability	2016-04-29 12:19:40.691129307 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:21:07.620091930 +0200
+@@ -40,6 +40,10 @@
+ #include <isc/file.h>
  #include <dns/result.h>
  
 +#ifdef HAVE_LIBCAP_NG
@@ -58,7 +58,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
  /*
   * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
   * that when building ISC code.
-@@ -141,6 +145,9 @@ main(int argc, char **argv) {
+@@ -237,6 +241,9 @@ main(int argc, char **argv) {
  	int timeout_arg = 0;
  	char *arg_conf = NULL;
  	int arg_conf_len = 0;
@@ -68,7 +68,7 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
  
  	/* Initialize client globals. */
  	memset(&default_duid, 0, sizeof(default_duid));
-@@ -410,6 +417,10 @@ main(int argc, char **argv) {
+@@ -537,6 +544,10 @@ main(int argc, char **argv) {
  			}
  
  			dhclient_request_options = argv[i];
@@ -77,9 +77,9 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
 +			keep_capabilities = 1;
 +#endif
  		} else if (argv[i][0] == '-') {
- 		    usage();
+ 			usage("Unknown command: %s", argv[i]);
  		} else if (interfaces_requested < 0) {
-@@ -458,6 +469,19 @@ main(int argc, char **argv) {
+@@ -597,6 +608,19 @@ main(int argc, char **argv) {
  		path_dhclient_script = s;
  	}
  
@@ -99,10 +99,10 @@  diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-4.2.2b1/client/dhclient.
  	/* Set up the initial dhcp option universe. */
  	initialize_common_option_spaces();
  
-diff -up dhcp-4.2.2b1/client/dhclient-script.8.capability dhcp-4.2.2b1/client/dhclient-script.8
---- dhcp-4.2.2b1/client/dhclient-script.8.capability	2011-07-01 15:09:06.604784521 +0200
-+++ dhcp-4.2.2b1/client/dhclient-script.8	2011-07-01 15:09:06.666783883 +0200
-@@ -239,6 +239,16 @@ repeatedly initialized to the values pro
+diff -up dhcp-4.3.4/client/dhclient-script.8.capability dhcp-4.3.4/client/dhclient-script.8
+--- dhcp-4.3.4/client/dhclient-script.8.capability	2016-04-29 12:19:40.668129317 +0200
++++ dhcp-4.3.4/client/dhclient-script.8	2016-04-29 12:19:40.717129296 +0200
+@@ -243,6 +243,16 @@ repeatedly initialized to the values pro
  the other.   Assuming the information provided by both servers is
  valid, this shouldn't cause any real problems, but it could be
  confusing.
@@ -119,22 +119,22 @@  diff -up dhcp-4.2.2b1/client/dhclient-script.8.capability dhcp-4.2.2b1/client/dh
  .SH SEE ALSO
  dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
  dhclient.leases(5).
-diff -up dhcp-4.2.2b1/client/Makefile.am.capability dhcp-4.2.2b1/client/Makefile.am
---- dhcp-4.2.2b1/client/Makefile.am.capability	2011-07-01 15:09:06.526785327 +0200
-+++ dhcp-4.2.2b1/client/Makefile.am	2011-07-01 15:09:06.667783873 +0200
-@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c 
+diff -up dhcp-4.3.4/client/Makefile.am.capability dhcp-4.3.4/client/Makefile.am
+--- dhcp-4.3.4/client/Makefile.am.capability	2016-04-29 12:19:40.652129324 +0200
++++ dhcp-4.3.4/client/Makefile.am	2016-04-29 12:19:40.717129296 +0200
+@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
+ 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
  		   scripts/netbsd scripts/nextstep scripts/openbsd \
  		   scripts/solaris scripts/openwrt
- dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--		 $(BIND9_LIBDIR) -ldns-export -lisc-export
-+		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
+ 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
  man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
  EXTRA_DIST = $(man_MANS)
- 
-diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-4.2.2b1/configure.ac
---- dhcp-4.2.2b1/configure.ac.capability	2011-07-01 15:09:06.527785317 +0200
-+++ dhcp-4.2.2b1/configure.ac	2011-07-01 15:09:06.667783873 +0200
-@@ -449,6 +449,41 @@ AC_TRY_LINK(
+diff -up dhcp-4.3.4/configure.ac.capability dhcp-4.3.4/configure.ac
+--- dhcp-4.3.4/configure.ac.capability	2016-04-29 12:19:40.652129324 +0200
++++ dhcp-4.3.4/configure.ac	2016-04-29 12:19:40.717129296 +0200
+@@ -585,6 +585,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
  # Look for optional headers.
  AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
  
@@ -176,12 +176,12 @@  diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-4.2.2b1/configure.ac
  # Solaris needs some libraries for functions
  AC_SEARCH_LIBS(socket, [socket])
  AC_SEARCH_LIBS(inet_ntoa, [nsl])
-diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
---- dhcp-4.2.2b1/relay/dhcrelay.c.capability	2011-07-01 15:09:06.626784295 +0200
-+++ dhcp-4.2.2b1/relay/dhcrelay.c	2011-07-01 15:12:05.362223794 +0200
-@@ -36,6 +36,11 @@
- #include <syslog.h>
+diff -up dhcp-4.3.4/relay/dhcrelay.c.capability dhcp-4.3.4/relay/dhcrelay.c
+--- dhcp-4.3.4/relay/dhcrelay.c.capability	2016-04-29 12:19:40.694129306 +0200
++++ dhcp-4.3.4/relay/dhcrelay.c	2016-04-29 12:22:30.278056386 +0200
+@@ -32,6 +32,11 @@
  #include <sys/time.h>
+ #include <isc/file.h>
  
 +#ifdef HAVE_LIBCAP_NG
 +#  include <cap-ng.h>
@@ -191,9 +191,9 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
  TIME default_lease_time = 43200; /* 12 hours... */
  TIME max_lease_time = 86400; /* 24 hours... */
  struct tree_cache *global_options[256];
-@@ -356,6 +361,10 @@ main(int argc, char **argv) {
- 			sl->next = upstreams;
- 			upstreams = sl;
+@@ -454,6 +459,10 @@ main(int argc, char **argv) {
+ 				usage(use_noarg, argv[i-1]);
+ 			dhcrelay_sub_id = argv[i];
  #endif
 +		} else if (!strcmp(argv[i], "-nc")) {
 +#ifdef HAVE_LIBCAP_NG
@@ -201,8 +201,8 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
 +#endif
  		} else if (!strcmp(argv[i], "-pf")) {
  			if (++i == argc)
- 				usage();
-@@ -426,6 +435,17 @@ main(int argc, char **argv) {
+ 				usage(use_noarg, argv[i-1]);
+@@ -528,6 +537,17 @@ main(int argc, char **argv) {
  #endif
  	}
  
@@ -220,8 +220,8 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
  	if (!quiet) {
  		log_info("%s %s", message, PACKAGE_VERSION);
  		log_info(copyright);
-@@ -573,6 +593,15 @@ main(int argc, char **argv) {
- 		dhcpv6_packet_handler = do_packet6;
+@@ -680,6 +700,15 @@ main(int argc, char **argv) {
+ 	signal(SIGTERM, dhcp_signal_handler);  /* kill */
  #endif
  
 +#ifdef HAVE_LIBCAP_NG
@@ -236,15 +236,15 @@  diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-4.2.2b1/relay/dhcrelay.c
  	/* Start dispatching packets and timeouts... */
  	dispatch();
  
-diff -up dhcp-4.2.2b1/relay/Makefile.am.capability dhcp-4.2.2b1/relay/Makefile.am
---- dhcp-4.2.2b1/relay/Makefile.am.capability	2011-07-01 15:09:06.546785121 +0200
-+++ dhcp-4.2.2b1/relay/Makefile.am	2011-07-01 15:09:06.670783841 +0200
-@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
+diff -up dhcp-4.3.4/relay/Makefile.am.capability dhcp-4.3.4/relay/Makefile.am
+--- dhcp-4.3.4/relay/Makefile.am.capability	2016-04-29 12:19:40.653129323 +0200
++++ dhcp-4.3.4/relay/Makefile.am	2016-04-29 12:19:40.718129295 +0200
+@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
+ 
  sbin_PROGRAMS = dhcrelay
  dhcrelay_SOURCES = dhcrelay.c
- dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--		 $(BIND9_LIBDIR) -ldns-export -lisc-export
-+		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
+-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
+ 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
  man_MANS = dhcrelay.8
  EXTRA_DIST = $(man_MANS)
- 
diff --git a/dhcp/patches/dhcp-4.2.5-sendDecline.patch b/dhcp/patches/0016-dhcp-sendDecline.patch
similarity index 88%
rename from dhcp/patches/dhcp-4.2.5-sendDecline.patch
rename to dhcp/patches/0016-dhcp-sendDecline.patch
index 0853730..ede9298 100644
--- a/dhcp/patches/dhcp-4.2.5-sendDecline.patch
+++ b/dhcp/patches/0016-dhcp-sendDecline.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
---- dhcp-4.2.5b1/client/dhc6.c.sendDecline	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/client/dhc6.c	2012-12-17 13:21:16.922444939 +0100
-@@ -96,6 +96,8 @@ void do_select6(void *input);
+diff -up dhcp-4.3.4/client/dhc6.c.sendDecline dhcp-4.3.4/client/dhc6.c
+--- dhcp-4.3.4/client/dhc6.c.sendDecline	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/client/dhc6.c	2016-05-02 14:51:57.916578401 +0200
+@@ -115,6 +115,8 @@ void do_select6(void *input);
  void do_refresh6(void *input);
  static void do_release6(void *input);
  static void start_bound(struct client_state *client);
@@ -10,7 +10,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  static void start_informed(struct client_state *client);
  void informed_handler(struct packet *packet, struct client_state *client);
  void bound_handler(struct packet *packet, struct client_state *client);
-@@ -2080,6 +2082,7 @@ start_release6(struct client_state *clie
+@@ -2314,6 +2316,7 @@ start_release6(struct client_state *clie
  	cancel_timeout(do_select6, client);
  	cancel_timeout(do_refresh6, client);
  	cancel_timeout(do_release6, client);
@@ -18,7 +18,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  	client->state = S_STOPPED;
  
  	/*
-@@ -2713,6 +2716,7 @@ dhc6_check_reply(struct client_state *cl
+@@ -2968,6 +2971,7 @@ dhc6_check_reply(struct client_state *cl
  		break;
  
  	      case S_STOPPED:
@@ -26,7 +26,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  		action = dhc6_stop_action;
  		break;
  
-@@ -2814,6 +2818,7 @@ dhc6_check_reply(struct client_state *cl
+@@ -3084,6 +3088,7 @@ dhc6_check_reply(struct client_state *cl
  		break;
  
  	      case S_STOPPED:
@@ -34,7 +34,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  		/* Nothing critical to do at this stage. */
  		break;
  
-@@ -3804,17 +3809,23 @@ reply_handler(struct packet *packet, str
+@@ -4214,17 +4219,23 @@ reply_handler(struct packet *packet, str
  	cancel_timeout(do_select6, client);
  	cancel_timeout(do_refresh6, client);
  	cancel_timeout(do_release6, client);
@@ -66,7 +66,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  		return;
  	}
  
-@@ -4342,7 +4353,11 @@ start_bound(struct client_state *client)
+@@ -4798,7 +4809,11 @@ start_bound(struct client_state *client)
  			dhc6_marshall_values("new_", client, lease, ia, addr);
  			script_write_requested6(client);
  
@@ -79,7 +79,7 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
  		}
  
  		/* XXX: maybe we should loop on the old values instead? */
-@@ -4390,6 +4405,149 @@ start_bound(struct client_state *client)
+@@ -4851,6 +4866,149 @@ start_bound(struct client_state *client)
  	dhc6_check_times(client);
  }
  
@@ -121,8 +121,8 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
 +{
 +	struct client_state *client;
 +	struct data_string ds;
-+	int send_ret;
 +	struct timeval elapsed, tv;
++	int send_ret, added;
 +
 +	client = input;
 +
@@ -183,13 +183,13 @@  diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
 +	/* Append IA's (but don't release temporary addresses). */
 +	if (wanted_ia_na &&
 +	    dhc6_add_ia_na(client, &ds, client->active_lease,
-+			   DHCPV6_DECLINE) != ISC_R_SUCCESS) {
++			   DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
 +		data_string_forget(&ds, MDL);
 +		goto decline_done;
 +	}
 +	if (wanted_ia_pd &&
 +	    dhc6_add_ia_pd(client, &ds, client->active_lease,
-+			   DHCPV6_DECLINE) != ISC_R_SUCCESS) {
++			   DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
 +		data_string_forget(&ds, MDL);
 +		goto decline_done;
 +	}
diff --git a/dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch b/dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
similarity index 76%
rename from dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
rename to dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
index 62a2b69..6c3a239 100644
--- a/dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
+++ b/dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
@@ -1,16 +1,16 @@ 
-diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
---- dhcp-4.2.5b1/client/clparse.c.rfc3442	2012-12-17 13:23:34.387564654 +0100
-+++ dhcp-4.2.5b1/client/clparse.c	2012-12-17 13:23:34.437563996 +0100
-@@ -37,7 +37,7 @@
+diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.rfc3442	2016-04-29 12:23:34.192032714 +0200
++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:24:37.531016317 +0200
+@@ -31,7 +31,7 @@
  
  struct client_config top_level_config;
  
 -#define NUM_DEFAULT_REQUESTED_OPTS	14
 +#define NUM_DEFAULT_REQUESTED_OPTS	15
- struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
+ /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
+ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
  
- static void parse_client_default_duid(struct parse *cfile);
-@@ -90,7 +90,11 @@ isc_result_t read_client_conf ()
+@@ -87,7 +87,11 @@ isc_result_t read_client_conf ()
  				dhcp_universe.code_hash, &code, 0, MDL);
  
  	/* 4 */
@@ -23,7 +23,7 @@  diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
  	option_code_hash_lookup(&default_requested_options[3],
  				dhcp_universe.code_hash, &code, 0, MDL);
  
-@@ -144,6 +148,11 @@ isc_result_t read_client_conf ()
+@@ -141,6 +145,11 @@ isc_result_t read_client_conf ()
  	option_code_hash_lookup(&default_requested_options[13],
  				dhcp_universe.code_hash, &code, 0, MDL);
  
@@ -35,10 +35,10 @@  diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
  	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
  		if (default_requested_options[code] == NULL)
  			log_fatal("Unable to find option definition for "
-diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-options.5
---- dhcp-4.2.5b1/common/dhcp-options.5.rfc3442	2012-12-17 13:23:34.376564797 +0100
-+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 13:25:18.435141385 +0100
-@@ -116,6 +116,26 @@ hexadecimal, separated by colons.  For e
+diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options.5
+--- dhcp-4.3.4/common/dhcp-options.5.rfc3442	2016-04-29 12:23:34.183032716 +0200
++++ dhcp-4.3.4/common/dhcp-options.5	2016-04-29 12:23:34.237032703 +0200
+@@ -111,6 +111,26 @@ hexadecimal, separated by colons.  For e
  or
    option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
  .fi
@@ -65,7 +65,7 @@  diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-opt
  .SH SETTING OPTION VALUES USING EXPRESSIONS
  Sometimes it's helpful to be able to set the value of a DHCP option
  based on some value that the client has sent.  To do this, you can
-@@ -932,6 +952,29 @@ dhclient-script will create routes:
+@@ -1031,6 +1051,29 @@ dhclient-script will create routes:
  .RE
  .PP
  .nf
@@ -95,10 +95,10 @@  diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-opt
  .B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
                                             [\fB,\fR \fIip-address\fR...]\fB;\fR
  .fi
-diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
---- dhcp-4.2.5b1/common/inet.c.rfc3442	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/common/inet.c	2012-12-17 13:23:34.440563957 +0100
-@@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
+diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
+--- dhcp-4.3.4/common/inet.c.rfc3442	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/inet.c	2016-04-29 12:23:34.237032703 +0200
+@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
  	return ISC_R_SUCCESS;
  }
  
@@ -159,9 +159,9 @@  diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
  /* piaddr() turns an iaddr structure into a printable address. */
  /* XXX: should use a const pointer rather than passing the structure */
  const char *
-diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
---- dhcp-4.2.5b1/common/options.c.rfc3442	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/common/options.c	2012-12-17 13:29:38.961536040 +0100
+diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
+--- dhcp-4.3.4/common/options.c.rfc3442	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/options.c	2016-04-29 12:23:34.237032703 +0200
 @@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
  		 * packet.
  		 */
@@ -191,7 +191,7 @@  diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
  	/* Figure out the size of the data. */
  	for (l = i = 0; option -> format [i]; i++, l++) {
  		if (l >= sizeof(fmtbuf) - 1)
-@@ -1876,6 +1882,33 @@ const char *pretty_print_option (option,
+@@ -1894,6 +1900,33 @@ const char *pretty_print_option (option,
  	if (numhunk < 0)
  		numhunk = 1;
  
@@ -225,7 +225,7 @@  diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
  	/* Cycle through the array (or hunk) printing the data. */
  	for (i = 0; i < numhunk; i++) {
  		if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
-@@ -2031,6 +2064,20 @@ const char *pretty_print_option (option,
+@@ -2049,6 +2082,20 @@ const char *pretty_print_option (option,
  				strcpy(op, piaddr(iaddr));
  				dp += 4;
  				break;
@@ -246,9 +246,9 @@  diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
  			      case '6':
  				iaddr.len = 16;
  				memcpy(iaddr.iabuf, dp, 16);
-diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
---- dhcp-4.2.5b1/common/parse.c.rfc3442	2012-12-17 13:23:34.408564378 +0100
-+++ dhcp-4.2.5b1/common/parse.c	2012-12-17 13:23:34.444563905 +0100
+diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
+--- dhcp-4.3.4/common/parse.c.rfc3442	2016-04-29 12:23:34.220032707 +0200
++++ dhcp-4.3.4/common/parse.c	2016-04-29 12:23:34.238032702 +0200
 @@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
  }	
  
@@ -289,7 +289,7 @@  diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
   * Return true if every character in the string is hexadecimal.
   */
  static int
-@@ -719,8 +752,10 @@ unsigned char *parse_numeric_aggregate (
+@@ -720,8 +753,10 @@ unsigned char *parse_numeric_aggregate (
  		if (count) {
  			token = peek_token (&val, (unsigned *)0, cfile);
  			if (token != separator) {
@@ -301,7 +301,7 @@  diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
  				if (token != RBRACE && token != LBRACE)
  					token = next_token (&val,
  							    (unsigned *)0,
-@@ -1660,6 +1695,9 @@ int parse_option_code_definition (cfile,
+@@ -1668,6 +1703,9 @@ int parse_option_code_definition (cfile,
  	      case IP_ADDRESS:
  		type = 'I';
  		break;
@@ -311,7 +311,7 @@  diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
  	      case IP6_ADDRESS:
  		type = '6';
  		break;
-@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
+@@ -5097,6 +5135,15 @@ int parse_option_token (rv, cfile, fmt,
  		}
  		break;
  
@@ -327,7 +327,7 @@  diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
  	      case '6': /* IPv6 address. */
  		if (!parse_ip6_addr(cfile, &addr)) {
  			return 0;
-@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
+@@ -5374,6 +5421,13 @@ int parse_option_decl (oc, cfile)
  					goto exit;
  				len = ip_addr.len;
  				dp = ip_addr.iabuf;
@@ -341,10 +341,10 @@  diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
  
  			      alloc:
  				if (hunkix + len > sizeof hunkbuf) {
-diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
---- dhcp-4.2.5b1/common/tables.c.rfc3442	2012-12-17 13:23:34.398564508 +0100
-+++ dhcp-4.2.5b1/common/tables.c	2012-12-17 13:23:34.445563891 +0100
-@@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig
+diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
+--- dhcp-4.3.4/common/tables.c.rfc3442	2016-04-29 12:23:34.209032710 +0200
++++ dhcp-4.3.4/common/tables.c	2016-04-29 12:23:34.238032702 +0200
+@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsig
     Format codes:
  
     I - IPv4 address
@@ -352,18 +352,18 @@  diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
     6 - IPv6 address
     l - 32-bit signed integer
     L - 32-bit unsigned integer
-@@ -210,6 +211,7 @@ static struct option dhcp_options[] = {
- 	{ "default-url", "t",			&dhcp_universe, 114, 1 },
+@@ -216,6 +217,7 @@ static struct option dhcp_options[] = {
+ #endif
  	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
- 	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
+ 	{ "domain-search", "D",			&dhcp_universe, 119, 1 },
 +	{ "classless-static-routes", "RIA",	&dhcp_universe, 121, 1 },
  	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
  	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
  #if 0
-diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
---- dhcp-4.2.5b1/includes/dhcpd.h.rfc3442	2012-12-17 13:23:34.382564719 +0100
-+++ dhcp-4.2.5b1/includes/dhcpd.h	2012-12-17 13:23:34.446563877 +0100
-@@ -2678,6 +2678,7 @@ isc_result_t range2cidr(struct iaddrcidr
+diff -up dhcp-4.3.4/includes/dhcpd.h.rfc3442 dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.rfc3442	2016-04-29 12:23:34.186032716 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:23:34.239032702 +0200
+@@ -2894,6 +2894,7 @@ isc_result_t range2cidr(struct iaddrcidr
  			const struct iaddr *lo, const struct iaddr *hi);
  isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
  const char *piaddr (struct iaddr);
@@ -371,7 +371,7 @@  diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
  char *piaddrmask(struct iaddr *, struct iaddr *);
  char *piaddrcidr(const struct iaddr *, unsigned int);
  u_int16_t validate_port(char *);
-@@ -2887,6 +2888,7 @@ void parse_client_lease_declaration (str
+@@ -3108,6 +3109,7 @@ void parse_client_lease_declaration (str
  int parse_option_decl (struct option_cache **, struct parse *);
  void parse_string_list (struct parse *, struct string_list **, int);
  int parse_ip_addr (struct parse *, struct iaddr *);
@@ -379,10 +379,10 @@  diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
  int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
  void parse_reject_statement (struct parse *, struct client_config *);
  
-diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
---- dhcp-4.2.5b1/includes/dhcp.h.rfc3442	2012-10-23 21:02:13.000000000 +0200
-+++ dhcp-4.2.5b1/includes/dhcp.h	2012-12-17 13:23:34.446563877 +0100
-@@ -163,6 +163,7 @@ struct dhcp_packet {
+diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
+--- dhcp-4.3.4/includes/dhcp.h.rfc3442	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/includes/dhcp.h	2016-04-29 12:23:34.239032702 +0200
+@@ -159,6 +159,7 @@ struct dhcp_packet {
  #define DHO_ASSOCIATED_IP			92
  #define DHO_SUBNET_SELECTION			118 /* RFC3011! */
  #define DHO_DOMAIN_SEARCH			119 /* RFC3397 */
@@ -390,16 +390,16 @@  diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
  #define DHO_VIVCO_SUBOPTIONS			124
  #define DHO_VIVSO_SUBOPTIONS			125
  
-diff -up dhcp-4.2.5b1/includes/dhctoken.h.rfc3442 dhcp-4.2.5b1/includes/dhctoken.h
---- dhcp-4.2.5b1/includes/dhctoken.h.rfc3442	2012-12-17 13:23:34.348565167 +0100
-+++ dhcp-4.2.5b1/includes/dhctoken.h	2012-12-17 13:23:34.446563877 +0100
-@@ -365,7 +365,8 @@ enum dhcp_token {
- 	PRIMARY6 = 666,
- 	SECONDARY6 = 667,
- 	TOKEN_INFINIBAND = 668,
--	BOOTP_BROADCAST_ALWAYS = 669
-+	BOOTP_BROADCAST_ALWAYS = 669,
-+	DESTINATION_DESCRIPTOR = 670
+diff -up dhcp-4.3.4/includes/dhctoken.h.rfc3442 dhcp-4.3.4/includes/dhctoken.h
+--- dhcp-4.3.4/includes/dhctoken.h.rfc3442	2016-04-29 12:23:34.239032702 +0200
++++ dhcp-4.3.4/includes/dhctoken.h	2016-04-29 12:25:07.236008628 +0200
+@@ -374,7 +374,8 @@ enum dhcp_token {
+ 	LEASE_ID_FORMAT = 676,
+ 	TOKEN_HEX = 677,
+ 	TOKEN_OCTAL = 678,
+-	BOOTP_BROADCAST_ALWAYS = 679
++	BOOTP_BROADCAST_ALWAYS = 679,
++	DESTINATION_DESCRIPTOR = 680
  };
  
  #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
diff --git a/dhcp/patches/dhcp-4.2.0-honor-expired.patch b/dhcp/patches/0018-dhcp-honor-expired.patch
similarity index 77%
rename from dhcp/patches/dhcp-4.2.0-honor-expired.patch
rename to dhcp/patches/0018-dhcp-honor-expired.patch
index 0ae9128..bd89297 100644
--- a/dhcp/patches/dhcp-4.2.0-honor-expired.patch
+++ b/dhcp/patches/0018-dhcp-honor-expired.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
---- dhcp-4.2.0/client/dhc6.c.honor-expired	2010-10-07 12:55:37.000000000 +0200
-+++ dhcp-4.2.0/client/dhc6.c	2010-10-07 12:56:43.000000000 +0200
-@@ -1405,6 +1405,32 @@ start_info_request6(struct client_state 
+diff -up dhcp-4.3.0a1/client/dhc6.c.honor-expired dhcp-4.3.0a1/client/dhc6.c
+--- dhcp-4.3.0a1/client/dhc6.c.honor-expired	2013-12-19 16:00:28.062183037 +0100
++++ dhcp-4.3.0a1/client/dhc6.c	2013-12-19 16:00:28.076182842 +0100
+@@ -1351,6 +1351,32 @@ start_info_request6(struct client_state
  		go_daemon();
  }
  
@@ -34,7 +34,7 @@  diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
  /*
   * start_confirm6() kicks off an "init-reboot" version of the process, at
   * startup to find out if old bindings are 'fair' and at runtime whenever
-@@ -1417,8 +1446,10 @@ start_confirm6(struct client_state *clie
+@@ -1363,8 +1389,10 @@ start_confirm6(struct client_state *clie
  
  	/* If there is no active lease, there is nothing to check. */
  	if ((client->active_lease == NULL) ||
diff --git a/dhcp/patches/dhcp-4.2.5-PPP.patch b/dhcp/patches/0019-dhcp-PPP.patch
similarity index 62%
rename from dhcp/patches/dhcp-4.2.5-PPP.patch
rename to dhcp/patches/0019-dhcp-PPP.patch
index 1bc1e3f..b3d82ea 100644
--- a/dhcp/patches/dhcp-4.2.5-PPP.patch
+++ b/dhcp/patches/0019-dhcp-PPP.patch
@@ -1,7 +1,31 @@ 
-diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
---- dhcp-4.2.4b1/client/dhc6.c.PPP	2012-04-16 17:37:23.243618764 +0200
-+++ dhcp-4.2.4b1/client/dhc6.c	2012-04-16 17:37:23.252618638 +0200
-@@ -133,7 +133,7 @@ extern int stateless;
+diff -up dhcp-4.3.4/client/dhc6.c.PPP dhcp-4.3.4/client/dhc6.c
+--- dhcp-4.3.4/client/dhc6.c.PPP	2016-04-29 12:46:29.824988665 +0200
++++ dhcp-4.3.4/client/dhc6.c	2016-04-29 12:46:29.828988666 +0200
+@@ -5641,7 +5641,8 @@ make_client6_options(struct client_state
+ 	 */
+ 	if ((oc = lookup_option(&dhcpv6_universe, *op,
+ 				D6O_CLIENTID)) == NULL) {
+-		if (!option_cache(&oc, &default_duid, NULL, clientid_option,
++		if (default_duid.len == 0 ||
++		    !option_cache(&oc, &default_duid, NULL, clientid_option,
+ 				  MDL))
+ 			log_fatal("Failure assembling a DUID.");
+ 
+diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.PPP	2016-04-29 12:46:29.815988664 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:46:29.830988666 +0200
+@@ -1077,8 +1077,8 @@ main(int argc, char **argv) {
+ 			if (default_duid.buffer != NULL)
+ 				data_string_forget(&default_duid, MDL);
+ 
+-			form_duid(&default_duid, MDL);
+-			write_duid(&default_duid);
++			if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
++				write_duid(&default_duid);
+ 		}
+ 	}
+ 
+@@ -3808,7 +3808,7 @@ write_options(struct client_state *clien
   * is not how it is intended.  Upcoming rearchitecting the client should
   * address this "one daemon model."
   */
@@ -10,7 +34,7 @@  diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
  form_duid(struct data_string *duid, const char *file, int line)
  {
  	struct interface_info *ip;
-@@ -145,6 +145,15 @@ form_duid(struct data_string *duid, cons
+@@ -3821,6 +3821,15 @@ form_duid(struct data_string *duid, cons
  	if (ip == NULL)
  		log_fatal("Impossible condition at %s:%d.", MDL);
  
@@ -26,42 +50,18 @@  diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
  	if ((ip->hw_address.hlen == 0) ||
  	    (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
  		log_fatal("Impossible hardware address length at %s:%d.", MDL);
-@@ -180,6 +189,8 @@ form_duid(struct data_string *duid, cons
- 		memcpy(duid->buffer->data + 4, ip->hw_address.hbuf + 1,
- 		       ip->hw_address.hlen - 1);
+@@ -3866,6 +3875,8 @@ form_duid(struct data_string *duid, cons
+ 		log_info("Created duid %s.", str);
+ 		dfree(str, MDL);
  	}
-+
++	
 +	return ISC_R_SUCCESS;
  }
  
- /*
-@@ -5130,7 +5141,8 @@ make_client6_options(struct client_state
- 	 */
- 	if ((oc = lookup_option(&dhcpv6_universe, *op,
- 				D6O_CLIENTID)) == NULL) {
--		if (!option_cache(&oc, &default_duid, NULL, clientid_option,
-+		if (default_duid.len == 0 ||
-+		    !option_cache(&oc, &default_duid, NULL, clientid_option,
- 				  MDL))
- 			log_fatal("Failure assembling a DUID.");
- 
-diff -up dhcp-4.2.4b1/client/dhclient.c.PPP dhcp-4.2.4b1/client/dhclient.c
---- dhcp-4.2.4b1/client/dhclient.c.PPP	2012-04-16 17:37:23.214619170 +0200
-+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:37:23.254618610 +0200
-@@ -919,8 +919,8 @@ main(int argc, char **argv) {
- 			if (default_duid.buffer != NULL)
- 				data_string_forget(&default_duid, MDL);
- 
--			form_duid(&default_duid, MDL);
--			write_duid(&default_duid);
-+			if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
-+				write_duid(&default_duid);
- 		}
- 
- 		for (ip = interfaces ; ip != NULL ; ip = ip->next) {
-diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c
---- dhcp-4.2.4b1/common/bpf.c.PPP	2012-04-16 17:37:23.175619716 +0200
-+++ dhcp-4.2.4b1/common/bpf.c	2012-04-16 17:37:23.255618596 +0200
+ /* Write the default DUID to the lease store. */
+diff -up dhcp-4.3.4/common/bpf.c.PPP dhcp-4.3.4/common/bpf.c
+--- dhcp-4.3.4/common/bpf.c.PPP	2016-04-29 12:46:29.794988660 +0200
++++ dhcp-4.3.4/common/bpf.c	2016-04-29 12:46:29.830988666 +0200
 @@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har
                          memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
                          break;
@@ -85,10 +85,10 @@  diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c
                  default:
                          log_fatal("Unsupported device type %d for \"%s\"",
                                    sa->sdl_type, name);
-diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c
---- dhcp-4.2.4b1/common/lpf.c.PPP	2012-04-16 17:37:23.155619996 +0200
-+++ dhcp-4.2.4b1/common/lpf.c	2012-04-16 17:37:23.256618582 +0200
-@@ -503,6 +503,22 @@ get_hw_addr(const char *name, struct har
+diff -up dhcp-4.3.4/common/lpf.c.PPP dhcp-4.3.4/common/lpf.c
+--- dhcp-4.3.4/common/lpf.c.PPP	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/lpf.c	2016-04-29 12:46:29.830988666 +0200
+@@ -548,6 +548,22 @@ get_hw_addr(const char *name, struct har
  			hw->hbuf[0] = HTYPE_FDDI;
  			memcpy(&hw->hbuf[1], sa->sa_data, 6);
  			break;
@@ -111,22 +111,22 @@  diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c
  		default:
  			log_fatal("Unsupported device type %ld for \"%s\"",
  				  (long int)sa->sa_family, name);
-diff -up dhcp-4.2.4b1/includes/dhcpd.h.PPP dhcp-4.2.4b1/includes/dhcpd.h
---- dhcp-4.2.4b1/includes/dhcpd.h.PPP	2012-04-16 17:37:23.239618820 +0200
-+++ dhcp-4.2.4b1/includes/dhcpd.h	2012-04-16 17:37:23.257618568 +0200
-@@ -2760,7 +2760,7 @@ void dhcpv4_client_assignments(void);
- void dhcpv6_client_assignments(void);
+diff -up dhcp-4.3.4/includes/dhcpd.h.PPP dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.PPP	2016-04-29 12:46:29.831988667 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:47:13.167995959 +0200
+@@ -2990,7 +2990,7 @@ void client_dns_remove(struct client_sta
  
- /* dhc6.c */
+ void dhcpv4_client_assignments(void);
+ void dhcpv6_client_assignments(void);
 -void form_duid(struct data_string *duid, const char *file, int line);
 +isc_result_t form_duid(struct data_string *duid, const char *file, int line);
- void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line);
- void start_init6(struct client_state *client);
- void start_info_request6(struct client_state *client);
-diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h
---- dhcp-4.2.4b1/includes/dhcp.h.PPP	2012-04-16 17:37:23.000000000 +0200
-+++ dhcp-4.2.4b1/includes/dhcp.h	2012-04-16 17:38:34.675618138 +0200
-@@ -85,6 +85,8 @@ struct dhcp_packet {
+ 
+ void dhcp4o6_start(void);
+ 
+diff -up dhcp-4.3.4/includes/dhcp.h.PPP dhcp-4.3.4/includes/dhcp.h
+--- dhcp-4.3.4/includes/dhcp.h.PPP	2016-04-29 12:46:29.822988665 +0200
++++ dhcp-4.3.4/includes/dhcp.h	2016-04-29 12:46:29.832988667 +0200
+@@ -81,6 +81,8 @@ struct dhcp_packet {
  					 * is no standard for this so we
  					 * just steal a type            */
  
@@ -135,10 +135,10 @@  diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h
  /* Magic cookie validating dhcp options field (and bootp vendor
     extensions field). */
  #define DHCP_OPTIONS_COOKIE	"\143\202\123\143"
-diff -up dhcp-4.2.4b1/server/dhcpv6.c.PPP dhcp-4.2.4b1/server/dhcpv6.c
---- dhcp-4.2.4b1/server/dhcpv6.c.PPP	2012-04-16 17:37:23.218619114 +0200
-+++ dhcp-4.2.4b1/server/dhcpv6.c	2012-04-16 17:37:23.260618526 +0200
-@@ -300,6 +300,9 @@ generate_new_server_duid(void) {
+diff -up dhcp-4.3.4/server/dhcpv6.c.PPP dhcp-4.3.4/server/dhcpv6.c
+--- dhcp-4.3.4/server/dhcpv6.c.PPP	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/server/dhcpv6.c	2016-04-29 12:46:29.833988667 +0200
+@@ -454,6 +454,9 @@ generate_new_server_duid(void) {
  		if (p->hw_address.hlen > 0) {
  			break;
  		}
diff --git a/dhcp/patches/dhcp-4.2.5-lpf-ib.patch b/dhcp/patches/0020-dhcp-lpf-ib.patch
similarity index 70%
rename from dhcp/patches/dhcp-4.2.5-lpf-ib.patch
rename to dhcp/patches/0020-dhcp-lpf-ib.patch
index a136c6c..766d518 100644
--- a/dhcp/patches/dhcp-4.2.5-lpf-ib.patch
+++ b/dhcp/patches/0020-dhcp-lpf-ib.patch
@@ -1,16 +1,16 @@ 
-diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-4.2.4-P2/client/dhclient.c
---- dhcp-4.2.4-P2/client/dhclient.c.lpf-ib	2012-11-30 14:05:07.399394154 +0100
-+++ dhcp-4.2.4-P2/client/dhclient.c	2012-11-30 14:05:07.406394070 +0100
-@@ -113,6 +113,8 @@ static int check_domain_name_list(const
- static int check_option_values(struct universe *universe, unsigned int opt,
- 			       const char *ptr, size_t len);
+diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.lpf-ib	2016-05-02 14:37:36.945128001 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-05-02 14:37:36.952128005 +0200
+@@ -163,6 +163,8 @@ static const char use_noarg[] = "No argu
+ static const char use_v6command[] = "Command not used for DHCPv4: %s";
+ #endif
  
 +static void setup_ib_interface(struct interface_info *ip);
 +
- int
- main(int argc, char **argv) {
- 	int fd;
-@@ -909,6 +911,14 @@ main(int argc, char **argv) {
+ static void
+ usage(const char *sfmt, const char *sarg)
+ {
+@@ -1066,6 +1068,13 @@ main(int argc, char **argv) {
  	}
  	srandom(seed + cur_time + (unsigned)getpid());
  
@@ -21,11 +21,10 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-4.2.4-P2/client/dhclient.c
 +			setup_ib_interface(ip);
 +		}
 +	}
-+
- 	/* Start a configuration state machine for each interface. */
- #ifdef DHCPv6
- 	if (local_family == AF_INET6) {
-@@ -1185,6 +1195,29 @@ int find_subnet (struct subnet **sp,
+ 
+ 	/*
+ 	 * Establish a default DUID.  We always do so for v6 and
+@@ -1361,6 +1370,29 @@ int find_subnet (struct subnet **sp,
  	return 0;
  }
  
@@ -55,10 +54,10 @@  diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-4.2.4-P2/client/dhclient.c
  /* Individual States:
   *
   * Each routine is called from the dhclient_state_machine() in one of
-diff -up dhcp-4.2.4-P2/common/bpf.c.lpf-ib dhcp-4.2.4-P2/common/bpf.c
---- dhcp-4.2.4-P2/common/bpf.c.lpf-ib	2012-11-30 14:05:07.394394214 +0100
-+++ dhcp-4.2.4-P2/common/bpf.c	2012-11-30 14:05:07.407394058 +0100
-@@ -198,11 +198,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
+diff -up dhcp-4.3.4/common/bpf.c.lpf-ib dhcp-4.3.4/common/bpf.c
+--- dhcp-4.3.4/common/bpf.c.lpf-ib	2016-05-02 14:37:36.946128001 +0200
++++ dhcp-4.3.4/common/bpf.c	2016-05-02 14:37:36.952128005 +0200
+@@ -198,11 +198,43 @@ struct bpf_insn dhcp_bpf_filter [] = {
  	BPF_STMT(BPF_RET+BPF_K, 0),
  };
  
@@ -94,30 +93,44 @@  diff -up dhcp-4.2.4-P2/common/bpf.c.lpf-ib dhcp-4.2.4-P2/common/bpf.c
 +};
 +
  #if defined (DEC_FDDI)
- struct bpf_insn *bpf_fddi_filter;
+ struct bpf_insn *bpf_fddi_filter = NULL;
  #endif
  
  int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn);
 +int dhcp_ib_bpf_filter_len = sizeof dhcp_ib_bpf_filter / sizeof (struct bpf_insn);
-+
  #if defined (HAVE_TR_SUPPORT)
  struct bpf_insn dhcp_bpf_tr_filter [] = {
          /* accept all token ring packets due to variable length header */
-diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
---- dhcp-4.2.4-P2/common/lpf.c.lpf-ib	2012-11-30 14:05:07.394394214 +0100
-+++ dhcp-4.2.4-P2/common/lpf.c	2012-11-30 14:19:27.211031532 +0100
-@@ -42,6 +42,7 @@
- #include "includes/netinet/udp.h"
- #include "includes/netinet/if_ether.h"
+diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
+--- dhcp-4.3.4/common/discover.c.lpf-ib	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/discover.c	2016-05-02 14:38:08.257147982 +0200
+@@ -1235,7 +1235,7 @@ discover_interfaces(int state) {
+ 				if_register_send(tmp);
+ 			} else {
+ 				/* get_hw_addr() was called by register. */
+-				get_hw_addr(tmp->name, &tmp->hw_address);
++				get_hw_addr(tmp);
+ 			}
+ 			break;
+ #ifdef DHCPv6
+@@ -1248,7 +1248,7 @@ discover_interfaces(int state) {
+ 				   so now we have to call it explicitly
+ 				   to not leave the hardware address unknown
+ 				   (some code expects it cannot be. */
+-				get_hw_addr(tmp->name, &tmp->hw_address);
++				get_hw_addr(tmp);
+ 			} else {
+ 				if_register_linklocal6(tmp);
+ 			}
+diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
+--- dhcp-4.3.4/common/lpf.c.lpf-ib	2016-05-02 14:37:36.947128002 +0200
++++ dhcp-4.3.4/common/lpf.c	2016-05-02 14:37:36.953128006 +0200
+@@ -47,6 +47,17 @@
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
  #include <net/if.h>
 +#include <ifaddrs.h>
- 
- #ifndef PACKET_AUXDATA
- #define PACKET_AUXDATA 8
-@@ -59,6 +60,15 @@ struct tpacket_auxdata
- /* Reinitializes the specified interface after an address change.   This
-    is not required for packet-filter APIs. */
- 
++
 +/* Default broadcast address for IPoIB */
 +static unsigned char default_ib_bcast_addr[20] = {
 + 	0x00, 0xff, 0xff, 0xff,
@@ -127,21 +140,17 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +	0xff, 0xff, 0xff, 0xff
 +};
 +
- #ifdef USE_LPF_SEND
- void if_reinitialize_send (info)
- 	struct interface_info *info;
-@@ -86,10 +96,21 @@ int if_register_lpf (info)
+ #endif
+ 
+ #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
+@@ -80,10 +91,20 @@ int if_register_lpf (info)
  		struct sockaddr common;
- 	} sa;
+ 		} sa;
  	struct ifreq ifr;
 +	int type;
 +	int protocol;
- 
- 	/* Make an LPF socket. */
--	if ((sock = socket(PF_PACKET, SOCK_RAW,
--			   htons((short)ETH_P_ALL))) < 0) {
-+	get_hw_addr(info);
 +
++	get_hw_addr(info);
 +	if (info->hw_address.hbuf[0] == HTYPE_INFINIBAND) {
 +		type = SOCK_DGRAM;
 +		protocol = ETHERTYPE_IP;
@@ -149,12 +158,15 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +		type = SOCK_RAW;
 +		protocol = ETH_P_ALL;
 +	}
-+
+ 
+ 	/* Make an LPF socket. */
+-	if ((sock = socket(PF_PACKET, SOCK_RAW,
+-			   htons((short)ETH_P_ALL))) < 0) {
 +	if ((sock = socket(PF_PACKET, type, htons((short)protocol))) < 0) {
  		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
  		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
  		    errno == EAFNOSUPPORT || errno == EINVAL) {
-@@ -112,6 +133,7 @@ int if_register_lpf (info)
+@@ -106,6 +127,7 @@ int if_register_lpf (info)
  	/* Bind to the interface name */
  	memset (&sa, 0, sizeof sa);
  	sa.ll.sll_family = AF_PACKET;
@@ -162,8 +174,8 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  	sa.ll.sll_ifindex = ifr.ifr_ifindex;
  	if (bind (sock, &sa.common, sizeof sa)) {
  		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
-@@ -127,8 +149,6 @@ int if_register_lpf (info)
- 		log_fatal ("Bind socket to interface: %m");
+@@ -122,8 +144,6 @@ int if_register_lpf (info)
+ 
  	}
  
 -	get_hw_addr(info->name, &info->hw_address);
@@ -171,7 +183,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  	return sock;
  }
  #endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
-@@ -183,6 +203,8 @@ void if_deregister_send (info)
+@@ -178,6 +198,8 @@ void if_deregister_send (info)
     in bpf includes... */
  extern struct sock_filter dhcp_bpf_filter [];
  extern int dhcp_bpf_filter_len;
@@ -180,26 +192,25 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  
  #if defined (HAVE_TR_SUPPORT)
  extern struct sock_filter dhcp_bpf_tr_filter [];
-@@ -200,11 +222,13 @@ void if_register_receive (info)
- 	/* Open a LPF device and hang it on this interface... */
- 	info -> rfdesc = if_register_lpf (info);
- 
--	val = 1;
--	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
--			sizeof val) < 0) {
--		if (errno != ENOPROTOOPT)
+@@ -196,11 +218,12 @@ void if_register_receive (info)
+ #ifdef PACKET_AUXDATA
+ 	{
+ 	int val = 1;
+-
+-	if (setsockopt(info->rfdesc, SOL_PACKET, PACKET_AUXDATA,
+-		       &val, sizeof(val)) < 0) {
+-		if (errno != ENOPROTOOPT) {
 -			log_fatal ("Failed to set auxiliary packet data: %m");
 +	if (info->hw_address.hbuf[0] != HTYPE_INFINIBAND) {
-+		val = 1;
-+		if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA,
-+				&val, sizeof val) < 0) {
-+			if (errno != ENOPROTOOPT)
++		if (setsockopt(info->rfdesc, SOL_PACKET, PACKET_AUXDATA,
++			      &val, sizeof(val)) < 0) {
++			if (errno != ENOPROTOOPT) {
 +				log_fatal ("Failed to set auxiliary packet data: %m");
-+		}
++			}
+ 		}
  	}
- 
- #if defined (HAVE_TR_SUPPORT)
-@@ -250,15 +274,28 @@ static void lpf_gen_filter_setup (info)
+ 	}
+@@ -250,15 +273,28 @@ static void lpf_gen_filter_setup (info)
  
  	memset(&p, 0, sizeof(p));
  
@@ -237,7 +248,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  
  	if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p,
  			sizeof p) < 0) {
-@@ -315,6 +352,54 @@ static void lpf_tr_filter_setup (info)
+@@ -315,6 +351,54 @@ static void lpf_tr_filter_setup (info)
  #endif /* USE_LPF_RECEIVE */
  
  #ifdef USE_LPF_SEND
@@ -292,7 +303,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  ssize_t send_packet (interface, packet, raw, len, from, to, hto)
  	struct interface_info *interface;
  	struct packet *packet;
-@@ -335,6 +420,11 @@ ssize_t send_packet (interface, packet,
+@@ -335,6 +419,11 @@ ssize_t send_packet (interface, packet,
  		return send_fallback (interface, packet, raw,
  				      len, from, to, hto);
  
@@ -304,7 +315,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  	if (hto == NULL && interface->anycast_mac_addr.hlen)
  		hto = &interface->anycast_mac_addr;
  
-@@ -356,6 +446,42 @@ ssize_t send_packet (interface, packet,
+@@ -355,6 +444,42 @@ ssize_t send_packet (interface, packet,
  #endif /* USE_LPF_SEND */
  
  #ifdef USE_LPF_RECEIVE
@@ -347,21 +358,21 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  ssize_t receive_packet (interface, buf, len, from, hfrom)
  	struct interface_info *interface;
  	unsigned char *buf;
-@@ -382,6 +508,10 @@ ssize_t receive_packet (interface, buf,
+@@ -393,6 +518,10 @@ ssize_t receive_packet (interface, buf,
  	};
- 	struct cmsghdr *cmsg;
+ #endif /* PACKET_AUXDATA */
  
 +	if (interface->hw_address.hbuf[0] == HTYPE_INFINIBAND) {
 +		return receive_packet_ib(interface, buf, len, from, hfrom);
 +	}
 +
- 	length = recvmsg (interface -> rfdesc, &msg, 0);
+ 	length = recvmsg (interface->rfdesc, &msg, 0);
  	if (length <= 0)
  		return length;
-@@ -461,11 +591,32 @@ void maybe_setup_fallback ()
- 	}
- }
+@@ -506,11 +635,33 @@ void maybe_setup_fallback ()
+ #endif
  
+ #if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
 -void
 -get_hw_addr(const char *name, struct hardware *hw) {
 +struct sockaddr_ll *
@@ -380,6 +391,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +		if (strcmp((*ifa)->ifa_name, name) == 0)
 +			return (struct sockaddr_ll *)(void *)(*ifa)->ifa_addr;
 +	}
++	*ifa = NULL;
 +	return NULL;
 +}
 +
@@ -394,7 +406,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  
  	if (strlen(name) >= sizeof(tmp.ifr_name)) {
  		log_fatal("Device name too long: \"%s\"", name);
-@@ -479,16 +630,52 @@ get_hw_addr(const char *name, struct har
+@@ -524,16 +675,61 @@ get_hw_addr(const char *name, struct har
  	memset(&tmp, 0, sizeof(tmp));
  	strcpy(tmp.ifr_name, name);
  	if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
@@ -412,6 +424,13 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +		log_fatal("Unable to allocate memory for link layer address");
 +	memcpy(&sll->sll_hatype, &sa->sa_family, sizeof (sll->sll_hatype));
 +	memcpy(sll->sll_addr, sa->sa_data, sizeof (sll->sll_addr));
++	switch (sll->sll_hatype) {
++		case ARPHRD_INFINIBAND:
++			sll->sll_halen = HARDWARE_ADDR_LEN_IOCTL;
++			break;
++		default:
++			break;
++	}
 +	return sll;
 +}
 +
@@ -424,6 +443,8 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +	struct ifaddrs *ifa = NULL;
 +	struct sockaddr_ll *sll = NULL;
 +	int sll_allocated = 0;
++	char *dup = NULL;
++	char *colon = NULL;
 +
 +	if (getifaddrs(&ifaddrs) == -1)
 +		log_fatal("Failed to get interfaces");
@@ -437,7 +458,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +		if (sll != NULL)
 +			sll_allocated = 1;
 +		else
-+			// shouldn't happed
++			// shouldn't happen
 +			log_fatal("Unexpected internal error");
 +	}
 +
@@ -450,7 +471,7 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  			break;
  		case ARPHRD_IEEE802:
  #ifdef ARPHRD_IEEE802_TR
-@@ -496,18 +683,35 @@ get_hw_addr(const char *name, struct har
+@@ -541,18 +737,50 @@ get_hw_addr(const char *name, struct har
  #endif /* ARPHRD_IEEE802_TR */
  			hw->hlen = 7;
  			hw->hbuf[0] = HTYPE_IEEE802;
@@ -464,10 +485,22 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +			memcpy(&hw->hbuf[1], sll->sll_addr, 6);
 +			break;
 +		case ARPHRD_INFINIBAND:
++			dup = strdup(name);
++			/* Aliased infiniband interface is special case where
++			 * neither get_ll() nor ioctl_get_ll() get's correct hw
++			 * address, so we have to truncate the :0 and run
++			 * get_ll() again for the rest.
++			*/
++			if ((colon = strchr(dup, ':')) != NULL) {
++				*colon = '\0';
++				if ((sll = get_ll(ifaddrs, &ifa, dup)) == NULL)
++					log_fatal("Error getting hardware address for \"%s\": %m", name);
++			}
++			free (dup);
 +			/* For Infiniband, save the broadcast address and store
 +			 * the port GUID into the hardware address.
 +			 */
-+			if (ifa->ifa_flags & IFF_BROADCAST) {
++			if (ifa && (ifa->ifa_flags & IFF_BROADCAST)) {
 +				struct sockaddr_ll *bll;
 +
 +				bll = (struct sockaddr_ll *)ifa->ifa_broadaddr;
@@ -477,8 +510,11 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +				       20);
 +			}
 +
-+			hw->hlen = 1;
++			hw->hlen = HARDWARE_ADDR_LEN_IOCTL + 1;
 +			hw->hbuf[0] = HTYPE_INFINIBAND;
++			memcpy(&hw->hbuf[1],
++			       &sll->sll_addr[sll->sll_halen - HARDWARE_ADDR_LEN_IOCTL],
++			       HARDWARE_ADDR_LEN_IOCTL);
  			break;
  #if defined(ARPHRD_PPP)
  		case ARPHRD_PPP:
@@ -490,14 +526,14 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
  			hw->hlen = 0;
  			hw->hbuf[0] = HTYPE_RESERVED;
  			/* 0xdeadbeef should never occur on the wire,
-@@ -520,10 +724,13 @@ get_hw_addr(const char *name, struct har
+@@ -565,10 +793,13 @@ get_hw_addr(const char *name, struct har
  			break;
  #endif
  		default:
 -			log_fatal("Unsupported device type %ld for \"%s\"",
 -				  (long int)sa->sa_family, name);
 +			freeifaddrs(ifaddrs);
-+			log_fatal("Unsupported device type %h for \"%s\"",
++			log_fatal("Unsupported device type %hu for \"%s\"",
 +				  sll->sll_hatype, name);
  	}
  
@@ -507,11 +543,11 @@  diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
 +	freeifaddrs(ifaddrs);
  }
  #endif
-diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
---- dhcp-4.2.4-P2/common/socket.c.lpf-ib	2012-08-24 21:11:21.000000000 +0200
-+++ dhcp-4.2.4-P2/common/socket.c	2012-11-30 14:05:07.408394046 +0100
-@@ -325,7 +325,7 @@ void if_register_send (info)
- 	info->wfdesc = if_register_socket(info, AF_INET, 0);
+diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
+--- dhcp-4.3.4/common/socket.c.lpf-ib	2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/socket.c	2016-05-02 14:37:36.953128006 +0200
+@@ -328,7 +328,7 @@ void if_register_send (info)
+ 	info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
  	/* If this is a normal IPv4 address, get the hardware address. */
  	if (strcmp(info->name, "fallback") != 0)
 -		get_hw_addr(info->name, &info->hw_address);
@@ -519,7 +555,7 @@  diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
  #if defined (USE_SOCKET_FALLBACK)
  	/* Fallback only registers for send, but may need to receive as
  	   well. */
-@@ -388,7 +388,7 @@ void if_register_receive (info)
+@@ -391,7 +391,7 @@ void if_register_receive (info)
  #endif /* IP_PKTINFO... */
  	/* If this is a normal IPv4 address, get the hardware address. */
  	if (strcmp(info->name, "fallback") != 0)
@@ -528,7 +564,7 @@  diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
  
  	if (!quiet_interface_discovery)
  		log_info ("Listening on Socket/%s%s%s",
-@@ -498,7 +498,7 @@ if_register6(struct interface_info *info
+@@ -505,7 +505,7 @@ if_register6(struct interface_info *info
  	if (req_multi)
  		if_register_multicast(info);
  
@@ -537,10 +573,29 @@  diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
  
  	if (!quiet_interface_discovery) {
  		if (info->shared_network != NULL) {
-diff -up dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib dhcp-4.2.4-P2/includes/dhcpd.h
---- dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib	2012-11-30 14:05:07.400394142 +0100
-+++ dhcp-4.2.4-P2/includes/dhcpd.h	2012-11-30 14:05:07.409394034 +0100
-@@ -1249,6 +1249,7 @@ struct interface_info {
+@@ -561,7 +561,7 @@ if_register_linklocal6(struct interface_
+ 	info->rfdesc = sock;
+ 	info->wfdesc = sock;
+ 
+-	get_hw_addr(info->name, &info->hw_address);
++	get_hw_addr(info);
+ 
+ 	if (!quiet_interface_discovery) {
+ 		if (info->shared_network != NULL) {
+diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.lpf-ib	2016-05-02 14:37:36.948128002 +0200
++++ dhcp-4.3.4/includes/dhcpd.h	2016-05-02 14:37:36.954128006 +0200
+@@ -482,6 +482,9 @@ struct packet {
+ 
+ #define HARDWARE_ADDR_LEN 20
+ 
++/* ioctl limits hardware addresses to 8 bytes */
++#define HARDWARE_ADDR_LEN_IOCTL	8
++
+ struct hardware {
+ 	u_int8_t hlen;
+ 	u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
+@@ -1343,6 +1346,7 @@ struct interface_info {
  	struct shared_network *shared_network;
  				/* Networks connected to this interface. */
  	struct hardware hw_address;	/* Its physical address. */
@@ -548,12 +603,12 @@  diff -up dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib dhcp-4.2.4-P2/includes/dhcpd.h
  	struct in_addr *addresses;	/* Addresses associated with this
  					 * interface.
  					 */
-@@ -2368,7 +2369,7 @@ void print_dns_status (int, struct dhcp_
+@@ -2580,7 +2584,7 @@ void print_dns_status (int, struct dhcp_
  #endif
  const char *print_time(TIME);
  
 -void get_hw_addr(const char *name, struct hardware *hw);
 +void get_hw_addr(struct interface_info *info);
- 
- /* socket.c */
- #if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
+ char *buf_to_hex (const unsigned char *s, unsigned len,
+                    const char *file, int line);
+ char *format_lease_id(const unsigned char *s, unsigned len, int format,
diff --git a/dhcp/patches/0021-dhcp-IPoIB-log-id.patch b/dhcp/patches/0021-dhcp-IPoIB-log-id.patch
new file mode 100644
index 0000000..97e9dd5
--- /dev/null
+++ b/dhcp/patches/0021-dhcp-IPoIB-log-id.patch
@@ -0,0 +1,165 @@ 
+diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
+--- dhcp-4.3.4/server/dhcp.c.IPoIB-log-id	2016-04-29 12:52:14.285061620 +0200
++++ dhcp-4.3.4/server/dhcp.c	2016-04-29 12:53:59.535088020 +0200
+@@ -85,6 +85,42 @@ const int dhcp_type_name_max = ((sizeof
+ # define send_packet trace_packet_send
+ #endif
+ 
++char *print_client_identifier_from_packet (packet)
++	struct packet *packet;
++{
++	struct option_cache *oc;
++	struct data_string client_identifier;
++	char *ci;
++
++	memset (&client_identifier, 0, sizeof client_identifier);
++
++	oc = lookup_option (&dhcp_universe, packet -> options,
++			DHO_DHCP_CLIENT_IDENTIFIER);
++	if (oc &&
++	    evaluate_option_cache (&client_identifier,
++				    packet, (struct lease *)0,
++				    (struct client_state *)0,
++				    packet -> options,
++				    (struct option_state *)0,
++				    &global_scope, oc, MDL)) {
++		ci = print_hw_addr (HTYPE_INFINIBAND, client_identifier.len, client_identifier.data);
++		data_string_forget (&client_identifier, MDL);
++		return ci;
++	} else
++		return "\"no client id\"";
++}
++
++char *print_hw_addr_or_client_id (packet)
++	struct packet *packet;
++{
++	if (packet -> raw -> htype == HTYPE_INFINIBAND)
++		return print_client_identifier_from_packet (packet);
++	else
++		return print_hw_addr (packet -> raw -> htype,
++				      packet -> raw -> hlen,
++				      packet -> raw -> chaddr);
++}
++
+ void
+ dhcp (struct packet *packet) {
+ 	int ms_nulltp = 0;
+@@ -127,9 +163,7 @@ dhcp (struct packet *packet) {
+ 
+ 		log_info("%s from %s via %s: %s", s,
+ 			 (packet->raw->htype
+-			  ? print_hw_addr(packet->raw->htype,
+-					  packet->raw->hlen,
+-					  packet->raw->chaddr)
++			  ? print_hw_addr_or_client_id(packet)
+ 			  : "<no identifier>"),
+ 			 packet->raw->giaddr.s_addr
+ 			 ? inet_ntoa(packet->raw->giaddr)
+@@ -326,9 +360,7 @@ void dhcpdiscover (packet, ms_nulltp)
+ #endif
+ 	snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
+ 		 (packet -> raw -> htype
+-		  ? print_hw_addr (packet -> raw -> htype,
+-				   packet -> raw -> hlen,
+-				   packet -> raw -> chaddr)
++		  ? print_hw_addr_or_client_id (packet)
+ 		  : (lease
+ 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
+ 		     : "<no identifier>")),
+@@ -540,9 +572,7 @@ void dhcprequest (packet, ms_nulltp, ip_
+ 		 "DHCPREQUEST for %s%s from %s %s%s%svia %s",
+ 		 piaddr (cip), smbuf,
+ 		 (packet -> raw -> htype
+-		  ? print_hw_addr (packet -> raw -> htype,
+-				   packet -> raw -> hlen,
+-				   packet -> raw -> chaddr)
++		  ? print_hw_addr_or_client_id(packet)
+ 		  : (lease
+ 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
+ 		     : "<no identifier>")),
+@@ -783,9 +813,7 @@ void dhcprelease (packet, ms_nulltp)
+ 	if ((oc = lookup_option (&dhcp_universe, packet -> options,
+ 				 DHO_DHCP_REQUESTED_ADDRESS))) {
+ 		log_info ("DHCPRELEASE from %s specified requested-address.",
+-		      print_hw_addr (packet -> raw -> htype,
+-				     packet -> raw -> hlen,
+-				     packet -> raw -> chaddr));
++		      print_hw_addr_or_client_id(packet));
+ 	}
+ 
+ 	oc = lookup_option (&dhcp_universe, packet -> options,
+@@ -877,9 +905,7 @@ void dhcprelease (packet, ms_nulltp)
+ 		 "DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
+ 		 cstr,
+ 		 (packet -> raw -> htype
+-		  ? print_hw_addr (packet -> raw -> htype,
+-				   packet -> raw -> hlen,
+-				   packet -> raw -> chaddr)
++		  ? print_hw_addr_or_client_id(packet)
+ 		  : (lease
+ 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
+ 		     : "<no identifier>")),
+@@ -984,9 +1010,7 @@ void dhcpdecline (packet, ms_nulltp)
+ 		 "DHCPDECLINE of %s from %s %s%s%svia %s",
+ 		 piaddr (cip),
+ 		 (packet -> raw -> htype
+-		  ? print_hw_addr (packet -> raw -> htype,
+-				   packet -> raw -> hlen,
+-				   packet -> raw -> chaddr)
++		  ? print_hw_addr_or_client_id(packet)
+ 		  : (lease
+ 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
+ 		     : "<no identifier>")),
+@@ -1683,8 +1707,7 @@ void dhcpinform (packet, ms_nulltp)
+ 	/* Report what we're sending. */
+ 	snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip),
+ 		 (packet->raw->htype && packet->raw->hlen) ?
+-			print_hw_addr(packet->raw->htype, packet->raw->hlen,
+-				      packet->raw->chaddr) :
++			print_hw_addr_or_client_id(packet) :
+ 			"<no client hardware address>");
+ 	log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
+ 					    packet->interface->name);
+@@ -1862,9 +1885,7 @@ void nak_lease (packet, cip, network_gro
+ #endif
+ 	log_info ("DHCPNAK on %s to %s via %s",
+ 	      piaddr (*cip),
+-	      print_hw_addr (packet -> raw -> htype,
+-			     packet -> raw -> hlen,
+-			     packet -> raw -> chaddr),
++	      print_hw_addr_or_client_id(packet),
+ 	      packet -> raw -> giaddr.s_addr
+ 	      ? inet_ntoa (packet -> raw -> giaddr)
+ 	      : packet -> interface -> name);
+@@ -3859,7 +3880,7 @@ void dhcp_reply (lease)
+ 		   ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
+ 		   : "BOOTREPLY"),
+ 		  piaddr (lease -> ip_addr),
+-		  (lease -> hardware_addr.hlen
++		  (lease -> hardware_addr.hlen > 1
+ 		   ? print_hw_addr (lease -> hardware_addr.hbuf [0],
+ 				    lease -> hardware_addr.hlen - 1,
+ 				    &lease -> hardware_addr.hbuf [1])
+@@ -4408,10 +4429,7 @@ int find_lease (struct lease **lp,
+ 			if (uid_lease) {
+ 			    if (uid_lease->binding_state == FTS_ACTIVE) {
+ 				log_error ("client %s has duplicate%s on %s",
+-					   (print_hw_addr
+-					    (packet -> raw -> htype,
+-					     packet -> raw -> hlen,
+-					     packet -> raw -> chaddr)),
++					   (print_hw_addr_or_client_id(packet)),
+ 					   " leases",
+ 					   (ip_lease -> subnet ->
+ 					    shared_network -> name));
+@@ -4578,9 +4596,7 @@ int find_lease (struct lease **lp,
+ 			log_error("uid lease %s for client %s is duplicate "
+ 				  "on %s",
+ 				  piaddr(uid_lease->ip_addr),
+-				  print_hw_addr(packet->raw->htype,
+-						packet->raw->hlen,
+-						packet->raw->chaddr),
++				  print_hw_addr_or_client_id(packet),
+ 				  uid_lease->subnet->shared_network->name);
+ 
+ 			if (!packet -> raw -> ciaddr.s_addr &&
diff --git a/dhcp/patches/dhcp-4.2.4-improved-xid.patch b/dhcp/patches/0022-dhcp-improved-xid.patch
similarity index 71%
rename from dhcp/patches/dhcp-4.2.4-improved-xid.patch
rename to dhcp/patches/0022-dhcp-improved-xid.patch
index f353fb0..69a6975 100644
--- a/dhcp/patches/dhcp-4.2.4-improved-xid.patch
+++ b/dhcp/patches/0022-dhcp-improved-xid.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclient.c
---- dhcp-4.2.4b1/client/dhclient.c.improved-xid	2012-04-16 17:42:37.444217424 +0200
-+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:45:32.105770755 +0200
-@@ -888,6 +888,26 @@ main(int argc, char **argv) {
+diff -up dhcp-4.3.4/client/dhclient.c.improved-xid dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.improved-xid	2016-04-29 12:54:55.997102182 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:57:25.123139587 +0200
+@@ -1045,6 +1045,26 @@ main(int argc, char **argv) {
  		}
  	}
  
@@ -28,7 +28,7 @@  diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
  	/* At this point, all the interfaces that the script thinks
  	   are relevant should be running, so now we once again call
  	   discover_interfaces(), and this time ask it to actually set
-@@ -902,14 +922,36 @@ main(int argc, char **argv) {
+@@ -1059,14 +1079,36 @@ main(int argc, char **argv) {
  	   Not much entropy, but we're booting, so we're not likely to
  	   find anything better. */
  	seed = 0;
@@ -59,80 +59,80 @@  diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-4.2.4b1/client/dhclien
 +		}
 +		/* we only use seed and no current time as a broadcast reply */
 +		/* will certainly be used by the hwaddrless interface */
-+		srandom(seed);
++		srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) + (unsigned)getpid());
 +	}
 +	else
-+	        srandom(seed + cur_time + (unsigned)getpid());
++	        srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) + (unsigned)getpid());
  
  	/* Setup specific Infiniband options */
  	for (ip = interfaces; ip; ip = ip->next) {
-@@ -1447,7 +1489,7 @@ void dhcpack (packet)
+@@ -1633,7 +1675,7 @@ void dhcpack (packet)
  		return;
  	}
  
 -	log_info ("DHCPACK from %s", piaddr (packet -> client_addr));
-+	log_info ("DHCPACK from %s (xid=0x%x)", piaddr (packet -> client_addr), client -> xid);
++	log_info ("DHCPACK from %s (xid=0x%x)", piaddr (packet -> client_addr), ntohl(client -> xid));
  
  	lease = packet_to_lease (packet, client);
  	if (!lease) {
-@@ -2164,7 +2206,7 @@ void dhcpnak (packet)
+@@ -2541,7 +2583,7 @@ void dhcpnak (packet)
  		return;
  	}
  
 -	log_info ("DHCPNAK from %s", piaddr (packet -> client_addr));
-+	log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet -> client_addr), client -> xid);
++	log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet -> client_addr), ntohl(client -> xid));
  
  	if (!client -> active) {
  #if defined (DEBUG)
-@@ -2290,10 +2332,10 @@ void send_discover (cpp)
- 		client -> packet.secs = htons (65535);
- 	client -> secs = client -> packet.secs;
- 
+@@ -2674,10 +2716,10 @@ void send_discover (cpp)
+ 			  (long)(client -> interval));
+ 	} else
+ #endif
 -	log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
 +	log_info ("DHCPDISCOVER on %s to %s port %d interval %ld (xid=0x%x)",
  	      client -> name ? client -> name : client -> interface -> name,
  	      inet_ntoa (sockaddr_broadcast.sin_addr),
 -	      ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval));
-+	      ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), client -> xid);
++	      ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), ntohl(client -> xid));
  
  	/* Send out a packet. */
- 	result = send_packet(client->interface, NULL, &client->packet,
-@@ -2577,10 +2619,10 @@ void send_request (cpp)
- 			client -> packet.secs = htons (65535);
- 	}
- 
+ #if defined(DHCPv6) && defined(DHCP4o6)
+@@ -2962,10 +3004,10 @@ void send_request (cpp)
+ 		log_info ("DHCPREQUEST");
+ 	} else
+ #endif
 -	log_info ("DHCPREQUEST on %s to %s port %d",
 +	log_info ("DHCPREQUEST on %s to %s port %d (xid=0x%x)",
  	      client -> name ? client -> name : client -> interface -> name,
  	      inet_ntoa (destination.sin_addr),
 -	      ntohs (destination.sin_port));
-+	      ntohs (destination.sin_port), client -> xid);
- 
- 	if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
- 	    fallback_interface) {
-@@ -2620,10 +2662,10 @@ void send_decline (cpp)
- 
- 	int result;
++	      ntohs (destination.sin_port), ntohl(client -> xid));
  
+ #if defined(DHCPv6) && defined(DHCP4o6)
+ 	if (dhcpv4_over_dhcpv6) {
+@@ -3022,10 +3064,10 @@ void send_decline (cpp)
+ 		log_info ("DHCPDECLINE");
+ 	} else
+ #endif
 -	log_info ("DHCPDECLINE on %s to %s port %d",
 +	log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)",
  	      client->name ? client->name : client->interface->name,
  	      inet_ntoa(sockaddr_broadcast.sin_addr),
 -	      ntohs(sockaddr_broadcast.sin_port));
-+	      ntohs(sockaddr_broadcast.sin_port), client -> xid);
++	      ntohs(sockaddr_broadcast.sin_port), ntohl(client -> xid));
  
  	/* Send out a packet. */
- 	result = send_packet(client->interface, NULL, &client->packet,
-@@ -2666,10 +2708,10 @@ void send_release (cpp)
- 		return;
- 	}
- 
+ #if defined(DHCPv6) && defined(DHCP4o6)
+@@ -3084,10 +3126,10 @@ void send_release (cpp)
+ 		log_info ("DHCPRELEASE");
+ 	} else
+ #endif
 -	log_info ("DHCPRELEASE on %s to %s port %d",
 +	log_info ("DHCPRELEASE on %s to %s port %d (xid=0x%x)",
  	      client -> name ? client -> name : client -> interface -> name,
  	      inet_ntoa (destination.sin_addr),
 -	      ntohs (destination.sin_port));
-+	      ntohs (destination.sin_port), client -> xid);
++	      ntohs (destination.sin_port), ntohl(client -> xid));
  
- 	if (fallback_interface) {
- 		result = send_packet(fallback_interface, NULL, &client->packet,
+ #if defined(DHCPv6) && defined(DHCP4o6)
+ 	if (dhcpv4_over_dhcpv6) {
diff --git a/dhcp/patches/0023-dhcp-duidv4.patch b/dhcp/patches/0023-dhcp-duidv4.patch
new file mode 100644
index 0000000..52fde3b
--- /dev/null
+++ b/dhcp/patches/0023-dhcp-duidv4.patch
@@ -0,0 +1,34 @@ 
+diff -up dhcp-4.3.1b1/client/dhclient.8.KrJcIv dhcp-4.3.1b1/client/dhclient.8
+--- dhcp-4.3.1b1/client/dhclient.8.KrJcIv	2014-07-10 17:39:25.852763873 +0200
++++ dhcp-4.3.1b1/client/dhclient.8	2014-07-10 17:54:26.841012988 +0200
+@@ -458,6 +458,9 @@ used to construct a RFC4361 style client
+ in the client's messages.  This client id can be overridden by
+ setting a client id in the configuration file.  Overridding the
+ client id in this fashion is discouraged.
++This option is turned on by default, if you want to redefine or turn off
++sending of client id, use send dhcp-client-identifier = "better identifier"
++or send dhcp-client-identifier = "" in /etc/dhcp/dhclient.conf.
+ .TP
+ .BI \-I
+ Use the standard DDNS scheme from RFCs 4701 & 4702.  
+diff -up dhcp-4.3.1b1/client/dhclient.c.KrJcIv dhcp-4.3.1b1/client/dhclient.c
+--- dhcp-4.3.1b1/client/dhclient.c.KrJcIv	2014-07-10 17:54:26.829013157 +0200
++++ dhcp-4.3.1b1/client/dhclient.c	2014-07-10 17:55:50.155835918 +0200
+@@ -73,7 +73,7 @@ struct sockaddr_in sockaddr_broadcast;
+ struct in_addr giaddr;
+ struct data_string default_duid;
+ int duid_type = 0;
+-int duid_v4 = 0;
++int duid_v4 = 1;
+ int std_dhcid = 0;
+ 
+ /* ASSERT_STATE() does nothing now; it used to be
+@@ -1301,7 +1301,7 @@ static void setup_ib_interface(struct in
+ 	}
+ 
+ 	/* No client ID specified */
+-	log_fatal("dhcp-client-identifier must be specified for InfiniBand");
++	//log_fatal("dhcp-client-identifier must be specified for InfiniBand");
+ }
+ 
+ /* Individual States:
diff --git a/dhcp/patches/0024-dhcp-duid_uuid.patch b/dhcp/patches/0024-dhcp-duid_uuid.patch
new file mode 100644
index 0000000..f90bc4a
--- /dev/null
+++ b/dhcp/patches/0024-dhcp-duid_uuid.patch
@@ -0,0 +1,111 @@ 
+diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.duid_uuid	2016-04-29 12:58:14.846150838 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:58:14.851150839 +0200
+@@ -3868,6 +3868,59 @@ write_options(struct client_state *clien
+ 	}
+ }
+ 
++int unhexchar(char c) {
++
++	if (c >= '0' && c <= '9')
++		return c - '0';
++
++	if (c >= 'a' && c <= 'f')
++		return c - 'a' + 10;
++
++	if (c >= 'A' && c <= 'F')
++		return c - 'A' + 10;
++
++	return -1;
++}
++
++isc_result_t
++read_uuid(u_int8_t* uuid) {
++	const char *id_fname = "/etc/machine-id";
++	char id[32];
++	size_t nread;
++	FILE * file = fopen( id_fname , "r");
++	if (!file) {
++		log_debug("Cannot open %s", id_fname);
++		return ISC_R_IOERROR;
++	}
++	nread = fread(id, 1, sizeof id, file);
++	fclose(file);
++
++	if (nread < 32) {
++		log_debug("Not enough data in %s", id_fname);
++		return ISC_R_IOERROR;
++	}
++
++	for (int j = 0; j < 16; j++) {
++		int a, b;
++
++		a = unhexchar(id[j*2]);
++		b = unhexchar(id[j*2+1]);
++
++		if (a < 0 || b < 0) {
++			log_debug("Wrong data in %s", id_fname);
++                        return ISC_R_IOERROR;
++		}
++		uuid[j] = a << 4 | b;
++	}
++
++	/* Set UUID version to 4 --- truly random generation */
++	uuid[6] = (uuid[6] & 0x0F) | 0x40;
++	/* Set the UUID variant to DCE */
++	uuid[8] = (uuid[8] & 0x3F) | 0x80;
++
++	return ISC_R_SUCCESS;
++}
++
+ /*
+  * The "best" default DUID, since we cannot predict any information
+  * about the system (such as whether or not the hardware addresses are
+@@ -3888,6 +3941,7 @@ form_duid(struct data_string *duid, cons
+ 	struct interface_info *ip;
+ 	int len;
+ 	char *str;
++	u_int8_t uuid[16];
+ 
+ 	/* For now, just use the first interface on the list. */
+ 	ip = interfaces;
+@@ -3908,9 +3962,16 @@ form_duid(struct data_string *duid, cons
+ 	    (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
+ 		log_fatal("Impossible hardware address length at %s:%d.", MDL);
+ 
+-	if (duid_type == 0)
+-		duid_type = stateless ? DUID_LL : DUID_LLT;
+-
++	if (duid_type == 0) {
++		if (read_uuid(uuid) == ISC_R_SUCCESS)
++		    duid_type = DUID_UUID;
++		else
++		    duid_type = stateless ? DUID_LL : DUID_LLT;
++	}
++	
++	if (duid_type == DUID_UUID)
++		len = 2 + sizeof (uuid);
++	else {
+ 	/*
+ 	 * 2 bytes for the 'duid type' field.
+ 	 * 2 bytes for the 'htype' field.
+@@ -3921,13 +3982,18 @@ form_duid(struct data_string *duid, cons
+ 	len = 4 + (ip->hw_address.hlen - 1);
+ 	if (duid_type == DUID_LLT)
+ 		len += 4;
++	}
+ 	if (!buffer_allocate(&duid->buffer, len, MDL))
+ 		log_fatal("no memory for default DUID!");
+ 	duid->data = duid->buffer->data;
+ 	duid->len = len;
+ 
++	if (duid_type == DUID_UUID) {
++		putUShort(duid->buffer->data, DUID_UUID);
++		memcpy(duid->buffer->data + 2, uuid, sizeof(uuid));
++	}
+ 	/* Basic Link Local Address type of DUID. */
+-	if (duid_type == DUID_LLT) {
++	else if (duid_type == DUID_LLT) {
+ 		putUShort(duid->buffer->data, DUID_LLT);
+ 		putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
+ 		putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
diff --git a/dhcp/patches/dhcp-4.2.4-getifaddrs.patch b/dhcp/patches/0025-dhcp-getifaddrs.patch
similarity index 89%
rename from dhcp/patches/dhcp-4.2.4-getifaddrs.patch
rename to dhcp/patches/0025-dhcp-getifaddrs.patch
index 330a1fc..586c3b0 100644
--- a/dhcp/patches/dhcp-4.2.4-getifaddrs.patch
+++ b/dhcp/patches/0025-dhcp-getifaddrs.patch
@@ -1,19 +1,7 @@ 
-From c09dd24a7d63988e0acef7d033bd3e088fc005c0 Mon Sep 17 00:00:00 2001
-From: Jiri Popelka <jpopelka@redhat.com>
-Date: Thu, 24 Jan 2013 12:39:50 +0100
-Subject: [PATCH] Linux interface discovery
-
-Use the same discovery code as for *BSD and OS X,
-i.e. the getifaddrs() function.
----
- common/discover.c | 398 +++---------------------------------------------------
- 1 file changed, 17 insertions(+), 381 deletions(-)
-
-diff --git a/common/discover.c b/common/discover.c
-index 1d84219..f2a8f6d 100644
---- a/common/discover.c
-+++ b/common/discover.c
-@@ -379,391 +379,13 @@ end_iface_scan(struct iface_conf_list *ifaces) {
+diff -up dhcp-4.3.5b1/common/discover.c.getifaddrs dhcp-4.3.5b1/common/discover.c
+--- dhcp-4.3.5b1/common/discover.c.getifaddrs	2016-09-12 17:10:39.585374741 +0200
++++ dhcp-4.3.5b1/common/discover.c	2016-09-12 17:15:56.160628636 +0200
+@@ -373,392 +373,13 @@ end_iface_scan(struct iface_conf_list *i
  	ifaces->sock = -1;
  }
  
@@ -55,7 +43,7 @@  index 1d84219..f2a8f6d 100644
 - */
 -int 
 -begin_iface_scan(struct iface_conf_list *ifaces) {
--	char buf[256];
+-	char buf[IF_LINE_LENGTH];
 -	int len;
 -	int i;
 -
@@ -128,7 +116,7 @@  index 1d84219..f2a8f6d 100644
 - */
 -static int
 -next_iface4(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
--	char buf[256];
+-	char buf[IF_LINE_LENGTH];
 -	int len;
 -	char *p;
 -	char *name;
@@ -191,7 +179,7 @@  index 1d84219..f2a8f6d 100644
 -				log_error("Interface name '%s' too long", name);
 -				return 0;
 -			}
--			strcpy(info->name, name);
+-			strncpy(info->name, name, sizeof(info->name) - 1);
 -
 -#ifdef ALIAS_NAMED_PERMUTED
 -			/* interface aliases look like "eth0:1" or "wlan1:3" */
@@ -208,7 +196,7 @@  index 1d84219..f2a8f6d 100644
 -#endif
 -
 -		memset(&tmp, 0, sizeof(tmp));
--		strcpy(tmp.ifr_name, name);
+-		strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
 -		if (ioctl(ifaces->sock, SIOCGIFADDR, &tmp) < 0) {
 -			if (errno == EADDRNOTAVAIL) {
 -				continue;
@@ -221,7 +209,7 @@  index 1d84219..f2a8f6d 100644
 -		memcpy(&info->addr, &tmp.ifr_addr, sizeof(tmp.ifr_addr));
 -
 -		memset(&tmp, 0, sizeof(tmp));
--		strcpy(tmp.ifr_name, name);
+-		strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
 -		if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
 -			log_error("Error getting interface flags for '%s'; %m", 
 -			  	name);
@@ -252,7 +240,7 @@  index 1d84219..f2a8f6d 100644
 - */
 -static int
 -next_iface6(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
--	char buf[256];
+-	char buf[IF_LINE_LENGTH];
 -	int len;
 -	char *p;
 -	char *name;
@@ -308,7 +296,7 @@  index 1d84219..f2a8f6d 100644
 -			log_error("IPv6 interface name '%s' too long", name);
 -			return 0;
 -		}
--		strcpy(info->name, name);
+-		strncpy(info->name, name, sizeof(info->name) - 1);
 -
 -#ifdef SKIP_DUMMY_INTERFACES
 -	} while (strncmp(info->name, "dummy", 5) == 0);
@@ -346,7 +334,7 @@  index 1d84219..f2a8f6d 100644
 -	 * Get our flags.
 -	 */
 -	memset(&tmp, 0, sizeof(tmp));
--	strcpy(tmp.ifr_name, name);
+-	strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
 -	if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
 -		log_error("Error getting interface flags for '%s'; %m", name);
 -		*err = 1;
@@ -367,6 +355,7 @@  index 1d84219..f2a8f6d 100644
 - */
 -int
 -next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
+-	memset(info, 0, sizeof(struct iface_info));
 -	if (next_iface4(info, err, ifaces)) {
 -		return 1;
 -	}
@@ -402,11 +391,11 @@  index 1d84219..f2a8f6d 100644
   * -----------
   *
 - * FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs() 
-+ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
++ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs() 
   * function.
   *
   * The getifaddrs() man page describes the use.
-@@ -811,6 +433,8 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
+@@ -806,6 +427,8 @@ begin_iface_scan(struct iface_conf_list
   */
  int
  next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
@@ -415,10 +404,10 @@  index 1d84219..f2a8f6d 100644
  	if (ifaces->next == NULL) {
  		*err = 0;
  		return 0;
-@@ -822,8 +446,20 @@ next_iface(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
- 		return 0;
+@@ -818,8 +441,20 @@ next_iface(struct iface_info *info, int
  	}
- 	strcpy(info->name, ifaces->next->ifa_name);
+ 	memset(info, 0, sizeof(struct iface_info));
+ 	strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
 -	memcpy(&info->addr, ifaces->next->ifa_addr, 
 -	       ifaces->next->ifa_addr->sa_len);
 +
@@ -438,6 +427,3 @@  index 1d84219..f2a8f6d 100644
  	info->flags = ifaces->next->ifa_flags;
  	ifaces->next = ifaces->next->ifa_next;
  	*err = 0;
--- 
-1.8.1
-
diff --git a/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch b/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
new file mode 100644
index 0000000..7b9f271
--- /dev/null
+++ b/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
@@ -0,0 +1,61 @@ 
+diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.bind-iface	2016-04-29 13:06:50.595257108 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:08:30.237281528 +0200
+@@ -3023,6 +3023,14 @@ void send_request (cpp)
+ #endif
+ 	if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
+ 	    fallback_interface) {
++#if defined(SO_BINDTODEVICE)
++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
++			       SO_BINDTODEVICE, client->interface->name,
++			       strlen(client->interface->name)) < 0) {
++			log_error("%s:%d: Failed to bind fallback interface"
++				  " to %s: %m", MDL, client->interface->name);
++		}
++#endif
+ 		result = send_packet(fallback_interface, NULL, &client->packet,
+ 				     client->packet_length, from, &destination,
+ 				     NULL);
+@@ -3032,6 +3040,13 @@ void send_request (cpp)
+ 				  client->packet_length,
+ 				  fallback_interface->name);
+ 		}
++#if defined(SO_BINDTODEVICE)
++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
++			       SO_BINDTODEVICE, NULL, 0) < 0) {
++			log_fatal("%s:%d: Failed to unbind fallback interface:"
++				  " %m", MDL);
++		}
++#endif
+         }
+ 	else {
+ 		/* Send out a packet. */
+@@ -3144,6 +3159,14 @@ void send_release (cpp)
+ 	} else
+ #endif
+ 	if (fallback_interface) {
++#if defined(SO_BINDTODEVICE)
++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
++			       SO_BINDTODEVICE, client->interface->name,
++			       strlen(client->interface->name)) < 0) {
++			log_error("%s:%d: Failed to bind fallback interface"
++				  " to %s: %m", MDL, client->interface->name);
++		}
++#endif
+ 		result = send_packet(fallback_interface, NULL, &client->packet,
+ 				      client->packet_length, from, &destination,
+ 				      NULL);
+@@ -3153,6 +3176,13 @@ void send_release (cpp)
+ 				  client->packet_length,
+ 				  fallback_interface->name);
+ 		}
++#if defined(SO_BINDTODEVICE)
++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
++			       SO_BINDTODEVICE, NULL, 0) < 0) {
++			log_fatal("%s:%d: Failed to unbind fallback interface:"
++				  " %m", MDL);
++		}
++#endif
+         } else {
+ 		/* Send out a packet. */
+ 		result = send_packet(client->interface, NULL, &client->packet,
diff --git a/dhcp/patches/dhcp-4.2.4-P1-interval.patch b/dhcp/patches/0027-dhcp-interval.patch
similarity index 72%
rename from dhcp/patches/dhcp-4.2.4-P1-interval.patch
rename to dhcp/patches/0027-dhcp-interval.patch
index e8e89c1..8fff47c 100644
--- a/dhcp/patches/dhcp-4.2.4-P1-interval.patch
+++ b/dhcp/patches/0027-dhcp-interval.patch
@@ -1,7 +1,7 @@ 
-diff -up dhcp-4.2.4/common/dispatch.c.foo dhcp-4.2.4/common/dispatch.c
---- dhcp-4.2.4/common/dispatch.c.foo	2012-07-26 21:31:43.875349675 -0500
-+++ dhcp-4.2.4/common/dispatch.c	2012-07-26 21:39:14.961710319 -0500
-@@ -324,7 +324,20 @@ void add_timeout (when, where, what, ref
+diff -up dhcp-4.3.0a1/common/dispatch.c.interval dhcp-4.3.0a1/common/dispatch.c
+--- dhcp-4.3.0a1/common/dispatch.c.interval	2013-12-20 13:51:14.385260622 +0100
++++ dhcp-4.3.0a1/common/dispatch.c	2013-12-20 13:51:14.493259116 +0100
+@@ -343,7 +343,20 @@ void add_timeout (when, where, what, ref
  	q->next  = timeouts;
  	timeouts = q;
  
diff --git a/dhcp/patches/0028-dhcp-no-subnet-error2info.patch b/dhcp/patches/0028-dhcp-no-subnet-error2info.patch
new file mode 100644
index 0000000..975a4d4
--- /dev/null
+++ b/dhcp/patches/0028-dhcp-no-subnet-error2info.patch
@@ -0,0 +1,48 @@ 
+diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-4.3.0a1/common/discover.c
+--- dhcp-4.3.0a1/common/discover.c.error2info	2013-12-20 13:59:15.148553898 +0100
++++ dhcp-4.3.0a1/common/discover.c	2013-12-20 13:59:15.181553438 +0100
+@@ -779,9 +779,9 @@ discover_interfaces(int state) {
+ 
+ 		/* We must have a subnet declaration for each interface. */
+ 		if (!tmp->shared_network && (state == DISCOVER_SERVER)) {
+-			log_error("%s", "");
++			log_info("%s", "");
+ 			if (local_family == AF_INET) {
+-				log_error("No subnet declaration for %s (%s).",
++				log_info("No subnet declaration for %s (%s).",
+ 					  tmp->name, 
+ 					  (tmp->addresses == NULL) ?
+ 					   "no IPv4 addresses" :
+@@ -796,26 +796,26 @@ discover_interfaces(int state) {
+ 				} else {
+ 					strcpy(abuf, "no IPv6 addresses");
+ 				}
+-				log_error("No subnet6 declaration for %s (%s).",
++				log_info("No subnet6 declaration for %s (%s).",
+ 					  tmp->name,
+ 					  abuf);
+ #endif /* DHCPv6 */
+ 			}
+ 			if (supports_multiple_interfaces(tmp)) {
+-				log_error ("** Ignoring requests on %s.  %s",
++				log_info ("** Ignoring requests on %s.  %s",
+ 					   tmp -> name, "If this is not what");
+-				log_error ("   you want, please write %s",
++				log_info ("   you want, please write %s",
+ #ifdef DHCPv6
+ 				           (local_family != AF_INET) ?
+ 					   "a subnet6 declaration" :
+ #endif
+ 					   "a subnet declaration");
+-				log_error ("   in your dhcpd.conf file %s",
++				log_info ("   in your dhcpd.conf file %s",
+ 					   "for the network segment");
+-				log_error ("   to %s %s %s",
++				log_info ("   to %s %s %s",
+ 					   "which interface",
+ 					   tmp -> name, "is attached. **");
+-				log_error ("%s", "");
++				log_info ("%s", "");
+ 				goto next;
+ 			} else {
+ 				log_error ("You must write a %s",
diff --git a/dhcp/patches/0029-dhcp-sd_notify.patch b/dhcp/patches/0029-dhcp-sd_notify.patch
new file mode 100644
index 0000000..a123923
--- /dev/null
+++ b/dhcp/patches/0029-dhcp-sd_notify.patch
@@ -0,0 +1,79 @@ 
+diff -up dhcp-4.3.4/configure.ac.sd_notify dhcp-4.3.4/configure.ac
+--- dhcp-4.3.4/configure.ac.sd_notify	2016-04-29 13:08:52.813287060 +0200
++++ dhcp-4.3.4/configure.ac	2016-04-29 13:08:52.872287075 +0200
+@@ -832,6 +832,17 @@ if test x$ldap = xyes || test x$ldapcryp
+     AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
+ fi
+ 
++AC_ARG_WITH(systemd,
++        AC_HELP_STRING([--with-systemd],
++                       [enable sending status notifications to systemd daemon (default is no)]),
++        [systemd=$withval],
++        [systemd=no])
++
++if test x$systemd = xyes ; then
++   AC_CHECK_LIB(systemd, sd_notifyf, ,
++                AC_MSG_FAILURE([*** systemd library not present - do you need to install systemd-libs package?]))
++fi
++
+ # Append selected warning levels to CFLAGS before substitution (but after
+ # AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
+ CFLAGS="$CFLAGS $STD_CWARNINGS"
+diff -up dhcp-4.3.4/relay/dhcrelay.c.sd_notify dhcp-4.3.4/relay/dhcrelay.c
+--- dhcp-4.3.4/relay/dhcrelay.c.sd_notify	2016-04-29 13:08:52.814287061 +0200
++++ dhcp-4.3.4/relay/dhcrelay.c	2016-04-29 13:08:52.872287075 +0200
+@@ -37,6 +37,10 @@
+    int keep_capabilities = 0;
+ #endif
+ 
++#ifdef HAVE_LIBSYSTEMD
++#include <systemd/sd-daemon.h>
++#endif
++
+ TIME default_lease_time = 43200; /* 12 hours... */
+ TIME max_lease_time = 86400; /* 24 hours... */
+ struct tree_cache *global_options[256];
+@@ -709,6 +713,14 @@ main(int argc, char **argv) {
+ 	}
+ #endif
+ 
++#ifdef HAVE_LIBSYSTEMD
++        /* We are ready to process incomming packets. Let's notify systemd */
++        sd_notifyf(0, "READY=1\n"
++                   "STATUS=Dispatching packets...\n"
++                   "MAINPID=%lu",
++                   (unsigned long) getpid());
++#endif
++
+ 	/* Start dispatching packets and timeouts... */
+ 	dispatch();
+ 
+diff -up dhcp-4.3.4/server/dhcpd.c.sd_notify dhcp-4.3.4/server/dhcpd.c
+--- dhcp-4.3.4/server/dhcpd.c.sd_notify	2016-04-29 13:08:52.873287075 +0200
++++ dhcp-4.3.4/server/dhcpd.c	2016-04-29 13:12:00.655333096 +0200
+@@ -57,6 +57,10 @@ uid_t set_uid = 0;
+ gid_t set_gid = 0;
+ #endif /* PARANOIA */
+ 
++#ifdef HAVE_LIBSYSTEMD
++#include <systemd/sd-daemon.h>
++#endif
++
+ struct iaddr server_identifier;
+ int server_identifier_matched;
+ 
+@@ -931,6 +935,14 @@ main(int argc, char **argv) {
+ 	/* Log that we are about to start working */
+ 	log_info("Server starting service.");
+ 
++#ifdef HAVE_LIBSYSTEMD
++        /* We are ready to process incomming packets. Let's notify systemd */
++        sd_notifyf(0, "READY=1\n"
++                   "STATUS=Dispatching packets...\n"
++                   "MAINPID=%lu",
++                   (unsigned long) getpid());
++#endif
++
+ 	/*
+ 	 * Receive packets and dispatch them...
+ 	 * dispatch() will never return.
diff --git a/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch b/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
new file mode 100644
index 0000000..fac2ace
--- /dev/null
+++ b/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
@@ -0,0 +1,217 @@ 
+diff -up dhcp-4.3.5b1/common/options.c.option97 dhcp-4.3.5b1/common/options.c
+--- dhcp-4.3.5b1/common/options.c.option97	2016-09-12 17:17:13.972691041 +0200
++++ dhcp-4.3.5b1/common/options.c	2016-09-12 17:19:17.706790276 +0200
+@@ -4434,13 +4434,26 @@ int validate_packet(struct packet *packe
+ 				"a future version of ISC DHCP will reject this");
+ 		}
+ 	} else {
+-		/*
+-		 * If hlen is 0 we don't have any identifier, we warn the user
+-		 * but continue processing the packet as we can.
+-		 */
+-		if (packet->raw->hlen == 0) {
+-			log_debug("Received DHCPv4 packet without client-id"
+-				  " option and empty hlen field.");
++		oc = lookup_option (&dhcp_universe, packet->options,
++				    DHO_PXE_CLIENT_ID);
++		if (oc) {
++			/* Let's check if pxe-client-id is sane */
++			if ((oc->data.len < 2) ||
++			    (oc->data.data[0] == '\0' &&
++			     oc->data.len != 17)) {
++				log_debug("Dropped DHCPv4 packet with wrong "
++				    "(len == %d) pxe-client-id", oc->data.len);
++				return (0);
++			}
++		} else {
++			/*
++			 * If hlen is 0 we don't have any identifier, we warn the user
++			 * but continue processing the packet as we can.
++			 */
++			if (packet->raw->hlen == 0) {
++				log_debug("Received DHCPv4 packet without client-id"
++						" option and empty hlen field.");
++			}
+ 		}
+ 	}
+ 
+diff -up dhcp-4.3.5b1/common/tables.c.option97 dhcp-4.3.5b1/common/tables.c
+--- dhcp-4.3.5b1/common/tables.c.option97	2016-09-12 17:17:13.927691005 +0200
++++ dhcp-4.3.5b1/common/tables.c	2016-09-12 17:17:13.972691041 +0200
+@@ -196,8 +196,9 @@ static struct option dhcp_options[] = {
+ 	/* Defined by RFC 4578 */
+ 	{ "pxe-system-type", "S",		&dhcp_universe,  93, 1 },
+ 	{ "pxe-interface-id", "BBB",		&dhcp_universe,  94, 1 },
+-	{ "pxe-client-id", "BX",		&dhcp_universe,  97, 1 },
+ #endif
++	{ "pxe-client-id", "BX",		&dhcp_universe,  97, 1 },
++
+ 	{ "uap-servers", "t",			&dhcp_universe,  98, 1 },
+ #if defined(RFC4776_OPTIONS)
+         { "geoconf-civic", "X",                 &dhcp_universe, 99, 1 },
+diff -up dhcp-4.3.5b1/includes/dhcp.h.option97 dhcp-4.3.5b1/includes/dhcp.h
+--- dhcp-4.3.5b1/includes/dhcp.h.option97	2016-09-12 17:17:13.936691013 +0200
++++ dhcp-4.3.5b1/includes/dhcp.h	2016-09-12 17:17:13.972691041 +0200
+@@ -159,6 +159,7 @@ struct dhcp_packet {
+ #define DHO_AUTHENTICATE			90  /* RFC3118, was 210 */
+ #define DHO_CLIENT_LAST_TRANSACTION_TIME	91
+ #define DHO_ASSOCIATED_IP			92
++#define DHO_PXE_CLIENT_ID			97  /* RFC4578 */
+ #define DHO_SUBNET_SELECTION			118 /* RFC3011! */
+ #define DHO_DOMAIN_SEARCH			119 /* RFC3397 */
+ #define DHO_CLASSLESS_STATIC_ROUTES		121 /* RFC3442 */
+diff -up dhcp-4.3.5b1/server/dhcp.c.option97 dhcp-4.3.5b1/server/dhcp.c
+--- dhcp-4.3.5b1/server/dhcp.c.option97	2016-09-12 17:17:13.947691021 +0200
++++ dhcp-4.3.5b1/server/dhcp.c	2016-09-12 17:17:13.973691042 +0200
+@@ -221,6 +221,10 @@ dhcp (struct packet *packet) {
+ 			oc = lookup_option (&dhcp_universe, packet -> options,
+ 					    DHO_DHCP_CLIENT_IDENTIFIER);
+ 			if (!oc)
++				oc = lookup_option (&dhcp_universe,
++						    packet -> options,
++						    DHO_PXE_CLIENT_ID);
++			if (!oc)
+ 				goto nolease;
+ 
+ 			memset (&data, 0, sizeof data);
+@@ -818,6 +822,9 @@ void dhcprelease (packet, ms_nulltp)
+ 
+ 	oc = lookup_option (&dhcp_universe, packet -> options,
+ 			    DHO_DHCP_CLIENT_IDENTIFIER);
++	if (!oc)
++		oc = lookup_option (&dhcp_universe, packet -> options,
++				    DHO_PXE_CLIENT_ID);
+ 	memset (&data, 0, sizeof data);
+ 	if (oc &&
+ 	    evaluate_option_cache (&data, packet, (struct lease *)0,
+@@ -1286,6 +1293,9 @@ void dhcpinform (packet, ms_nulltp)
+          */
+ 	oc = lookup_option(&dhcp_universe, packet->options,
+ 			   DHO_DHCP_CLIENT_IDENTIFIER);
++	if (!oc)
++		oc = lookup_option (&dhcp_universe, packet -> options,
++				    DHO_PXE_CLIENT_ID);
+ 	memset(&d1, 0, sizeof(d1));
+ 	if (oc &&
+ 	    evaluate_option_cache(&d1, packet, NULL, NULL,
+@@ -2381,6 +2391,9 @@ void ack_lease (packet, lease, offer, wh
+ 		   can be used. */
+ 		oc = lookup_option (&dhcp_universe, packet -> options,
+ 				    DHO_DHCP_CLIENT_IDENTIFIER);
++		if (!oc)
++			oc = lookup_option (&dhcp_universe, packet -> options,
++					    DHO_PXE_CLIENT_ID);
+ 		if (oc &&
+ 		    evaluate_option_cache (&d1, packet, lease,
+ 					   (struct client_state *)0,
+@@ -2962,6 +2975,9 @@ void ack_lease (packet, lease, offer, wh
+ 		/* Record the uid, if given... */
+ 		oc = lookup_option (&dhcp_universe, packet -> options,
+ 				    DHO_DHCP_CLIENT_IDENTIFIER);
++		if (!oc)
++			oc = lookup_option (&dhcp_universe, packet -> options,
++					    DHO_PXE_CLIENT_ID);
+ 		if (oc &&
+ 		    evaluate_option_cache(&d1, packet, lease, NULL,
+ 					  packet->options, state->options,
+@@ -4068,6 +4084,9 @@ int find_lease (struct lease **lp,
+ 	   specified unique client identifier. */
+ 	oc = lookup_option (&dhcp_universe, packet -> options,
+ 			    DHO_DHCP_CLIENT_IDENTIFIER);
++	if (!oc)
++		oc = lookup_option (&dhcp_universe, packet -> options,
++				    DHO_PXE_CLIENT_ID);
+ 	memset (&client_identifier, 0, sizeof client_identifier);
+ 	if (oc &&
+ 	    evaluate_option_cache (&client_identifier,
+diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.option97 dhcp-4.3.5b1/server/dhcpd.conf.5
+--- dhcp-4.3.5b1/server/dhcpd.conf.5.option97	2016-09-12 17:17:13.885690972 +0200
++++ dhcp-4.3.5b1/server/dhcpd.conf.5	2016-09-12 17:17:13.974691043 +0200
+@@ -1587,10 +1587,12 @@ should be a name identifying the host.
+ not specified for the host, \fIhostname\fR is used.
+ .PP
+ \fIHost\fR declarations are matched to actual DHCP or BOOTP clients
+-by matching the \fRdhcp-client-identifier\fR option specified in the
++by matching the \fIdhcp-client-identifier\fR or \fIpxe-client-id\fR
++options specified in the
+ \fIhost\fR declaration to the one supplied by the client, or, if the
+ \fIhost\fR declaration or the client does not provide a
+-\fRdhcp-client-identifier\fR option, by matching the \fIhardware\fR
++\fIdhcp-client-identifier\fR or \fIpxe-client-id\fR options,
++by matching the \fIhardware\fR
+ parameter in the \fIhost\fR declaration to the network hardware
+ address supplied by the client.  BOOTP clients do not normally
+ provide a \fIdhcp-client-identifier\fR, so the hardware address must
+@@ -1602,7 +1604,8 @@ to identify hosts.
+ .PP
+ Please be aware that
+ .B only
+-the \fIdhcp-client-identifier\fR option and the hardware address can be
++the \fIdhcp-client-identifier\fR and \fIpxe-client-id\fR
++options and the hardware address can be
+ used to match a host declaration, or the \fIhost-identifier option\fR
+ parameter for DHCPv6 servers.  For example, it is not possible to
+ match a host declaration to a \fIhost-name\fR option.  This is
+diff -up dhcp-4.3.5b1/server/dhcpleasequery.c.option97 dhcp-4.3.5b1/server/dhcpleasequery.c
+--- dhcp-4.3.5b1/server/dhcpleasequery.c.option97	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/dhcpleasequery.c	2016-09-12 17:17:13.974691043 +0200
+@@ -273,7 +273,7 @@ dhcpleasequery(struct packet *packet, in
+ 		 */
+ 
+ 		memset(&uid, 0, sizeof(uid));
+-		if (get_option(&uid, 
++		i = get_option(&uid,
+ 			       &dhcp_universe,
+ 			       packet,
+ 			       NULL,
+@@ -283,8 +283,20 @@ dhcpleasequery(struct packet *packet, in
+ 			       packet->options, 
+ 			       &global_scope,
+ 			       DHO_DHCP_CLIENT_IDENTIFIER,
+-			       MDL)) {
+-
++			       MDL);
++		if (!i)
++			i = get_option(&uid,
++				       &dhcp_universe,
++				       packet,
++				       NULL,
++				       NULL,
++				       packet->options,
++				       NULL,
++				       packet->options,
++				       &global_scope,
++				       DHO_PXE_CLIENT_ID,
++				       MDL);
++		if (i) {
+ 			snprintf(dbg_info, 
+ 				 sizeof(dbg_info), 
+ 				 "client-id %s",
+diff -up dhcp-4.3.5b1/server/failover.c.option97 dhcp-4.3.5b1/server/failover.c
+--- dhcp-4.3.5b1/server/failover.c.option97	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/failover.c	2016-09-12 17:17:13.975691044 +0200
+@@ -5957,6 +5957,9 @@ int load_balance_mine (struct packet *pa
+ 
+ 	oc = lookup_option(&dhcp_universe, packet->options,
+ 			   DHO_DHCP_CLIENT_IDENTIFIER);
++	if (!oc)
++		oc = lookup_option(&dhcp_universe, packet -> options,
++				    DHO_PXE_CLIENT_ID);
+ 	memset(&ds, 0, sizeof ds);
+ 	if (oc &&
+ 	    evaluate_option_cache(&ds, packet, NULL, NULL,
+diff -up dhcp-4.3.5b1/server/mdb.c.option97 dhcp-4.3.5b1/server/mdb.c
+--- dhcp-4.3.5b1/server/mdb.c.option97	2016-08-26 20:19:53.000000000 +0200
++++ dhcp-4.3.5b1/server/mdb.c	2016-09-12 17:17:13.975691044 +0200
+@@ -129,8 +129,9 @@ static int find_uid_statement (struct ex
+ 	    esp -> data.option &&
+ 	    (esp -> data.option -> option -> universe ==
+ 	     &dhcp_universe) &&
+-	    (esp -> data.option -> option -> code ==
+-	     DHO_DHCP_CLIENT_IDENTIFIER)) {
++	    ((esp -> data.option -> option -> code ==
++						DHO_DHCP_CLIENT_IDENTIFIER) ||
++	     (esp -> data.option -> option -> code == DHO_PXE_CLIENT_ID))) {
+ 		if (condp) {
+ 			log_error ("dhcp client identifier may not be %s",
+ 				   "specified conditionally.");
diff --git a/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch b/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
new file mode 100644
index 0000000..72b7b0f
--- /dev/null
+++ b/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
@@ -0,0 +1,13 @@ 
+diff -up dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT	2016-04-29 13:13:50.467360008 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:14:53.389375428 +0200
+@@ -1317,6 +1317,9 @@ void run_stateless(int exit_mode, u_int1
+ 			data_string_forget(&default_duid, MDL);
+ 
+ 		form_duid(&default_duid, MDL);
++		if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
++		    duid_type == DUID_LLT)
++			write_duid(&default_duid);
+ 	}
+ 
+ #ifdef DHCP4o6
diff --git a/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch b/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
new file mode 100644
index 0000000..0ce1cf8
--- /dev/null
+++ b/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
@@ -0,0 +1,64 @@ 
+diff -up dhcp-4.3.4/client/dhclient.c.preinit6s dhcp-4.3.4/client/dhclient.c
+--- dhcp-4.3.4/client/dhclient.c.preinit6s	2016-04-29 13:15:10.361379493 +0200
++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:17:43.622415423 +0200
+@@ -812,6 +812,12 @@ main(int argc, char **argv) {
+ 
+ 	inaddr_any.s_addr = INADDR_ANY;
+ 
++	/* Discover all the network interfaces. */
++	discover_interfaces(DISCOVER_UNCONFIGURED);
++
++	/* Parse the dhclient.conf file. */
++	read_client_conf();
++
+ 	/* Stateless special case. */
+ 	if (stateless) {
+ 		if (release_mode || (wanted_ia_na > 0) ||
+@@ -828,12 +834,6 @@ main(int argc, char **argv) {
+ 		return 0;
+ 	}
+ 
+-	/* Discover all the network interfaces. */
+-	discover_interfaces(DISCOVER_UNCONFIGURED);
+-
+-	/* Parse the dhclient.conf file. */
+-	read_client_conf();
+-
+ 	/* Parse any extra command line configuration arguments: */
+ 	if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
+ 		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
+@@ -1288,20 +1288,30 @@ void run_stateless(int exit_mode, u_int1
+ 	IGNORE_UNUSED(port);
+ #endif
+ 
+-	/* Discover the network interface. */
+-	discover_interfaces(DISCOVER_REQUESTED);
++	struct interface_info *ip;
+ 
+ 	if (!interfaces)
+ 		usage("No interfaces available for stateless command: %s", "-S");
+ 
+-	/* Parse the dhclient.conf file. */
+ #ifdef DHCP4o6
+ 	if (dhcpv4_over_dhcpv6) {
+ 		/* Mark we want to request IRT too! */
+ 		dhcpv4_over_dhcpv6++;
+ 	}
+ #endif
+-	read_client_conf();
++
++	for (ip = interfaces; ip; ip = ip->next) {
++		if ((interfaces_requested > 0) &&
++		    ((ip->flags & (INTERFACE_REQUESTED |
++				   INTERFACE_AUTOMATIC)) !=
++		     INTERFACE_REQUESTED))
++			continue;
++		script_init(ip->client, "PREINIT6", NULL);
++		script_go(ip->client);
++	}
++
++	/* Discover the network interface. */
++	discover_interfaces(DISCOVER_REQUESTED);
+ 
+ 	/* Parse the lease database. */
+ 	read_client_leases();
diff --git a/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch b/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
deleted file mode 100644
index 4784d5a..0000000
--- a/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
+++ /dev/null
@@ -1,14 +0,0 @@ 
-diff -up dhcp-4.2.0/common/dispatch.c.dracut dhcp-4.2.0/common/dispatch.c
---- dhcp-4.2.0/common/dispatch.c.dracut	2010-06-01 19:29:59.000000000 +0200
-+++ dhcp-4.2.0/common/dispatch.c	2010-07-21 16:10:09.000000000 +0200
-@@ -189,6 +189,10 @@ void add_timeout (when, where, what, ref
- 	isc_interval_t interval;
- 	isc_time_t expires;
- 
-+	if (when == NULL) {
-+		return;
-+	}
-+
- 	/* See if this timeout supersedes an existing timeout. */
- 	t = (struct timeout *)0;
- 	for (q = timeouts; q; q = q->next) {
diff --git a/dhcp/patches/dhcp-4.2.0-errwarn-message.patch b/dhcp/patches/dhcp-4.2.0-errwarn-message.patch
deleted file mode 100644
index a0f70cd..0000000
--- a/dhcp/patches/dhcp-4.2.0-errwarn-message.patch
+++ /dev/null
@@ -1,30 +0,0 @@ 
-diff -up dhcp-4.2.0/omapip/errwarn.c.errwarn dhcp-4.2.0/omapip/errwarn.c
---- dhcp-4.2.0/omapip/errwarn.c.errwarn	2009-07-23 20:52:21.000000000 +0200
-+++ dhcp-4.2.0/omapip/errwarn.c	2010-07-21 13:23:47.000000000 +0200
-@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
- 
- #if !defined (NOMINUM)
-   log_error ("%s", "");
--  log_error ("If you did not get this software from ftp.isc.org, please");
--  log_error ("get the latest from ftp.isc.org and install that before");
--  log_error ("requesting help.");
-+  log_error ("This version of ISC DHCP is based on the release available");
-+  log_error ("on ftp.isc.org.  Features have been added and other changes");
-+  log_error ("have been made to the base software release in order to make");
-+  log_error ("it work better with this distribution.");
-   log_error ("%s", "");
--  log_error ("If you did get this software from ftp.isc.org and have not");
--  log_error ("yet read the README, please read it before requesting help.");
--  log_error ("If you intend to request help from the dhcp-server@isc.org");
--  log_error ("mailing list, please read the section on the README about");
--  log_error ("submitting bug reports and requests for help.");
--  log_error ("%s", "");
--  log_error ("Please do not under any circumstances send requests for");
--  log_error ("help directly to the authors of this software - please");
--  log_error ("send them to the appropriate mailing list as described in");
--  log_error ("the README file.");
-+  log_error ("Please report for this software via the Red Hat Bugzilla site:");
-+  log_error ("    http://bugzilla.redhat.com");
-   log_error ("%s", "");
-   log_error ("exiting.");
- #endif
diff --git a/dhcp/patches/dhcp-4.2.0-garbage-chars.patch b/dhcp/patches/dhcp-4.2.0-garbage-chars.patch
deleted file mode 100644
index 118ff3f..0000000
--- a/dhcp/patches/dhcp-4.2.0-garbage-chars.patch
+++ /dev/null
@@ -1,12 +0,0 @@ 
-diff -up dhcp-4.2.0/common/tables.c.garbage dhcp-4.2.0/common/tables.c
---- dhcp-4.2.0/common/tables.c.garbage	2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.0/common/tables.c	2010-07-21 14:40:56.000000000 +0200
-@@ -207,7 +207,7 @@ static struct option dhcp_options[] = {
- 	{ "netinfo-server-tag", "t",		&dhcp_universe, 113, 1 },
- 	{ "default-url", "t",			&dhcp_universe, 114, 1 },
- 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
--	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
-+	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
- 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
- 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
- #if 0
diff --git a/dhcp/patches/dhcp-4.2.0-logpid.patch b/dhcp/patches/dhcp-4.2.0-logpid.patch
deleted file mode 100644
index c24adb1..0000000
--- a/dhcp/patches/dhcp-4.2.0-logpid.patch
+++ /dev/null
@@ -1,12 +0,0 @@ 
-diff -up dhcp-4.2.0/client/dhclient.c.logpid dhcp-4.2.0/client/dhclient.c
---- dhcp-4.2.0/client/dhclient.c.logpid	2010-07-21 16:13:52.000000000 +0200
-+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 16:16:51.000000000 +0200
-@@ -154,7 +154,7 @@ main(int argc, char **argv) {
- 	else if (fd != -1)
- 		close(fd);
- 
--	openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
-+	openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
- 
- #if !(defined(DEBUG) || defined(__CYGWIN32__))
- 	setlogmask(LOG_UPTO(LOG_INFO));
diff --git a/dhcp/patches/dhcp-4.2.1-retransmission.patch b/dhcp/patches/dhcp-4.2.1-retransmission.patch
deleted file mode 100644
index 18e447f..0000000
--- a/dhcp/patches/dhcp-4.2.1-retransmission.patch
+++ /dev/null
@@ -1,48 +0,0 @@ 
-diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
---- dhcp-4.2.1b1/client/dhc6.c.retransmission	2011-01-28 08:40:56.000000000 +0100
-+++ dhcp-4.2.1b1/client/dhc6.c	2011-01-28 08:39:22.000000000 +0100
-@@ -361,7 +361,7 @@ dhc6_retrans_init(struct client_state *c
- static void
- dhc6_retrans_advance(struct client_state *client)
- {
--	struct timeval elapsed;
-+	struct timeval elapsed, elapsed_after_RT;
- 
- 	/* elapsed = cur - start */
- 	elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
-@@ -378,6 +378,8 @@ dhc6_retrans_advance(struct client_state
- 		elapsed.tv_sec += 1;
- 		elapsed.tv_usec -= 1000000;
- 	}
-+	elapsed_after_RT.tv_sec = elapsed.tv_sec;
-+	elapsed_after_RT.tv_usec = elapsed.tv_usec;
- 
- 	/*
- 	 * RT for each subsequent message transmission is based on the previous
-@@ -415,13 +417,10 @@ dhc6_retrans_advance(struct client_state
- 		elapsed.tv_usec -= 1000000;
- 	}
- 	if (elapsed.tv_sec >= client->MRD) {
--		/*
--		 * wake at RT + cur = start + MRD
--		 */
--		client->RT = client->MRD +
--			(client->start_time.tv_sec - cur_tv.tv_sec);
--		client->RT = client->RT * 100 +
--			(client->start_time.tv_usec - cur_tv.tv_usec) / 10000;
-+		client->RT = client->MRD - elapsed_after_RT.tv_sec;
-+		client->RT = client->RT * 100 - elapsed_after_RT.tv_usec / 10000;
-+		if (client->RT < 0)
-+			client->RT = 0;
- 	}
- 	client->txcount++;
- }
-@@ -1497,7 +1496,7 @@ check_timing6 (struct client_state *clie
- 	}
- 
- 	/* Check if finished (-1 argument). */
--	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
-+	if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
- 		log_info("Max retransmission duration exceeded.");
- 		return(CHK_TIM_MRD_EXCEEDED);
- 	}
diff --git a/dhcp/patches/dhcp-4.2.2-gpxe-cid.patch b/dhcp/patches/dhcp-4.2.2-gpxe-cid.patch
deleted file mode 100644
index fd73b2c..0000000
--- a/dhcp/patches/dhcp-4.2.2-gpxe-cid.patch
+++ /dev/null
@@ -1,83 +0,0 @@ 
-diff -up dhcp-4.2.2/client/dhclient.c.gpxe-cid dhcp-4.2.2/client/dhclient.c
---- dhcp-4.2.2/client/dhclient.c.gpxe-cid	2011-09-16 18:23:20.190453902 +0200
-+++ dhcp-4.2.2/client/dhclient.c	2011-09-16 18:27:15.568463599 +0200
-@@ -58,6 +58,13 @@ const char *path_dhclient_pid = NULL;
- static char path_dhclient_script_array[] = _PATH_DHCLIENT_SCRIPT;
- char *path_dhclient_script = path_dhclient_script_array;
- 
-+/* Default Prefix */
-+static unsigned char default_prefix[12] = {
-+	0xff, 0x00, 0x00, 0x00,
-+	0x00, 0x00, 0x02, 0x00,
-+	0x00, 0x02, 0xc9, 0x00
-+};
-+
- /* False (default) => we write and use a pid file */
- isc_boolean_t no_pid_file = ISC_FALSE;
- 
-@@ -1250,6 +1257,12 @@ int find_subnet (struct subnet **sp,
- static void setup_ib_interface(struct interface_info *ip)
- {
- 	struct group *g;
-+	struct hardware *hw = &ip->hw_address;
-+	char client_id[64];
-+	char *arg_conf = NULL;
-+	int arg_conf_len = 0;
-+	isc_result_t status;
-+	struct parse *cfile = (struct parse *)0;
- 
- 	/* Set the broadcast flag */
- 	ip->client->config->bootp_broadcast_always = 1;
-@@ -1266,8 +1279,39 @@ static void setup_ib_interface(struct in
- 		}
- 	}
- 
--	/* No client ID specified */
--	log_fatal("dhcp-client-identifier must be specified for InfiniBand");
-+	/*
-+	 * No client ID specified, make up one based on a default
-+	 * "prefix" and the port GUID.
-+	 *
-+	 * NOTE: This is compatible with what gpxe does.
-+	 */
-+	sprintf(client_id, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
-+		default_prefix[0], default_prefix[1], default_prefix[2],
-+		default_prefix[3], default_prefix[4], default_prefix[5],
-+		default_prefix[6], default_prefix[7], default_prefix[8],
-+		default_prefix[9], default_prefix[10], default_prefix[11],
-+		hw->hbuf[1], hw->hbuf[2], hw->hbuf[3], hw->hbuf[4],
-+		hw->hbuf[5], hw->hbuf[6], hw->hbuf[7], hw->hbuf[8]);
-+
-+	arg_conf_len = asprintf(&arg_conf,
-+				"send dhcp-client-identifier %s;",
-+				client_id);
-+
-+	if ((arg_conf == 0) || (arg_conf_len <= 0))
-+		log_fatal("Unable to send option dhcp-client-identifier");
-+
-+	status = new_parse(&cfile, -1, arg_conf, arg_conf_len,
-+			   "Automatic Infiniband client identifier", 0);
-+
-+	if ((status != ISC_R_SUCCESS) || (cfile->warnings_occurred))
-+		log_fatal("Failed to parse Infiniband client identifier");
-+
-+	parse_client_statement(cfile, NULL, ip->client->config);
-+
-+	if (cfile->warnings_occurred)
-+		log_fatal("Failed to parse Infiniband client identifier");
-+
-+	end_parse(&cfile);
- }
- 
- /* Individual States:
-diff -up dhcp-4.2.2/common/lpf.c.gpxe-cid dhcp-4.2.2/common/lpf.c
---- dhcp-4.2.2/common/lpf.c.gpxe-cid	2011-09-16 18:23:20.183453996 +0200
-+++ dhcp-4.2.2/common/lpf.c	2011-09-16 18:25:28.235804421 +0200
-@@ -698,6 +698,7 @@ get_hw_addr(struct interface_info *info)
- 
- 			hw->hlen = 1;
- 			hw->hbuf[0] = HTYPE_INFINIBAND;
-+			memcpy(&hw->hbuf[1], &sll->sll_addr[sll->sll_halen - 8], 8);
- 			break;
- #if defined(ARPHRD_PPP)
- 		case ARPHRD_PPP:
diff --git a/dhcp/patches/dhcp-4.2.2-xen-checksum.patch b/dhcp/patches/dhcp-4.2.2-xen-checksum.patch
deleted file mode 100644
index 038d346..0000000
--- a/dhcp/patches/dhcp-4.2.2-xen-checksum.patch
+++ /dev/null
@@ -1,249 +0,0 @@ 
-diff -up dhcp-4.2.2b1/common/bpf.c.xen dhcp-4.2.2b1/common/bpf.c
---- dhcp-4.2.2b1/common/bpf.c.xen	2009-11-20 02:48:59.000000000 +0100
-+++ dhcp-4.2.2b1/common/bpf.c	2011-07-01 14:00:16.936959001 +0200
-@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf, 
- 		offset = decode_udp_ip_header (interface,
- 					       interface -> rbuf,
- 					       interface -> rbuf_offset,
--  					       from, hdr.bh_caplen, &paylen);
-+  					       from, hdr.bh_caplen, &paylen, 0);
- 
- 		/* If the IP or UDP checksum was bad, skip the packet... */
- 		if (offset < 0) {
-diff -up dhcp-4.2.2b1/common/dlpi.c.xen dhcp-4.2.2b1/common/dlpi.c
---- dhcp-4.2.2b1/common/dlpi.c.xen	2011-05-11 16:20:59.000000000 +0200
-+++ dhcp-4.2.2b1/common/dlpi.c	2011-07-01 14:00:16.937958997 +0200
-@@ -693,7 +693,7 @@ ssize_t receive_packet (interface, buf, 
- 	length -= offset;
- #endif
- 	offset = decode_udp_ip_header (interface, dbuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/*
- 	 * If the IP or UDP checksum was bad, skip the packet...
-diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
---- dhcp-4.2.2b1/common/lpf.c.xen	2011-05-10 16:38:58.000000000 +0200
-+++ dhcp-4.2.2b1/common/lpf.c	2011-07-01 14:11:24.725748028 +0200
-@@ -29,19 +29,33 @@
- #include "dhcpd.h"
- #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
- #include <sys/ioctl.h>
-+#include <sys/socket.h>
- #include <sys/uio.h>
- #include <errno.h>
- 
- #include <asm/types.h>
- #include <linux/filter.h>
- #include <linux/if_ether.h>
-+#include <linux/if_packet.h>
- #include <netinet/in_systm.h>
--#include <net/if_packet.h>
- #include "includes/netinet/ip.h"
- #include "includes/netinet/udp.h"
- #include "includes/netinet/if_ether.h"
- #include <net/if.h>
- 
-+#ifndef PACKET_AUXDATA
-+#define PACKET_AUXDATA 8
-+
-+struct tpacket_auxdata
-+{
-+	__u32		tp_status;
-+	__u32		tp_len;
-+	__u32		tp_snaplen;
-+	__u16		tp_mac;
-+	__u16		tp_net;
-+};
-+#endif
-+
- /* Reinitializes the specified interface after an address change.   This
-    is not required for packet-filter APIs. */
- 
-@@ -67,10 +81,14 @@ int if_register_lpf (info)
- 	struct interface_info *info;
- {
- 	int sock;
--	struct sockaddr sa;
-+	union {
-+		struct sockaddr_ll ll;
-+		struct sockaddr common;
-+	} sa;
-+	struct ifreq ifr;
- 
- 	/* Make an LPF socket. */
--	if ((sock = socket(PF_PACKET, SOCK_PACKET,
-+	if ((sock = socket(PF_PACKET, SOCK_RAW,
- 			   htons((short)ETH_P_ALL))) < 0) {
- 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
- 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-@@ -85,11 +103,17 @@ int if_register_lpf (info)
- 		log_fatal ("Open a socket for LPF: %m");
- 	}
- 
-+	memset (&ifr, 0, sizeof ifr);
-+	strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof ifr.ifr_name);
-+	ifr.ifr_name[IFNAMSIZ-1] = '\0';
-+	if (ioctl (sock, SIOCGIFINDEX, &ifr))
-+		log_fatal ("Failed to get interface index: %m");
-+
- 	/* Bind to the interface name */
- 	memset (&sa, 0, sizeof sa);
--	sa.sa_family = AF_PACKET;
--	strncpy (sa.sa_data, (const char *)info -> ifp, sizeof sa.sa_data);
--	if (bind (sock, &sa, sizeof sa)) {
-+	sa.ll.sll_family = AF_PACKET;
-+	sa.ll.sll_ifindex = ifr.ifr_ifindex;
-+	if (bind (sock, &sa.common, sizeof sa)) {
- 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
- 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
- 		    errno == EAFNOSUPPORT || errno == EINVAL) {
-@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
- void if_register_receive (info)
- 	struct interface_info *info;
- {
-+	int val;
-+
- 	/* Open a LPF device and hang it on this interface... */
- 	info -> rfdesc = if_register_lpf (info);
- 
-+	val = 1;
-+	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
-+			sizeof val) < 0) {
-+		if (errno != ENOPROTOOPT)
-+			log_fatal ("Failed to set auxiliary packet data: %m");
-+	}
-+
- #if defined (HAVE_TR_SUPPORT)
- 	if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
- 		lpf_tr_filter_setup (info);
-@@ -295,7 +328,6 @@ ssize_t send_packet (interface, packet, 
- 	double hh [16];
- 	double ih [1536 / sizeof (double)];
- 	unsigned char *buf = (unsigned char *)ih;
--	struct sockaddr_pkt sa;
- 	int result;
- 	int fudge;
- 
-@@ -316,17 +348,7 @@ ssize_t send_packet (interface, packet, 
- 				(unsigned char *)raw, len);
- 	memcpy (buf + ibufp, raw, len);
- 
--	/* For some reason, SOCK_PACKET sockets can't be connected,
--	   so we have to do a sentdo every time. */
--	memset (&sa, 0, sizeof sa);
--	sa.spkt_family = AF_PACKET;
--	strncpy ((char *)sa.spkt_device,
--		 (const char *)interface -> ifp, sizeof sa.spkt_device);
--	sa.spkt_protocol = htons(ETH_P_IP);
--
--	result = sendto (interface -> wfdesc,
--			 buf + fudge, ibufp + len - fudge, 0, 
--			 (const struct sockaddr *)&sa, sizeof sa);
-+	result = write (interface -> wfdesc, buf + fudge, ibufp + len - fudge);
- 	if (result < 0)
- 		log_error ("send_packet: %m");
- 	return result;
-@@ -343,14 +365,35 @@ ssize_t receive_packet (interface, buf, 
- {
- 	int length = 0;
- 	int offset = 0;
-+	int nocsum = 0;
- 	unsigned char ibuf [1536];
- 	unsigned bufix = 0;
- 	unsigned paylen;
-+	unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
-+	struct iovec iov = {
-+		.iov_base = ibuf,
-+		.iov_len = sizeof ibuf,
-+	};
-+	struct msghdr msg = {
-+		.msg_iov = &iov,
-+		.msg_iovlen = 1,
-+		.msg_control = cmsgbuf,
-+		.msg_controllen = sizeof(cmsgbuf),
-+	};
-+	struct cmsghdr *cmsg;
- 
--	length = read (interface -> rfdesc, ibuf, sizeof ibuf);
-+	length = recvmsg (interface -> rfdesc, &msg, 0);
- 	if (length <= 0)
- 		return length;
- 
-+	for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-+		if (cmsg->cmsg_level == SOL_PACKET &&
-+		    cmsg->cmsg_type == PACKET_AUXDATA) {
-+			struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg);
-+			nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
-+		}
-+	}
-+
- 	bufix = 0;
- 	/* Decode the physical header... */
- 	offset = decode_hw_header (interface, ibuf, bufix, hfrom);
-@@ -367,7 +410,7 @@ ssize_t receive_packet (interface, buf, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix, from,
--				       (unsigned)length, &paylen);
-+				       (unsigned)length, &paylen, nocsum);
- 
- 	/* If the IP or UDP checksum was bad, skip the packet... */
- 	if (offset < 0)
-diff -up dhcp-4.2.2b1/common/nit.c.xen dhcp-4.2.2b1/common/nit.c
---- dhcp-4.2.2b1/common/nit.c.xen	2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.2b1/common/nit.c	2011-07-01 14:00:16.939958989 +0200
-@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/* If the IP or UDP checksum was bad, skip the packet... */
- 	if (offset < 0)
-diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
---- dhcp-4.2.2b1/common/packet.c.xen	2009-07-23 20:52:20.000000000 +0200
-+++ dhcp-4.2.2b1/common/packet.c	2011-07-01 14:00:16.939958989 +0200
-@@ -211,7 +211,7 @@ ssize_t
- decode_udp_ip_header(struct interface_info *interface,
- 		     unsigned char *buf, unsigned bufix,
- 		     struct sockaddr_in *from, unsigned buflen,
--		     unsigned *rbuflen)
-+		     unsigned *rbuflen, int nocsum)
- {
-   unsigned char *data;
-   struct ip ip;
-@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_in
- 					   8, IPPROTO_UDP + ulen))));
- 
-   udp_packets_seen++;
--  if (usum && usum != sum) {
-+  if (!nocsum && usum && usum != sum) {
- 	  udp_packets_bad_checksum++;
- 	  if (udp_packets_seen > 4 &&
- 	      (udp_packets_seen / udp_packets_bad_checksum) < 2) {
-diff -up dhcp-4.2.2b1/common/upf.c.xen dhcp-4.2.2b1/common/upf.c
---- dhcp-4.2.2b1/common/upf.c.xen	2009-11-20 02:49:01.000000000 +0100
-+++ dhcp-4.2.2b1/common/upf.c	2011-07-01 14:00:16.940958986 +0200
-@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf, 
- 
- 	/* Decode the IP and UDP headers... */
- 	offset = decode_udp_ip_header (interface, ibuf, bufix,
--				       from, length, &paylen);
-+				       from, length, &paylen, 0);
- 
- 	/* If the IP or UDP checksum was bad, skip the packet... */
- 	if (offset < 0)
-diff -up dhcp-4.2.2b1/includes/dhcpd.h.xen dhcp-4.2.2b1/includes/dhcpd.h
---- dhcp-4.2.2b1/includes/dhcpd.h.xen	2011-07-01 14:00:16.000000000 +0200
-+++ dhcp-4.2.2b1/includes/dhcpd.h	2011-07-01 14:12:18.069642470 +0200
-@@ -2796,7 +2796,7 @@ ssize_t decode_hw_header (struct interfa
- 			  unsigned, struct hardware *);
- ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
- 			      unsigned, struct sockaddr_in *,
--			      unsigned, unsigned *);
-+			      unsigned, unsigned *, int);
- 
- /* ethernet.c */
- void assemble_ethernet_header (struct interface_info *, unsigned char *,
diff --git a/dhcp/patches/dhcp-4.2.3-P2-log_perror.patch b/dhcp/patches/dhcp-4.2.3-P2-log_perror.patch
deleted file mode 100644
index 124c8c5..0000000
--- a/dhcp/patches/dhcp-4.2.3-P2-log_perror.patch
+++ /dev/null
@@ -1,11 +0,0 @@ 
-diff -up dhcp-4.2.3-P2/server/dhcpd.c.log_perror dhcp-4.2.3-P2/server/dhcpd.c
---- dhcp-4.2.3-P2/server/dhcpd.c.log_perror	2012-02-22 14:24:57.000000000 +0100
-+++ dhcp-4.2.3-P2/server/dhcpd.c	2012-02-22 14:29:09.964576687 +0100
-@@ -315,6 +315,7 @@ main(int argc, char **argv) {
- #ifndef DEBUG
- 			daemon = 0;
- #endif
-+			log_perror = 0;
- 		} else if (!strcmp (argv [i], "-d")) {
- #ifndef DEBUG
- 			daemon = 0;
diff --git a/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch b/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
deleted file mode 100644
index af3314d..0000000
--- a/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
+++ /dev/null
@@ -1,27 +0,0 @@ 
-diff -up dhcp-4.2.3/client/dhclient.c.decline-onetry dhcp-4.2.3/client/dhclient.c
---- dhcp-4.2.3/client/dhclient.c.decline-onetry	2011-11-24 14:21:50.000000000 +0100
-+++ dhcp-4.2.3/client/dhclient.c	2011-11-24 14:23:44.472893215 +0100
-@@ -1704,11 +1704,18 @@ void bind_lease (client)
- 	if (script_go (client)) {
- 		make_decline (client, client -> new);
- 		send_decline (client);
--		destroy_client_lease (client -> new);
--		client -> new = (struct client_lease *)0;
--		client -> state = S_DECLINED;
--		state_init (client);
--		return;
-+		if (onetry) {
-+			if (!quiet)
-+			  log_info ("Unable to obtain a lease on first try.%s",
-+					"  Exiting.");
-+			exit (2);
-+		} else {
-+			destroy_client_lease (client -> new);
-+			client -> new = (struct client_lease *)0;
-+			client -> state = S_DECLINED;
-+			state_init (client);
-+			return;
-+		}
- 	}
- 
- 	/* Write out the new lease if it has been long enough. */
diff --git a/dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch b/dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch
deleted file mode 100644
index 6b8dbb0..0000000
--- a/dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch
+++ /dev/null
@@ -1,46 +0,0 @@ 
-diff -up dhcp-4.2.4-P1/configure.ac.remove-dst dhcp-4.2.4-P1/configure.ac
---- dhcp-4.2.4-P1/configure.ac.remove-dst	2012-08-17 15:24:29.066454140 +0200
-+++ dhcp-4.2.4-P1/configure.ac	2012-08-17 15:24:29.071454073 +0200
-@@ -608,7 +608,6 @@ AC_OUTPUT([
-   common/Makefile
-   common/tests/Makefile
-   dhcpctl/Makefile
--  dst/Makefile
-   includes/Makefile
-   omapip/Makefile
-   relay/Makefile
-diff -up dhcp-4.2.4-P1/includes/Makefile.am.remove-dst dhcp-4.2.4-P1/includes/Makefile.am
---- dhcp-4.2.4-P1/includes/Makefile.am.remove-dst	2012-07-13 08:17:54.000000000 +0200
-+++ dhcp-4.2.4-P1/includes/Makefile.am	2012-08-17 15:25:08.253922458 +0200
-@@ -1,7 +1,6 @@
- nobase_include_HEADERS = omapip/alloc.h omapip/buffer.h omapip/convert.h \
- 			 omapip/hash.h omapip/isclib.h omapip/omapip.h \
--			 omapip/omapip_p.h omapip/result.h omapip/trace.h \
--			 isc-dhcp/dst.h
-+			 omapip/omapip_p.h omapip/result.h omapip/trace.h
- 
- EXTRA_DIST = cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
- 	     heap.h inet.h minires.h osdep.h site.h statement.h tree.h \
-diff -up dhcp-4.2.4-P1/Makefile.am.remove-dst dhcp-4.2.4-P1/Makefile.am
---- dhcp-4.2.4-P1/Makefile.am.remove-dst	2012-08-17 15:24:29.067454126 +0200
-+++ dhcp-4.2.4-P1/Makefile.am	2012-08-17 15:24:29.071454073 +0200
-@@ -27,7 +27,7 @@ else
- SUBDIRS = 
- endif
- 
--SUBDIRS += includes tests common dst omapip client dhcpctl relay server
-+SUBDIRS += includes tests common omapip client dhcpctl relay server
- 
- nobase_include_HEADERS = dhcpctl/dhcpctl.h
- 
-diff -up dhcp-4.2.4-P1/server/ddns.c.remove-dst dhcp-4.2.4-P1/server/ddns.c
---- dhcp-4.2.4-P1/server/ddns.c.remove-dst	2012-07-13 08:18:05.000000000 +0200
-+++ dhcp-4.2.4-P1/server/ddns.c	2012-08-17 15:24:29.072454060 +0200
-@@ -34,7 +34,6 @@
-  */
- 
- #include "dhcpd.h"
--#include "dst/md5.h"
- #include <dns/result.h>
- 
- #ifdef NSUPDATE
diff --git a/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch b/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
deleted file mode 100644
index 679fdd3..0000000
--- a/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
+++ /dev/null
@@ -1,12 +0,0 @@ 
-diff -up dhcp-4.2.4-P2/common/conflex.c.orig dhcp-4.2.4-P2/common/conflex.c
---- dhcp-4.2.4-P2/common/conflex.c.orig	2012-08-28 04:13:03.000000000 +0200
-+++ dhcp-4.2.4-P2/common/conflex.c	2012-10-09 14:01:29.922104149 +0200
-@@ -889,7 +889,7 @@ intern(char *atom, enum dhcp_token dfv)
- 			if (!strcasecmp(atom + 7, "list"))
- 				return DOMAIN_LIST;
- 		}
--		if (!strcasecmp (atom + 1, "o-forward-update"))
-+		if (!strcasecmp (atom + 1, "o-forward-updates"))
- 			return DO_FORWARD_UPDATE;
- 		if (!strcasecmp (atom + 1, "ebug"))
- 			return TOKEN_DEBUG;
diff --git a/dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch b/dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch
deleted file mode 100644
index 85c7473..0000000
--- a/dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch
+++ /dev/null
@@ -1,13 +0,0 @@ 
-diff -up dhcp-4.2.4-P2/common/parse.c.dupl-key dhcp-4.2.4-P2/common/parse.c
---- dhcp-4.2.4-P2/common/parse.c.dupl-key	2012-11-16 15:31:30.568561745 +0100
-+++ dhcp-4.2.4-P2/common/parse.c	2012-11-16 15:31:30.577561619 +0100
-@@ -2893,6 +2893,9 @@ int parse_zone (struct dns_zone *zone, s
- 			    }
- 			    val = key_name;
- 		    }
-+		    if (zone->key)
-+			log_fatal("Multiple key definition for zone %s.",
-+				  zone->name);
- 		    if (omapi_auth_key_lookup_name (&zone -> key, val) !=
- 			ISC_R_SUCCESS)
- 			    parse_warn (cfile, "unknown key %s", val);
diff --git a/dhcp/patches/dhcp-4.2.4-UseMulticast.patch b/dhcp/patches/dhcp-4.2.4-UseMulticast.patch
deleted file mode 100644
index d0c5dfe..0000000
--- a/dhcp/patches/dhcp-4.2.4-UseMulticast.patch
+++ /dev/null
@@ -1,239 +0,0 @@ 
-diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-4.2.4b1/server/dhcpv6.c
---- dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast	2012-04-11 00:14:04.000000000 +0200
-+++ dhcp-4.2.4b1/server/dhcpv6.c	2012-04-16 19:21:43.575923732 +0200
-@@ -346,6 +346,48 @@ generate_new_server_duid(void) {
- }
- 
- /*
-+ * Is the D6O_UNICAST option defined in dhcpd.conf ?
-+ */
-+static isc_boolean_t unicast_option_defined;
-+
-+/*
-+ * Did we already search dhcpd.conf for D6O_UNICAST option ?
-+ * We need to store it here to not parse dhcpd.conf repeatedly.
-+ */
-+static isc_boolean_t unicast_option_parsed = ISC_FALSE;
-+
-+
-+/*
-+ * Is the D6O_UNICAST option defined in dhcpd.conf ?
-+ */
-+isc_boolean_t
-+is_unicast_option_defined(void) {
-+	struct option_state *opt_state;
-+	struct option_cache *oc;
-+
-+	/*
-+	 * If we are looking for the unicast option for the first time
-+	 */
-+	if (unicast_option_parsed == ISC_FALSE) {
-+		unicast_option_parsed = ISC_TRUE;
-+		opt_state = NULL;
-+		if (!option_state_allocate(&opt_state, MDL)) {
-+			log_fatal("No memory for option state.");
-+		}
-+
-+		execute_statements_in_scope(NULL, NULL, NULL, NULL, NULL,
-+				opt_state, &global_scope, root_group, NULL);
-+
-+		oc = lookup_option(&dhcpv6_universe, opt_state, D6O_UNICAST);
-+		unicast_option_defined = (oc != NULL);
-+
-+		option_state_dereference(&opt_state, MDL);
-+	}
-+
-+	return (unicast_option_defined);
-+}
-+
-+/*
-  * Get the client identifier from the packet.
-  */
- isc_result_t
-@@ -1404,6 +1446,56 @@ lease_to_client(struct data_string *repl
- 						    reply.shared->group);
- 	}
- 
-+	/* reject unicast message, unless we set unicast option */
-+	if ((packet->unicast == ISC_TRUE) && !is_unicast_option_defined())
-+	/*
-+	 * RFC3315 section 18.2.1 (Request):
-+	 *
-+	 * When the server receives a Request message via unicast from a client
-+	 * to which the server has not sent a unicast option, the server
-+	 * discards the Request message and responds with a Reply message
-+	 * containing a Status Code option with the value UseMulticast, a Server
-+	 * Identifier option containing the server's DUID, the Client Identifier
-+	 * option from the client message, and no other options.
-+	 *
-+	 * Section 18.2.3 (Renew):
-+	 *
-+	 * When the server receives a Renew message via unicast from a client to
-+	 * which the server has not sent a unicast option, the server discards
-+	 * the Renew message and responds with a Reply message containing a
-+	 * Status Code option with the value UseMulticast, a Server Identifier
-+	 * option containing the server's DUID, the Client Identifier option
-+	 * from the client message, and no other options.
-+	 */
-+	{
-+		/* Set the UseMulticast status code. */
-+		if (!set_status_code(STATUS_UseMulticast,
-+					"Unicast not allowed by server.",
-+					reply.opt_state)) {
-+			log_error("lease_to_client: Unable to set "
-+					"UseMulticast status code.");
-+			goto exit;
-+		}
-+
-+		/* Rewind the cursor to the start. */
-+		reply.cursor = REPLY_OPTIONS_INDEX;
-+
-+		/*
-+		 * Produce an reply that includes only:
-+		 *
-+		 * Status code.
-+		 * Server DUID.
-+		 * Client DUID.
-+		 */
-+		reply.cursor += store_options6((char *)reply.buf.data +
-+					reply.cursor,
-+					sizeof(reply.buf) -
-+					reply.cursor,
-+					reply.opt_state, reply.packet,
-+					required_opts_NAA,
-+					NULL);
-+	}
-+
- 	/*
- 	 * RFC3315 section 17.2.2 (Solicit):
- 	 *
-@@ -1429,8 +1521,8 @@ lease_to_client(struct data_string *repl
- 	 * Sends a Renew/Rebind if the IA is not in the Reply message.
- 	 */
- #if defined (RFC3315_PRE_ERRATA_2010_08)
--	if (no_resources_avail && (reply.ia_count != 0) &&
--	    (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT))
-+	else if (no_resources_avail && (reply.ia_count != 0) &&
-+		 (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT))
- 	{
- 		/* Set the NoAddrsAvail status code. */
- 		if (!set_status_code(STATUS_NoAddrsAvail,
-@@ -1477,6 +1569,7 @@ lease_to_client(struct data_string *repl
- 	 * Having stored the client's IA's, store any options that
- 	 * will fit in the remaining space.
- 	 */
-+	else 
- 	reply.cursor += store_options6((char *)reply.buf.data + reply.cursor,
- 				       sizeof(reply.buf) - reply.cursor,
- 				       reply.opt_state, reply.packet,
-@@ -4126,7 +4219,6 @@ dhcpv6_solicit(struct data_string *reply
-  * Very similar to Solicit handling, except the server DUID is required.
-  */
- 
--/* TODO: reject unicast messages, unless we set unicast option */
- static void
- dhcpv6_request(struct data_string *reply_ret, struct packet *packet) {
- 	struct data_string client_id;
-@@ -4456,7 +4548,6 @@ exit:
-  * except for the error code of when addresses don't match.
-  */
- 
--/* TODO: reject unicast messages, unless we set unicast option */
- static void
- dhcpv6_renew(struct data_string *reply, struct packet *packet) {
- 	struct data_string client_id;
-@@ -4700,18 +4791,60 @@ iterate_over_ia_na(struct data_string *r
- 		goto exit;
- 	}
- 
--	snprintf(status_msg, sizeof(status_msg), "%s received.", packet_type);
--	if (!set_status_code(STATUS_Success, status_msg, opt_state)) {
--		goto exit;
--	}
-+	/* reject unicast message, unless we set unicast option */
-+	if ((packet->unicast == ISC_TRUE) && !is_unicast_option_defined()) {
-+		/*
-+		 * RFC3315 section 18.2.6 (Release):
-+		 *
-+		 * When the server receives a Release message via unicast from a client
-+		 * to which the server has not sent a unicast option, the server
-+		 * discards the Release message and responds with a Reply message
-+		 * containing a Status Code option with value UseMulticast, a Server
-+		 * Identifier option containing the server's DUID, the Client Identifier
-+		 * option from the client message, and no other options.
-+		 *
-+		 * Section 18.2.7 (Decline):
-+		 *
-+		 * When the server receives a Decline message via unicast from a client
-+		 * to which the server has not sent a unicast option, the server
-+		 * discards the Decline message and responds with a Reply message
-+		 * containing a Status Code option with the value UseMulticast, a Server
-+		 * Identifier option containing the server's DUID, the Client Identifier
-+		 * option from the client message, and no other options.
-+		 */
-+		snprintf(status_msg, sizeof(status_msg),
-+				 "%s received unicast.", packet_type);
-+		if (!set_status_code(STATUS_UseMulticast, status_msg, opt_state)) {
-+			goto exit;
-+		}
- 
--	/* 
--	 * Add our options that are not associated with any IA_NA or IA_TA. 
--	 */
--	reply_ofs += store_options6(reply_data+reply_ofs,
--				    sizeof(reply_data)-reply_ofs, 
-+		/*
-+		 * Produce an reply that includes only:
-+		 *
-+		 * Status code.
-+		 * Server DUID.
-+		 * Client DUID.
-+		 */
-+		reply_ofs += store_options6(reply_data+reply_ofs,
-+				    sizeof(reply_data)-reply_ofs,
- 				    opt_state, packet,
--				    required_opts, NULL);
-+				    required_opts_NAA, NULL);
-+
-+		goto return_reply;
-+	} else {
-+		snprintf(status_msg, sizeof(status_msg), "%s received.", packet_type);
-+		if (!set_status_code(STATUS_Success, status_msg, opt_state)) {
-+			goto exit;
-+		}
-+
-+		/*
-+		 * Add our options that are not associated with any IA_NA or IA_TA.
-+		 */
-+		reply_ofs += store_options6(reply_data+reply_ofs,
-+					    sizeof(reply_data)-reply_ofs,
-+					    opt_state, packet,
-+					    required_opts, NULL);
-+	}
- 
- 	/*
- 	 * Loop through the IA_NA reported by the client, and deal with
-@@ -4849,6 +4982,7 @@ iterate_over_ia_na(struct data_string *r
- 	/* 
- 	 * Return our reply to the caller.
- 	 */
-+return_reply:
- 	reply_ret->len = reply_ofs;
- 	reply_ret->buffer = NULL;
- 	if (!buffer_allocate(&reply_ret->buffer, reply_ofs, MDL)) {
-@@ -4894,7 +5028,6 @@ exit:
-  * we still need to be aware of this possibility.
-  */
- 
--/* TODO: reject unicast messages, unless we set unicast option */
- /* TODO: IA_TA */
- static void
- dhcpv6_decline(struct data_string *reply, struct packet *packet) {
-@@ -5364,7 +5497,6 @@ exit:
-  * Release means a client is done with the leases.
-  */
- 
--/* TODO: reject unicast messages, unless we set unicast option */
- static void
- dhcpv6_release(struct data_string *reply, struct packet *packet) {
- 	struct data_string client_id;
diff --git a/dhcp/patches/dhcp-4.2.4-failOverPeer.patch b/dhcp/patches/dhcp-4.2.4-failOverPeer.patch
deleted file mode 100644
index 1b0da7e..0000000
--- a/dhcp/patches/dhcp-4.2.4-failOverPeer.patch
+++ /dev/null
@@ -1,12 +0,0 @@ 
-diff -up dhcp-4.2.4/server/ldap.c.failOverPeer dhcp-4.2.4/server/ldap.c
---- dhcp-4.2.4/server/ldap.c.failOverPeer	2012-07-23 12:53:26.815262322 +0200
-+++ dhcp-4.2.4/server/ldap.c	2012-07-23 12:54:31.002119299 +0200
-@@ -893,7 +893,7 @@ ldap_start (void)
- static void
- parse_external_dns (LDAPMessage * ent)
- {
--  char *search[] = {"dhcpOptionsDN", "dhcpSharedNetworkDN", "dhcpSubnetDN",
-+  char *search[] = {"dhcpFailOverPeerDN", "dhcpOptionsDN", "dhcpSharedNetworkDN", "dhcpSubnetDN",
-                     "dhcpGroupDN", "dhcpHostDN", "dhcpClassesDN",
-                     "dhcpPoolDN", NULL};
-   LDAPMessage * newres, * newent;
diff --git a/dhcp/patches/dhcp-4.2.4-send_release.patch b/dhcp/patches/dhcp-4.2.4-send_release.patch
deleted file mode 100644
index 3e0a618..0000000
--- a/dhcp/patches/dhcp-4.2.4-send_release.patch
+++ /dev/null
@@ -1,23 +0,0 @@ 
-diff -up dhcp-4.2.4b1/client/dhclient.c.send_release dhcp-4.2.4b1/client/dhclient.c
---- dhcp-4.2.4b1/client/dhclient.c.send_release	2012-04-16 17:48:52.000000000 +0200
-+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:50:44.357396720 +0200
-@@ -2764,8 +2764,8 @@ void send_release (cpp)
- 	      inet_ntoa (destination.sin_addr),
- 	      ntohs (destination.sin_port), client -> xid);
- 
--	if (fallback_interface) {
--		result = send_packet(fallback_interface, NULL, &client->packet,
-+	if (client -> interface) {
-+		result = send_packet(client -> interface, NULL, &client->packet,
- 				      client->packet_length, from, &destination,
- 				      NULL);
- 		if (result < 0) {
-@@ -2776,7 +2776,7 @@ void send_release (cpp)
- 		}
-         } else {
- 		/* Send out a packet. */
--		result = send_packet(client->interface, NULL, &client->packet,
-+		result = send_packet(fallback_interface, NULL, &client->packet,
- 				      client->packet_length, from, &destination,
- 				      NULL);
- 		if (result < 0) {
diff --git a/dhcp/patches/dhcp-4.2.5-next-server.patch b/dhcp/patches/dhcp-4.2.5-next-server.patch
deleted file mode 100644
index c903bd1..0000000
--- a/dhcp/patches/dhcp-4.2.5-next-server.patch
+++ /dev/null
@@ -1,72 +0,0 @@ 
-From f113ad7822fcd691e72f61cab7412595951222db Mon Sep 17 00:00:00 2001
-From: Tomas Hozza <thozza@redhat.com>
-Date: Wed, 3 Apr 2013 10:20:18 +0200
-Subject: [PATCH] Expose next-server DHCPv4 option to dhclient script
-
-Currently dhclient does not exposes next-server option
-to the dhclient script. this patch fixes this.
-
-Signed-off-by: Tomas Hozza <thozza@redhat.com>
----
- client/dhclient.c | 14 +++++++++++---
- includes/dhcpd.h  |  2 +-
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/client/dhclient.c b/client/dhclient.c
-index 551ccbf..e8df320 100644
---- a/client/dhclient.c
-+++ b/client/dhclient.c
-@@ -993,7 +993,7 @@ void state_selecting (cpp)
- 		client -> state = S_REQUESTING;
- 
- 		/* Bind to the address we received. */
--		bind_lease (client);
-+		bind_lease (client, NULL);
- 		return;
- 	}
- 
-@@ -1183,11 +1183,12 @@ void dhcpack (packet)
- 	if (client -> new -> rebind < cur_time)
- 		client -> new -> rebind = TIME_MAX;
- 
--	bind_lease (client);
-+	bind_lease (client, &packet -> raw -> siaddr);
- }
- 
--void bind_lease (client)
-+void bind_lease (client, siaddr)
- 	struct client_state *client;
-+	struct in_addr *siaddr;
- {
- 	struct timeval tv;
- 
-@@ -1209,6 +1210,13 @@ void bind_lease (client)
- 	if (client -> alias)
- 		script_write_params (client, "alias_", client -> alias);
- 
-+	if (siaddr) {
-+		char buf[INET_ADDRSTRLEN];
-+
-+		if (inet_ntop (AF_INET, (void *) siaddr, buf, sizeof (buf)))
-+			client_envadd (client, "new_", "next_server", "%s", buf);
-+	}
-+
- 	/* If the BOUND/RENEW code detects another machine using the
- 	   offered address, it exits nonzero.  We need to send a
- 	   DHCPDECLINE and toss the lease. */
-diff --git a/includes/dhcpd.h b/includes/dhcpd.h
-index 12ed2ba..4e93e68 100644
---- a/includes/dhcpd.h
-+++ b/includes/dhcpd.h
-@@ -2712,7 +2712,7 @@ void state_bound (void *);
- void state_stop (void *);
- void state_panic (void *);
- 
--void bind_lease (struct client_state *);
-+void bind_lease (struct client_state *, struct in_addr *);
- 
- void make_client_options (struct client_state *,
- 			  struct client_lease *, u_int8_t *,
--- 
-1.8.1.4
-
diff --git a/dhcp/patches/dhcp-4.2.5-paranoia.patch b/dhcp/patches/dhcp-4.2.5-paranoia.patch
deleted file mode 100644
index 05affdd..0000000
--- a/dhcp/patches/dhcp-4.2.5-paranoia.patch
+++ /dev/null
@@ -1,202 +0,0 @@ 
-diff -up dhcp-4.2.5/client/dhclient.c.paranoia dhcp-4.2.5/client/dhclient.c
---- dhcp-4.2.5/client/dhclient.c.paranoia	2013-03-26 13:14:50.574542083 +0100
-+++ dhcp-4.2.5/client/dhclient.c	2013-03-26 13:14:50.584541964 +0100
-@@ -1698,11 +1698,6 @@ int write_host (host)
- 	return 0;
- }
- 
--void db_startup (testp)
--	int testp;
--{
--}
--
- void bootp (packet)
- 	struct packet *packet;
- {
-diff -up dhcp-4.2.5/includes/dhcpd.h.paranoia dhcp-4.2.5/includes/dhcpd.h
---- dhcp-4.2.5/includes/dhcpd.h.paranoia	2013-03-26 13:14:50.576542059 +0100
-+++ dhcp-4.2.5/includes/dhcpd.h	2013-03-26 13:14:50.585541952 +0100
-@@ -2798,7 +2798,11 @@ void commit_leases_timeout (void *);
- void commit_leases_readerdry(void *);
- int commit_leases (void);
- int commit_leases_timed (void);
-+#if defined (PARANOIA)
-+void db_startup (int, uid_t, gid_t);
-+#else
- void db_startup (int);
-+#endif /* PARANOIA */
- int new_lease_file (void);
- int group_writer (struct group_object *);
- int write_ia(const struct ia_xx *);
-diff -up dhcp-4.2.5/server/confpars.c.paranoia dhcp-4.2.5/server/confpars.c
---- dhcp-4.2.5/server/confpars.c.paranoia	2013-03-26 13:14:50.522542705 +0100
-+++ dhcp-4.2.5/server/confpars.c	2013-03-26 13:14:50.587541928 +0100
-@@ -224,7 +224,11 @@ void trace_conf_input (trace_type_t *tty
- 	}
- 
- 	if (!leaseconf_initialized && ttype == trace_readleases_type) {
-+#if defined (PARANOIA)
-+		db_startup (0, 0, 0);
-+#else
- 		db_startup (0);
-+#endif /* PARANOIA */
- 		leaseconf_initialized = 1;
- 		postdb_startup ();
- 	}
-diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
---- dhcp-4.2.5/server/db.c.paranoia	2013-03-26 13:14:50.522542705 +0100
-+++ dhcp-4.2.5/server/db.c	2013-03-26 13:14:50.588541916 +0100
-@@ -47,6 +47,10 @@ static int counting = 0;
- static int count = 0;
- TIME write_time;
- int lease_file_is_corrupt = 0;
-+#if defined (PARANOIA)
-+uid_t global_set_uid = 0;
-+gid_t global_set_gid = 0;
-+#endif /* PARANOIA */
- 
- /* Write a single binding scope value in parsable format.
-  */
-@@ -1026,8 +1030,11 @@ int commit_leases_timed()
- 	return (1);
- }
- 
--void db_startup (testp)
--	int testp;
-+#if defined (PARANOIA)
-+void db_startup (int testp, uid_t set_uid, gid_t set_gid)
-+#else
-+void db_startup (int testp)
-+#endif /* PARANOIA */
- {
- 	isc_result_t status;
- 
-@@ -1046,6 +1053,11 @@ void db_startup (testp)
- 	}
- #endif
- 
-+#if defined (PARANOIA)
-+	global_set_uid = set_uid;
-+	global_set_gid = set_gid;
-+#endif /* PARANOIA */
-+
- #if defined (TRACING)
- 	/* If we're playing back, there is no lease file, so we can't
- 	   append it, so we create one immediately (maybe this isn't
-@@ -1108,6 +1120,17 @@ int new_lease_file ()
- 		log_error ("Can't create new lease file: %m");
- 		return 0;
- 	}
-+
-+#if defined (PARANOIA)
-+	if (global_set_uid && !geteuid() &&
-+	    global_set_gid && !getegid())
-+		if (fchown(db_fd, global_set_uid, global_set_gid)) {
-+			log_fatal ("Can't chown new lease file: %m");
-+			close(db_fd);
-+			goto fdfail;
-+	}
-+#endif /* PARANOIA */
-+
- 	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
- 		log_error("Can't fdopen new lease file: %m");
- 		close(db_fd);
-diff -up dhcp-4.2.5/server/dhcpd.8.paranoia dhcp-4.2.5/server/dhcpd.8
---- dhcp-4.2.5/server/dhcpd.8.paranoia	2013-01-03 01:02:25.000000000 +0100
-+++ dhcp-4.2.5/server/dhcpd.8	2013-03-26 13:28:16.576604471 +0100
-@@ -82,6 +82,18 @@ dhcpd - Dynamic Host Configuration Proto
- .I trace-output-file
- ]
- [
-+.B -user
-+.I user
-+]
-+[
-+.B -group
-+.I group
-+]
-+[
-+.B -chroot
-+.I dir
-+]
-+[
- .B -play
- .I trace-playback-file
- ]
-@@ -269,6 +281,15 @@ lease file.
- .TP
- .BI --version
- Print version number and exit.
-+.TP
-+.BI \-user \ user
-+Setuid to user after completing privileged operations, such as creating sockets that listen on privileged ports.
-+.TP
-+.BI \-group \ group
-+Setgid to group after completing privileged operations, such as creating sockets that listen on privileged ports.
-+.TP
-+.BI \-chroot \ dir
-+Chroot to directory after processing the command line arguments, but before reading the configuration file.
- .PP
- .I Modifying default file locations:
- The following options can be used to modify the locations 
-diff -up dhcp-4.2.5/server/dhcpd.c.paranoia dhcp-4.2.5/server/dhcpd.c
---- dhcp-4.2.5/server/dhcpd.c.paranoia	2013-03-26 13:14:50.523542693 +0100
-+++ dhcp-4.2.5/server/dhcpd.c	2013-03-26 13:14:50.589541904 +0100
-@@ -702,7 +702,11 @@ main(int argc, char **argv) {
- 	group_write_hook = group_writer;
- 
- 	/* Start up the database... */
-+#if defined (PARANOIA)
-+	db_startup (lftest, set_uid, set_gid);
-+#else
- 	db_startup (lftest);
-+#endif /* PARANOIA */
- 
- 	if (lftest)
- 		exit (0);
-@@ -773,22 +777,6 @@ main(int argc, char **argv) {
- 			exit (0);
- 	}
-  
--#if defined (PARANOIA)
--	/* change uid to the specified one */
--
--	if (set_gid) {
--		if (setgroups (0, (void *)0))
--			log_fatal ("setgroups: %m");
--		if (setgid (set_gid))
--			log_fatal ("setgid(%d): %m", (int) set_gid);
--	}	
--
--	if (set_uid) {
--		if (setuid (set_uid))
--			log_fatal ("setuid(%d): %m", (int) set_uid);
--	}
--#endif /* PARANOIA */
--
- 	/*
- 	 * Deal with pid files.  If the user told us
- 	 * not to write a file we don't read one either
-@@ -825,6 +813,22 @@ main(int argc, char **argv) {
- 		}
- 	}
- 
-+#if defined (PARANOIA)
-+	/* change uid to the specified one */
-+
-+	if (set_gid) {
-+		if (setgroups (0, (void *)0))
-+			log_fatal ("setgroups: %m");
-+		if (setgid (set_gid))
-+			log_fatal ("setgid(%d): %m", (int) set_gid);
-+	}	
-+
-+	if (set_uid) {
-+		if (setuid (set_uid))
-+			log_fatal ("setuid(%d): %m", (int) set_uid);
-+	}
-+#endif /* PARANOIA */
-+
- 	/* If we were requested to log to stdout on the command line,
- 	   keep doing so; otherwise, stop. */
- 	if (log_perror == -1)
diff --git a/dhcp/patches/dhcp-4.2.5-range6.patch b/dhcp/patches/dhcp-4.2.5-range6.patch
deleted file mode 100644
index 754d899..0000000
--- a/dhcp/patches/dhcp-4.2.5-range6.patch
+++ /dev/null
@@ -1,42 +0,0 @@ 
-diff --git a/server/confpars.c b/server/confpars.c
-index 12ab0e6..4454be9 100644
---- a/server/confpars.c
-+++ b/server/confpars.c
-@@ -3756,6 +3756,19 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
- 	share->ipv6_pools[num_pools+1] = NULL;
- }
- 
-+static void
-+check_addr_in_subnet(struct subnet *subnet, struct iaddr *addr) {
-+	char lowbuf [INET6_ADDRSTRLEN], netbuf [INET6_ADDRSTRLEN];
-+
-+	if (!addr_eq(subnet->net, subnet_number(*addr, subnet->netmask))) {
-+		strcpy(lowbuf, piaddr(*addr));
-+		strcpy(netbuf, piaddr(subnet->net));
-+		log_fatal("bad range6, address %s not in subnet6 %s/%d",
-+			lowbuf, netbuf, subnet->prefix_len);
-+	}
-+
-+}
-+
- /* address-range6-declaration :== ip-address6 ip-address6 SEMI
- 			       | ip-address6 SLASH number SEMI
- 			       | ip-address6 [SLASH number] TEMPORARY SEMI */
-@@ -3788,6 +3801,8 @@ parse_address_range6(struct parse *cfile, struct group *group) {
- 		return;
- 	}
- 
-+	check_addr_in_subnet(group->subnet, &lo);
-+
- 	/* 
- 	 * See if we we're using range or CIDR notation or TEMPORARY
- 	 */
-@@ -3855,6 +3870,8 @@ parse_address_range6(struct parse *cfile, struct group *group) {
- 			return;
- 		}
- 
-+		check_addr_in_subnet(group->subnet, &hi);
-+
- 		/*
- 		 * Convert our range to a set of CIDR networks.
- 		 */
diff --git a/dhcp/patches/dhcp-4.2.5-remove-bind.patch b/dhcp/patches/dhcp-4.2.5-remove-bind.patch
deleted file mode 100644
index d3ef6b7..0000000
--- a/dhcp/patches/dhcp-4.2.5-remove-bind.patch
+++ /dev/null
@@ -1,164 +0,0 @@ 
-diff -up dhcp-4.2.5b1/client/Makefile.am.remove-bind dhcp-4.2.5b1/client/Makefile.am
---- dhcp-4.2.5b1/client/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/client/Makefile.am	2012-12-17 16:20:58.692538252 +0100
-@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
- 		   scripts/netbsd scripts/nextstep scripts/openbsd \
- 		   scripts/solaris scripts/openwrt
- dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--		 ../bind/lib/libdns.a ../bind/lib/libisc.a
-+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
- man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
- EXTRA_DIST = $(man_MANS)
- 
-diff -up dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind dhcp-4.2.5b1/common/tests/Makefile.am
---- dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/common/tests/Makefile.am	2012-12-17 16:20:58.693538239 +0100
-@@ -13,8 +13,8 @@ ATF_TESTS += alloc_unittest
- alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
- alloc_unittest_LDADD = $(ATF_LDFLAGS)
- alloc_unittest_LDADD += ../libdhcp.a  \
--	../../omapip/libomapi.a ../../bind/lib/libdns.a \
--        ../../bind/lib/libisc.a
-+	../../omapip/libomapi.a \
-+	 $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- check: $(ATF_TESTS)
- 	atf-run | atf-report
-diff -up dhcp-4.2.5b1/configure.ac.remove-bind dhcp-4.2.5b1/configure.ac
---- dhcp-4.2.5b1/configure.ac.remove-bind	2012-12-05 02:18:44.000000000 +0100
-+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:20:58.693538239 +0100
-@@ -581,20 +581,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
- libbind=
- AC_ARG_WITH(libbind,
- 	AC_HELP_STRING([--with-libbind=PATH],
--		       [bind includes and libraries are in PATH 
--		        (default is ./bind)]),
-+		       [bind includes are in PATH 
-+		        (default is ./bind/includes)]),
- 	use_libbind="$withval", use_libbind="no")
- case "$use_libbind" in 
-+yes|no)
-+	libbind="\${top_srcdir}/bind/include"
-+	;;
-+*)
-+	libbind="$use_libbind"
-+	;;
-+esac
-+
-+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
-+AC_ARG_WITH(libbind-libs,
-+	AC_HELP_STRING([--with-libbind-libs=PATH],
-+		       [bind9 export libraries are in PATH]),
-+		       [libbind_libs="$withval"], [libbind_libs='no'])
-+case "$libbind_libs" in
- yes)
--	libbind="\${top_srcdir}/bind"
-+	AC_MSG_ERROR([Specify path to bind9 libraries])
- 	;;
- no)
--	libbind="\${top_srcdir}/bind"
-+	BUNDLED_BIND=yes
- 	;;
- *)
--	libbind="$use_libbind"
-+	BIND9_LIBDIR="-L$libbind_libs"
-+	BUNDLED_BIND=no
- 	;;
- esac
-+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
-+AC_SUBST([BIND9_LIBDIR])
- 
- # OpenLDAP support.
- AC_ARG_WITH(ldap,
-@@ -631,7 +648,7 @@ fi
- CFLAGS="$CFLAGS $STD_CWARNINGS"
- 
- # Try to add the bind include directory
--CFLAGS="$CFLAGS -I$libbind/include"
-+CFLAGS="$CFLAGS -I$libbind"
- 
- AC_C_FLEXIBLE_ARRAY_MEMBER
- 
-diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind dhcp-4.2.5b1/dhcpctl/Makefile.am
---- dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/dhcpctl/Makefile.am	2012-12-17 16:20:58.693538239 +0100
-@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
- 
- omshell_SOURCES = omshell.c
- omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
--	        ../bind/lib/libdns.a ../bind/lib/libisc.a
-+	        $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
- 
- cltest_SOURCES = cltest.c
- cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
--	       ../bind/lib/libdns.a ../bind/lib/libisc.a
-\ No newline at end of file
-+	       $(BIND9_LIBDIR) -ldns-export -lisc-export
-diff -up dhcp-4.2.5b1/Makefile.am.remove-bind dhcp-4.2.5b1/Makefile.am
---- dhcp-4.2.5b1/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000 +0100
-+++ dhcp-4.2.5b1/Makefile.am	2012-12-17 16:20:58.693538239 +0100
-@@ -22,7 +22,13 @@ EXTRA_DIST = RELNOTES LICENSE \
- 	     bind/Makefile bind/bind.tar.gz bind/version.tmp \
- 	     common/tests/Atffile server/tests/Atffile
- 
--SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
-+if BUNDLED_BIND
-+SUBDIRS = bind
-+else
-+SUBDIRS = 
-+endif
-+
-+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
- 
- nobase_include_HEADERS = dhcpctl/dhcpctl.h
- 
-diff -up dhcp-4.2.5b1/omapip/Makefile.am.remove-bind dhcp-4.2.5b1/omapip/Makefile.am
---- dhcp-4.2.5b1/omapip/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/omapip/Makefile.am	2012-12-17 16:20:58.693538239 +0100
-@@ -10,5 +10,5 @@ man_MANS = omapi.3
- EXTRA_DIST = $(man_MANS)
- 
- svtest_SOURCES = test.c
--svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
-+svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
-diff -up dhcp-4.2.5b1/relay/Makefile.am.remove-bind dhcp-4.2.5b1/relay/Makefile.am
---- dhcp-4.2.5b1/relay/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/relay/Makefile.am	2012-12-17 16:20:58.694538225 +0100
-@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
- sbin_PROGRAMS = dhcrelay
- dhcrelay_SOURCES = dhcrelay.c
- dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--		 ../bind/lib/libdns.a ../bind/lib/libisc.a
-+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
- man_MANS = dhcrelay.8
- EXTRA_DIST = $(man_MANS)
- 
-diff -up dhcp-4.2.5b1/server/Makefile.am.remove-bind dhcp-4.2.5b1/server/Makefile.am
---- dhcp-4.2.5b1/server/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:20:58.694538225 +0100
-@@ -14,8 +14,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
- 
- dhcpd_CFLAGS = $(LDAP_CFLAGS)
- dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--	      ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
--	      ../bind/lib/libisc.a
-+	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
- EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind dhcp-4.2.5b1/server/tests/Makefile.am
---- dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17 16:26:01.093346768 +0100
-@@ -18,8 +18,7 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
-           ../ldap.c ../ldap_casa.c ../dhcpd.c
- 
- DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a    \
--          $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libdns.a \
--          $(top_builddir)/bind/lib/libisc.a
-+          $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- ATF_TESTS =
- TESTS = 
diff --git a/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch b/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch
deleted file mode 100644
index 3b844e0..0000000
--- a/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch
+++ /dev/null
@@ -1,89 +0,0 @@ 
-diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-options.5
---- dhcp-4.2.5b1/common/dhcp-options.5.rfc5970	2012-12-17 13:43:44.000000000 +0100
-+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 13:45:18.777638579 +0100
-@@ -1771,7 +1771,48 @@ The \fBlq-relay-data\fR option is used i
- The \fBlq-client-link\fR option is used internally by for lease query.
- .RE
- .PP
-+
-+.B option
-+.B dhcp6.bootfile-url
-+.I string 
-+.B ;
-+.RS 0.25i
-+.PP
-+The server sends this option to inform the client about a URL to a
-+boot file.  Used primarily for UEFI network booting, it contains an RFC3986
-+compliant URI which the client may use to boot an operating system.  This option
-+is defined in RFC5970
- .RE
-+.PP
-+
-+.B option
-+.B dhcp6.arch-type
-+.I arch-id \fR[\fB,\fR arch-id\fR...] 
-+.B ;
-+.RS 0.25i
-+.PP
-+A client will send this option to a server so that the server may make decisions
-+on what options and addresses to offer the requesting client.  The option
-+consists of a list of 16 bit unsigned values that represent the architecture of
-+the requesting client.  These values corespond to the values available to the
-+dhcpv4 option architecture-type, as defined in RFC4578, section 2.1.
-+This option is defined in RFC5970
-+ .RE
-+.PP
-+
-+.B option
-+.B dhcp6.net-id
-+.I uint8 uint8 uint8 
-+.B ;
-+.RS 0.25i
-+.PP
-+A client will send this option to a server to inform it about the clients level
-+of UNDI support.  The option consists of 3 octets (a type, major and minor
-+value).  Specific meanings of these values are doumented in section 2.2 of
-+RFC4578.
-+This option is defined in RFC5970
-+.RE
-+.PP
- .SH DEFINING NEW OPTIONS
- The Internet Systems Consortium DHCP client and server provide the
- capability to define new options.  Each DHCP option has a name, a
-diff -up dhcp-4.2.5b1/common/tables.c.rfc5970 dhcp-4.2.5b1/common/tables.c
---- dhcp-4.2.5b1/common/tables.c.rfc5970	2012-12-17 13:43:44.204939024 +0100
-+++ dhcp-4.2.5b1/common/tables.c	2012-12-17 13:43:44.286937948 +0100
-@@ -463,6 +463,18 @@ static struct option dhcpv6_options[] =
- 	{ "lq-relay-data", "6X",		&dhcpv6_universe, 47, 1 },
- 	{ "lq-client-link", "6A",		&dhcpv6_universe, 48, 1 },
- 
-+			/* RFC5970 OPTIONS */
-+
-+	{ "bootfile-url", "t",			&dhcpv6_universe, 59, 1},
-+#if 0
-+	/* Can't implement this until arrays of strings with length "StA"
-+	 * are implemented
-+	 */
-+	{ "bootfile-param", "StA",		&dhcpv6_universe, 60, 1},
-+#endif
-+	{ "arch-type", "Sa",			&dhcpv6_universe, 61, 1},
-+	{ "net-id", "BBB",			&dhcpv6_universe, 62, 1},
-+
- 	{ NULL, NULL, NULL, 0, 0 }
- };
- 
-diff -up dhcp-4.2.5b1/includes/dhcp6.h.rfc5970 dhcp-4.2.5b1/includes/dhcp6.h
---- dhcp-4.2.5b1/includes/dhcp6.h.rfc5970	2012-12-04 20:45:42.000000000 +0100
-+++ dhcp-4.2.5b1/includes/dhcp6.h	2012-12-17 13:43:44.286937948 +0100
-@@ -75,6 +75,11 @@
- #define D6O_CLT_TIME				46 /* RFC5007 */
- #define D6O_LQ_RELAY_DATA			47 /* RFC5007 */
- #define D6O_LQ_CLIENT_LINK			48 /* RFC5007 */
-+/* 49-58 Not yet assigned */
-+#define D60_BOOT_URL				59 /* RFC5970 */
-+#define D60_BOOT_PARAMS				60 /* RFC5970 */
-+#define D60_CLIENT_ARCH				61 /* RFC5970 */
-+#define D60_CLIENT_NII				62 /* RFC5970 */
- 
- /* 
-  * Status Codes, from RFC 3315 section 24.4, and RFC 3633, 5007.
diff --git a/dhcp/patches/dhcp-4.2.5-sharedlib.patch b/dhcp/patches/dhcp-4.2.5-sharedlib.patch
deleted file mode 100644
index d543ab7..0000000
--- a/dhcp/patches/dhcp-4.2.5-sharedlib.patch
+++ /dev/null
@@ -1,120 +0,0 @@ 
-diff -up dhcp-4.2.5b1/client/Makefile.am.sharedlib dhcp-4.2.5b1/client/Makefile.am
---- dhcp-4.2.5b1/client/Makefile.am.sharedlib	2012-12-17 16:26:53.350623790 +0100
-+++ dhcp-4.2.5b1/client/Makefile.am	2012-12-17 16:26:53.384623342 +0100
-@@ -4,7 +4,7 @@ dhclient_SOURCES = clparse.c dhclient.c
- 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
- 		   scripts/netbsd scripts/nextstep scripts/openbsd \
- 		   scripts/solaris scripts/openwrt
--dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
-+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
- 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
- man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
- EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib dhcp-4.2.5b1/common/tests/Makefile.am
---- dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib	2012-12-17 16:26:53.271624835 +0100
-+++ dhcp-4.2.5b1/common/tests/Makefile.am	2012-12-17 16:26:53.384623342 +0100
-@@ -13,7 +13,7 @@ ATF_TESTS += alloc_unittest
- alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
- alloc_unittest_LDADD = $(ATF_LDFLAGS)
- alloc_unittest_LDADD += ../libdhcp.a  \
--	../../omapip/libomapi.a \
-+	../../omapip/libomapi.la \
- 	 $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- check: $(ATF_TESTS)
-diff -up dhcp-4.2.5b1/configure.ac.sharedlib dhcp-4.2.5b1/configure.ac
---- dhcp-4.2.5b1/configure.ac.sharedlib	2012-12-17 16:26:53.350623790 +0100
-+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:26:53.384623342 +0100
-@@ -37,7 +37,8 @@ fi
- # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
- AC_USE_SYSTEM_EXTENSIONS
- 
--AC_PROG_RANLIB
-+# Use libtool to simplify building of shared libraries
-+AC_PROG_LIBTOOL
- AC_CONFIG_HEADERS([includes/config.h])
- 
- # we sometimes need to know byte order for building packets
-diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib dhcp-4.2.5b1/dhcpctl/Makefile.am
---- dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib	2012-12-17 16:26:53.271624835 +0100
-+++ dhcp-4.2.5b1/dhcpctl/Makefile.am	2012-12-17 16:26:53.385623329 +0100
-@@ -1,15 +1,15 @@
- bin_PROGRAMS = omshell
--lib_LIBRARIES = libdhcpctl.a
-+lib_LTLIBRARIES = libdhcpctl.la
- noinst_PROGRAMS = cltest
- man_MANS = omshell.1 dhcpctl.3
- EXTRA_DIST = $(man_MANS)
- 
- omshell_SOURCES = omshell.c
--omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
-+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
- 	        $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
--libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
-+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
- 
- cltest_SOURCES = cltest.c
--cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
-+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
- 	       $(BIND9_LIBDIR) -ldns-export -lisc-export
-diff -up dhcp-4.2.5b1/omapip/Makefile.am.sharedlib dhcp-4.2.5b1/omapip/Makefile.am
---- dhcp-4.2.5b1/omapip/Makefile.am.sharedlib	2012-12-17 16:26:53.272624822 +0100
-+++ dhcp-4.2.5b1/omapip/Makefile.am	2012-12-17 16:26:53.385623329 +0100
-@@ -1,7 +1,7 @@
--lib_LIBRARIES = libomapi.a
-+lib_LTLIBRARIES = libomapi.la
- noinst_PROGRAMS = svtest
- 
--libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
-+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
- 		     errwarn.c listener.c dispatch.c generic.c support.c \
- 		     handle.c message.c convert.c hash.c auth.c inet_addr.c \
- 		     array.c trace.c toisc.c iscprint.c isclib.c
-@@ -10,5 +10,5 @@ man_MANS = omapi.3
- EXTRA_DIST = $(man_MANS)
- 
- svtest_SOURCES = test.c
--svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
-+svtest_LDADD = libomapi.la $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
-diff -up dhcp-4.2.5b1/relay/Makefile.am.sharedlib dhcp-4.2.5b1/relay/Makefile.am
---- dhcp-4.2.5b1/relay/Makefile.am.sharedlib	2012-12-17 16:26:53.351623777 +0100
-+++ dhcp-4.2.5b1/relay/Makefile.am	2012-12-17 16:26:53.385623329 +0100
-@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
- 
- sbin_PROGRAMS = dhcrelay
- dhcrelay_SOURCES = dhcrelay.c
--dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
-+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
- 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
- man_MANS = dhcrelay.8
- EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.5b1/server/Makefile.am.sharedlib dhcp-4.2.5b1/server/Makefile.am
---- dhcp-4.2.5b1/server/Makefile.am.sharedlib	2012-12-17 16:26:53.272624822 +0100
-+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:26:53.385623329 +0100
-@@ -13,8 +13,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
- 		dhcpv6.c mdb6.c ldap.c ldap_casa.c
- 
- dhcpd_CFLAGS = $(LDAP_CFLAGS)
--dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
--	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
-+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
-+	      ../dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
- EXTRA_DIST = $(man_MANS)
-diff -up dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib dhcp-4.2.5b1/server/tests/Makefile.am
---- dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib	2012-12-17 16:26:53.000000000 +0100
-+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17 16:28:25.898349545 +0100
-@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
-           ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c        \
-           ../ldap.c ../ldap_casa.c ../dhcpd.c
- 
--DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a    \
--          $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
-+DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la    \
-+          $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
- ATF_TESTS =
- TESTS = 
diff --git a/dhcp/patches/dhcp-4.2.5-systemtap.patch b/dhcp/patches/dhcp-4.2.5-systemtap.patch
deleted file mode 100644
index ad774ad..0000000
--- a/dhcp/patches/dhcp-4.2.5-systemtap.patch
+++ /dev/null
@@ -1,822 +0,0 @@ 
-diff -up dhcp-4.2.5b1/configure.ac.systemtap dhcp-4.2.5b1/configure.ac
---- dhcp-4.2.5b1/configure.ac.systemtap	2012-12-17 16:56:40.563881316 +0100
-+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:56:40.597880870 +0100
-@@ -554,6 +554,35 @@ else
-     AC_MSG_RESULT(no)
- fi
- 
-+AC_MSG_CHECKING([whether to include systemtap tracing support])
-+AC_ARG_ENABLE([systemtap],
-+              [AS_HELP_STRING([--enable-systemtap],
-+                              [Enable inclusion of systemtap trace support])],
-+              [ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no'])
-+AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes])
-+AC_MSG_RESULT(${ENABLE_SYSTEMTAP})
-+
-+if test "x${ENABLE_SYSTEMTAP}" = xyes; then
-+  # Additional configuration for --enable-systemtap is HERE
-+  AC_CHECK_PROGS(DTRACE, dtrace)
-+  if test -z "$DTRACE"; then
-+    AC_MSG_ERROR([dtrace not found])
-+  fi
-+  AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
-+                [SDT_H_FOUND='no';
-+                   AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
-+  AC_DEFINE([HAVE_SYSTEMTAP], [1], [Define to 1 if using SystemTap probes.])
-+  AC_ARG_WITH([tapset-install-dir],
-+	      [AS_HELP_STRING([--with-tapset-install-dir], 
-+	         [The absolute path where the tapset dir will be installed])],
-+	      [if test "x${withval}" = x; then
-+		 ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"
-+	       else
-+		 ABS_TAPSET_DIR="${withval}"
-+	       fi], [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"])
-+  AC_SUBST(ABS_TAPSET_DIR)
-+fi
-+
- # Solaris needs some libraries for functions
- AC_SEARCH_LIBS(socket, [socket])
- AC_SEARCH_LIBS(inet_ntoa, [nsl])
-@@ -701,6 +730,7 @@ AC_OUTPUT([
-   tests/Makefile
-   server/tests/Makefile
-   doc/devel/doxyfile
-+  tapset/Makefile
- ])
- 
- sh util/bindvar.sh
-diff -up dhcp-4.2.5b1/Makefile.am.systemtap dhcp-4.2.5b1/Makefile.am
---- dhcp-4.2.5b1/Makefile.am.systemtap	2012-12-17 16:56:40.461882654 +0100
-+++ dhcp-4.2.5b1/Makefile.am	2012-12-17 16:56:40.597880870 +0100
-@@ -30,5 +30,8 @@ endif
- 
- SUBDIRS += includes tests common omapip client dhcpctl relay server
- 
-+SUBDIRS += tapset
-+#DIST_SUBDIRS = $(SUBDIRS)
-+
- nobase_include_HEADERS = dhcpctl/dhcpctl.h
- 
-diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
---- dhcp-4.2.5b1/server/dhcp.c.systemtap	2012-12-17 16:56:40.483882364 +0100
-+++ dhcp-4.2.5b1/server/dhcp.c	2012-12-17 16:56:40.599880842 +0100
-@@ -36,7 +36,7 @@
- #include <errno.h>
- #include <limits.h>
- #include <sys/time.h>
--
-+#include "trace.h"
- static void commit_leases_ackout(void *foo);
- static void maybe_return_agent_options(struct packet *packet,
- 				       struct option_state *options);
-@@ -275,6 +275,8 @@ void dhcpdiscover (packet, ms_nulltp)
- 	dhcp_failover_state_t *peer;
- #endif
- 
-+	TRACE(DHCPD_DISCOVER_START());
-+
- 	find_lease (&lease, packet, packet -> shared_network,
- 		    0, &peer_has_leases, (struct lease *)0, MDL);
- 
-@@ -399,6 +401,8 @@ void dhcpdiscover (packet, ms_nulltp)
-       out:
- 	if (lease)
- 		lease_dereference (&lease, MDL);
-+
-+	TRACE(DHCPD_DISCOVER_DONE());
- }
- 
- void dhcprequest (packet, ms_nulltp, ip_lease)
-@@ -421,6 +425,8 @@ void dhcprequest (packet, ms_nulltp, ip_
- #endif
- 	int have_requested_addr = 0;
- 
-+	TRACE(DHCPD_REQUEST_START());
-+
- 	oc = lookup_option (&dhcp_universe, packet -> options,
- 			    DHO_DHCP_REQUESTED_ADDRESS);
- 	memset (&data, 0, sizeof data);
-@@ -700,6 +706,9 @@ void dhcprequest (packet, ms_nulltp, ip_
- 		log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
- 
-       out:
-+
-+	TRACE(DHCPD_REQUEST_DONE());
-+
- 	if (subnet)
- 		subnet_dereference (&subnet, MDL);
- 	if (lease)
-@@ -718,6 +727,7 @@ void dhcprelease (packet, ms_nulltp)
- 	const char *s;
- 	char msgbuf [1024], cstr[16]; /* XXX */
- 
-+	TRACE(DHCPD_RELEASE_START());
- 
- 	/* DHCPRELEASE must not specify address in requested-address
- 	   option, but old protocol specs weren't explicit about this,
-@@ -842,6 +852,8 @@ void dhcprelease (packet, ms_nulltp)
- #endif
- 	if (lease)
- 		lease_dereference (&lease, MDL);
-+
-+	TRACE(DHCPD_RELEASE_DONE());
- }
- 
- void dhcpdecline (packet, ms_nulltp)
-@@ -859,6 +871,8 @@ void dhcpdecline (packet, ms_nulltp)
- 	struct option_cache *oc;
- 	struct data_string data;
- 
-+	TRACE(DHCPD_DECLINE_START());
-+
- 	/* DHCPDECLINE must specify address. */
- 	if (!(oc = lookup_option (&dhcp_universe, packet -> options,
- 				  DHO_DHCP_REQUESTED_ADDRESS)))
-@@ -970,6 +984,8 @@ void dhcpdecline (packet, ms_nulltp)
- 		option_state_dereference (&options, MDL);
- 	if (lease)
- 		lease_dereference (&lease, MDL);
-+
-+	TRACE(DHCPD_DECLINE_DONE());
- }
- 
- void dhcpinform (packet, ms_nulltp)
-@@ -993,6 +1009,8 @@ void dhcpinform (packet, ms_nulltp)
- 	struct interface_info *interface;
- 	int result;
- 
-+	TRACE(DHCPD_INFORM_START());
-+
- 	/* The client should set ciaddr to its IP address, but apparently
- 	   it's common for clients not to do this, so we'll use their IP
- 	   source address if they didn't set ciaddr. */
-@@ -1350,6 +1368,8 @@ void dhcpinform (packet, ms_nulltp)
- 
- 	if (subnet)
- 		subnet_dereference (&subnet, MDL);
-+
-+	TRACE(DHCPD_INFORM_DONE());
- }
- 
- void nak_lease (packet, cip)
-@@ -1366,6 +1386,8 @@ void nak_lease (packet, cip)
- 	struct option_state *options = (struct option_state *)0;
- 	struct option_cache *oc = (struct option_cache *)0;
- 
-+	TRACE(DHCPD_NAK_LEASE_START());
-+
- 	option_state_allocate (&options, MDL);
- 	memset (&outgoing, 0, sizeof outgoing);
- 	memset (&raw, 0, sizeof raw);
-@@ -1532,6 +1554,7 @@ void nak_lease (packet, cip)
-                            packet->interface->name);
-         }
- 
-+	TRACE(DHCPD_NAK_LEASE_DONE());
- }
- 
- void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
-@@ -1573,6 +1596,8 @@ void ack_lease (packet, lease, offer, wh
- 	if (lease -> state)
- 		return;
- 
-+	TRACE(DHCPD_ACK_LEASE_START());
-+
- 	/* Save original cltt for comparison later. */
- 	lease_cltt = lease->cltt;
- 
-@@ -2936,6 +2961,8 @@ void ack_lease (packet, lease, offer, wh
- #endif
- 			dhcp_reply(lease);
- 	}
-+
-+	TRACE(DHCPD_ACK_LEASE_DONE());
- }
- 
- /*
-@@ -3088,6 +3115,8 @@ void dhcp_reply (lease)
- 	if (!state)
- 		log_fatal ("dhcp_reply was supplied lease with no state!");
- 
-+	TRACE(DHCPD_REPLY_START());
-+
- 	/* Compose a response for the client... */
- 	memset (&raw, 0, sizeof raw);
- 	memset (&d1, 0, sizeof d1);
-@@ -3309,6 +3338,8 @@ void dhcp_reply (lease)
- 
- 	free_lease_state (state, MDL);
- 	lease -> state = (struct lease_state *)0;
-+
-+	TRACE(DHCPD_REPLY_DONE());
- }
- 
- int find_lease (struct lease **lp,
-@@ -3331,6 +3362,8 @@ int find_lease (struct lease **lp,
- 	struct data_string client_identifier;
- 	struct hardware h;
- 
-+	TRACE(DHCPD_FIND_LEASE_START());
-+
- #if defined(FAILOVER_PROTOCOL)
- 	/* Quick check to see if the peer has leases. */
- 	if (peer_has_leases) {
-@@ -4058,6 +4091,9 @@ int find_lease (struct lease **lp,
- #if defined (DEBUG_FIND_LEASE)
- 	log_info ("Not returning a lease.");
- #endif
-+
-+	TRACE(DHCPD_FIND_LEASE_DONE());
-+
- 	return 0;
- }
- 
-diff -up dhcp-4.2.5b1/server/dhcpd.c.systemtap dhcp-4.2.5b1/server/dhcpd.c
---- dhcp-4.2.5b1/server/dhcpd.c.systemtap	2012-12-17 16:56:40.578881119 +0100
-+++ dhcp-4.2.5b1/server/dhcpd.c	2012-12-17 16:56:40.599880842 +0100
-@@ -58,6 +58,8 @@ static const char url [] =
- #  undef group
- #endif /* PARANOIA */
- 
-+#include "trace.h"
-+
- #ifndef UNIT_TEST
- static void usage(void);
- #endif
-@@ -865,6 +867,7 @@ main(int argc, char **argv) {
- 	omapi_set_int_value ((omapi_object_t *)dhcp_control_object,
- 			     (omapi_object_t *)0, "state", server_running);
- 
-+        TRACE(DHCPD_MAIN());
- 	/* Receive packets and dispatch them... */
- 	dispatch ();
- 
-diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
---- dhcp-4.2.5b1/server/dhcpv6.c.systemtap	2012-12-17 16:56:40.571881210 +0100
-+++ dhcp-4.2.5b1/server/dhcpv6.c	2012-12-17 16:56:40.601880816 +0100
-@@ -15,6 +15,7 @@
-  */
- 
- #include "dhcpd.h"
-+#include "trace.h"
- 
- #ifdef DHCPv6
- 
-@@ -4212,6 +4213,8 @@ static void
- dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) {
- 	struct data_string client_id;
- 
-+	TRACE(DHCPD_6_SOLICIT_START());
-+
- 	/* 
- 	 * Validate our input.
- 	 */
-@@ -4225,6 +4228,8 @@ dhcpv6_solicit(struct data_string *reply
- 	 * Clean up.
- 	 */
- 	data_string_forget(&client_id, MDL);
-+
-+	TRACE(DHCPD_6_SOLICIT_DONE());
- }
- 
- /*
-@@ -4238,6 +4243,8 @@ dhcpv6_request(struct data_string *reply
- 	struct data_string client_id;
- 	struct data_string server_id;
- 
-+	TRACE(DHCPD_6_REQUEST_START());
-+
- 	/*
- 	 * Validate our input.
- 	 */
-@@ -4255,6 +4262,8 @@ dhcpv6_request(struct data_string *reply
- 	 */
- 	data_string_forget(&client_id, MDL);
- 	data_string_forget(&server_id, MDL);
-+
-+	TRACE(DHCPD_6_REQUEST_DONE());
- }
- 
- /* Find a DHCPv6 packet's shared network from hints in the packet.
-@@ -4367,6 +4376,8 @@ dhcpv6_confirm(struct data_string *reply
- 	struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data;
- 	int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options));
- 
-+	TRACE(DHCPD_6_CONFIRM_START());
-+
- 	/* 
- 	 * Basic client message validation.
- 	 */
-@@ -4553,6 +4564,8 @@ exit:
- 		option_state_dereference(&cli_enc_opt_state, MDL);
- 	if (opt_state != NULL)
- 		option_state_dereference(&opt_state, MDL);
-+
-+	TRACE(DHCPD_6_CONFIRM_DONE());
- }
- 
- /*
-@@ -4567,6 +4580,8 @@ dhcpv6_renew(struct data_string *reply,
- 	struct data_string client_id;
- 	struct data_string server_id;
- 
-+	TRACE(DHCPD_6_RENEW_START());
-+
- 	/* 
- 	 * Validate the request.
- 	 */
-@@ -4584,6 +4599,8 @@ dhcpv6_renew(struct data_string *reply,
- 	 */
- 	data_string_forget(&server_id, MDL);
- 	data_string_forget(&client_id, MDL);
-+
-+	TRACE(DHCPD_6_RENEW_DONE());
- }
- 
- /*
-@@ -4597,6 +4614,8 @@ static void
- dhcpv6_rebind(struct data_string *reply, struct packet *packet) {
- 	struct data_string client_id;
- 
-+	TRACE(DHCPD_6_REBIND_START());
-+
- 	if (!valid_client_msg(packet, &client_id)) {
- 		return;
- 	}
-@@ -4604,6 +4623,8 @@ dhcpv6_rebind(struct data_string *reply,
- 	lease_to_client(reply, packet, &client_id, NULL);
- 
- 	data_string_forget(&client_id, MDL);
-+
-+	TRACE(DHCPD_6_REBIND_DONE());
- }
- 
- static void
-@@ -5048,6 +5069,8 @@ dhcpv6_decline(struct data_string *reply
- 	struct data_string client_id;
- 	struct data_string server_id;
- 
-+	TRACE(DHCPD_6_DECLINE_START());
-+
- 	/* 
- 	 * Validate our input.
- 	 */
-@@ -5068,6 +5091,8 @@ dhcpv6_decline(struct data_string *reply
- 
- 	data_string_forget(&server_id, MDL);
- 	data_string_forget(&client_id, MDL);
-+
-+	TRACE(DHCPD_6_DECLINE_DONE());
- }
- 
- static void
-@@ -5516,6 +5541,8 @@ dhcpv6_release(struct data_string *reply
- 	struct data_string client_id;
- 	struct data_string server_id;
- 
-+	TRACE(DHCPD_6_RELEASE_START());
-+
- 	/* 
- 	 * Validate our input.
- 	 */
-@@ -5537,6 +5564,8 @@ dhcpv6_release(struct data_string *reply
- 
- 	data_string_forget(&server_id, MDL);
- 	data_string_forget(&client_id, MDL);
-+
-+	TRACE(DHCPD_6_RELEASE_DONE());
- }
- 
- /*
-@@ -5549,6 +5578,8 @@ dhcpv6_information_request(struct data_s
- 	struct data_string client_id;
- 	struct data_string server_id;
- 
-+	TRACE(DHCPD_6_INFORMATION_REQUEST_START());
-+
- 	/*
- 	 * Validate our input.
- 	 */
-@@ -5580,6 +5611,8 @@ dhcpv6_information_request(struct data_s
- 		data_string_forget(&client_id, MDL);
- 	}
- 	data_string_forget(&server_id, MDL);
-+
-+	TRACE(DHCPD_6_INFORMATION_REQUEST_DONE());
- }
- 
- /* 
-@@ -5608,6 +5641,8 @@ dhcpv6_relay_forw(struct data_string *re
- 	struct dhcpv6_relay_packet *reply;
- 	int reply_ofs;
- 
-+	TRACE(DHCPD_6_RELAY_FORW_START());
-+
- 	/* 
- 	 * Initialize variables for early exit.
- 	 */
-@@ -5867,6 +5902,8 @@ exit:
- 	if (enc_packet != NULL) {
- 		packet_dereference(&enc_packet, MDL);
- 	}
-+
-+	TRACE(DHCPD_6_RELAY_FORW_DONE());
- }
- 
- static void
-diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-4.2.5b1/server/failover.c
---- dhcp-4.2.5b1/server/failover.c.systemtap	2012-12-05 02:17:39.000000000 +0100
-+++ dhcp-4.2.5b1/server/failover.c	2012-12-17 16:56:40.603880790 +0100
-@@ -36,6 +36,8 @@
- #include "dhcpd.h"
- #include <omapip/omapip_p.h>
- 
-+#include "trace.h"
-+
- #if defined (FAILOVER_PROTOCOL)
- dhcp_failover_state_t *failover_states;
- static isc_result_t do_a_failover_option (omapi_object_t *,
-@@ -1712,6 +1714,8 @@ isc_result_t dhcp_failover_set_state (dh
-     struct lease *l;
-     struct timeval tv;
- 
-+    TRACE(DHCPD_FAILOVER_SET_STATE_START(state->me.state, new_state));
-+
-     /* If we're in certain states where we're sending updates, and the peer
-      * state changes, we need to re-schedule any pending updates just to
-      * be on the safe side.  This results in retransmission.
-@@ -1939,6 +1943,8 @@ isc_result_t dhcp_failover_set_state (dh
- 	    break;
-     }
- 
-+    TRACE(DHCPD_FAILOVER_SET_STATE_DONE());
-+
-     return ISC_R_SUCCESS;
- }
- 
-@@ -2422,6 +2428,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
- 	if (state -> me.state != normal)
- 		return 0;
- 
-+	TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_START());
-+
- 	state->last_balance = cur_time;
- 
- 	for (s = shared_networks ; s ; s = s->next) {
-@@ -2582,6 +2590,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
- 	if (leases_queued)
- 		commit_leases();
- 
-+	TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_DONE());
-+
- 	return leases_queued;
- }
- 
-diff -up dhcp-4.2.5b1/server/Makefile.am.systemtap dhcp-4.2.5b1/server/Makefile.am
---- dhcp-4.2.5b1/server/Makefile.am.systemtap	2012-12-17 16:56:40.563881316 +0100
-+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:56:40.603880790 +0100
-@@ -10,7 +10,7 @@ dist_sysconf_DATA = dhcpd.conf.example
- sbin_PROGRAMS = dhcpd
- dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
- 		omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
--		dhcpv6.c mdb6.c ldap.c ldap_casa.c
-+		dhcpv6.c mdb6.c ldap.c ldap_casa.c probes.d trace.h
- 
- dhcpd_CFLAGS = $(LDAP_CFLAGS)
- dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
-@@ -19,3 +19,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
- man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
- EXTRA_DIST = $(man_MANS)
- 
-+if ENABLE_SYSTEMTAP
-+BUILT_SOURCES = probes.h
-+probes.h: probes.d
-+	$(DTRACE) -C -h -s $< -o $@
-+
-+probes.o: probes.d
-+	$(DTRACE) -C -G -s $< -o $@
-+
-+dhcpd_LDADD += probes.o
-+endif
-diff -up dhcp-4.2.5b1/server/probes.d.systemtap dhcp-4.2.5b1/server/probes.d
---- dhcp-4.2.5b1/server/probes.d.systemtap	2012-12-17 16:56:40.603880790 +0100
-+++ dhcp-4.2.5b1/server/probes.d	2012-12-17 16:56:40.603880790 +0100
-@@ -0,0 +1,43 @@
-+provider dhcpd {
-+	 probe main();
-+	 probe discover_start()
-+	 probe discover_done()
-+	 probe request_start()
-+	 probe request_done()
-+	 probe release_start()
-+	 probe release_done()
-+	 probe decline_start()
-+	 probe decline_done()
-+	 probe inform_start()
-+	 probe inform_done()
-+	 probe nak_lease_start()
-+	 probe nak_lease_done()
-+	 probe ack_lease_start()
-+	 probe ack_lease_done()
-+	 probe reply_start()
-+	 probe reply_done()
-+	 probe find_lease_start()
-+	 probe find_lease_done()
-+	 probe 6_solicit_start()
-+	 probe 6_solicit_done()
-+	 probe 6_request_start()
-+	 probe 6_request_done()
-+	 probe 6_confirm_start()
-+	 probe 6_confirm_done()
-+	 probe 6_renew_start()
-+	 probe 6_renew_done()
-+	 probe 6_rebind_start()
-+	 probe 6_rebind_done()
-+	 probe 6_decline_start()
-+	 probe 6_decline_done()
-+	 probe 6_release_start()
-+	 probe 6_release_done()
-+	 probe 6_information_request_start()
-+	 probe 6_information_request_done()
-+	 probe 6_relay_forw_start()
-+	 probe 6_relay_forw_done()
-+	 probe failover_pool_dobalance_start()
-+	 probe failover_pool_dobalance_done()
-+	 probe failover_set_state_start(int, int) /* state, new_state */
-+	 probe failover_set_state_done()
-+};
-diff -up dhcp-4.2.5b1/server/tests/Makefile.am.systemtap dhcp-4.2.5b1/server/tests/Makefile.am
---- dhcp-4.2.5b1/server/tests/Makefile.am.systemtap	2012-12-17 16:56:40.564881302 +0100
-+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17 16:56:57.505650518 +0100
-@@ -20,6 +20,10 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
- DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la    \
-           $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-export
- 
-+if ENABLE_SYSTEMTAP
-+DHCPLIBS += ../probes.o
-+endif
-+
- ATF_TESTS =
- TESTS = 
- if HAVE_ATF
-diff -up dhcp-4.2.5b1/server/trace.h.systemtap dhcp-4.2.5b1/server/trace.h
---- dhcp-4.2.5b1/server/trace.h.systemtap	2012-12-17 16:56:40.604880777 +0100
-+++ dhcp-4.2.5b1/server/trace.h	2012-12-17 16:56:40.604880777 +0100
-@@ -0,0 +1,11 @@
-+// trace.h
-+
-+#include "config.h"
-+#ifdef HAVE_SYSTEMTAP
-+// include the generated probes header and put markers in code
-+#include "probes.h"
-+#define TRACE(probe) probe
-+#else
-+// Wrap the probe to allow it to be removed when no systemtap available
-+#define TRACE(probe)
-+#endif
-diff -up dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap dhcp-4.2.5b1/tapset/dhcpd.stp
---- dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap	2012-12-17 16:56:40.604880777 +0100
-+++ dhcp-4.2.5b1/tapset/dhcpd.stp	2012-12-17 16:56:40.604880777 +0100
-@@ -0,0 +1,212 @@
-+/* dhcpd tapset
-+   Copyright (C) 2011, Red Hat Inc.
-+ */
-+
-+probe dhcpd_main = process("dhcpd").mark("main")
-+{
-+  probestr = sprintf("%s(locals: %s)", $$name, $$locals);
-+  
-+}
-+
-+probe dhcpd_discover_start = process("dhcpd").mark("discover_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_discover_done = process("dhcpd").mark("discover_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_request_start = process("dhcpd").mark("request_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_request_done = process("dhcpd").mark("request_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_release_start = process("dhcpd").mark("release_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_release_done = process("dhcpd").mark("release_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_decline_start = process("dhcpd").mark("decline_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_decline_done = process("dhcpd").mark("decline_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_inform_start = process("dhcpd").mark("inform_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_inform_done = process("dhcpd").mark("inform_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_nak_lease_start = process("dhcpd").mark("nak_lease_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_nak_lease_done = process("dhcpd").mark("nak_lease_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_ack_lease_start = process("dhcpd").mark("ack_lease_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_ack_lease_done = process("dhcpd").mark("ack_lease_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_reply_start = process("dhcpd").mark("reply_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_reply_done = process("dhcpd").mark("reply_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_find_lease_start = process("dhcpd").mark("find_lease_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_find_lease_done = process("dhcpd").mark("find_lease_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_solicit_start = process("dhcpd").mark("6_solicit_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_solicit_done = process("dhcpd").mark("6_solicit_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_request_start = process("dhcpd").mark("6_request_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_request_done = process("dhcpd").mark("6_request_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_confirm_start = process("dhcpd").mark("6_confirm_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_confirm_done = process("dhcpd").mark("6_confirm_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_renew_start = process("dhcpd").mark("6_renew_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_renew_done = process("dhcpd").mark("6_renew_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_rebind_start = process("dhcpd").mark("6_rebind_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_rebind_done = process("dhcpd").mark("6_rebind_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_decline_start = process("dhcpd").mark("6_decline_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_decline_done = process("dhcpd").mark("6_decline_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_release_start = process("dhcpd").mark("6_release_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_release_done = process("dhcpd").mark("6_release_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_information_request_start = process("dhcpd").mark("6_information_request_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_information_request_done = process("dhcpd").mark("6_information_request_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_relay_forw_start = process("dhcpd").mark("6_relay_forw_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_6_relay_forw_done = process("dhcpd").mark("6_relay_forw_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_failover_pool_dobalance_start = process("dhcpd").mark("failover_pool_dobalance_start")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+probe dhcpd_failover_pool_dobalance_done = process("dhcpd").mark("failover_pool_dobalance_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-+
-+
-+probe dhcpd_failover_set_state_start = process("dhcpd").mark("failover_set_state_start")
-+{
-+  state = $arg1;
-+  new_state = $arg2;
-+  probestr = sprintf("%s(state=%d, new_state=%d)", $$name, state, new_state);
-+}
-+
-+probe dhcpd_failover_set_state_done = process("dhcpd").mark("failover_set_state_done")
-+{
-+  probestr = sprintf("%s", $$name);
-+}
-diff -up dhcp-4.2.5b1/tapset/Makefile.am.systemtap dhcp-4.2.5b1/tapset/Makefile.am
---- dhcp-4.2.5b1/tapset/Makefile.am.systemtap	2012-12-17 16:56:40.604880777 +0100
-+++ dhcp-4.2.5b1/tapset/Makefile.am	2012-12-17 16:56:40.604880777 +0100
-@@ -0,0 +1,26 @@
-+# Makefile.am for dhcp/tapset
-+# Jiri Popelka
-+
-+.PHONY: clean-local install-data-hook uninstall-local
-+
-+#
-+EXTRA_DIST = dhcpd.stp
-+TAPSET_FILES = $(EXTRA_DIST)
-+TAPSET_INSTALL_DIR = $(DESTDIR)@ABS_TAPSET_DIR@
-+
-+if ENABLE_SYSTEMTAP
-+all-local: $(TAPSET_FILES)
-+
-+clean-local:
-+
-+install-data-hook:
-+	$(MKDIR_P) $(TAPSET_INSTALL_DIR)
-+	$(INSTALL_DATA) $(TAPSET_FILES) $(TAPSET_INSTALL_DIR)
-+
-+uninstall-local:
-+	@list='$(TAPSET_FILES)'; for p in $$list; do \
-+	  echo " rm -f '$(TAPSET_INSTALL_DIR)/$$p'"; \
-+	  rm -f "$(TAPSET_INSTALL_DIR)/$$p"; \
-+	done
-+endif
-+
diff --git a/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch b/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
deleted file mode 100644
index 73f1f55..0000000
--- a/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
+++ /dev/null
@@ -1,23 +0,0 @@ 
-diff -up dhcp-4.2.5b1/configure.ac.pkgconfig dhcp-4.2.5b1/configure.ac
---- dhcp-4.2.5b1/configure.ac.pkgconfig	2012-12-05 02:18:44.000000000 +0100
-+++ dhcp-4.2.5b1/configure.ac	2012-12-17 15:45:33.769128387 +0100
-@@ -194,6 +194,9 @@ if test "$atf_path" != "no" ; then
-         if test -f $atf_path/lib/pkgconfig/atf-c.pc ; then
-             atf_pcp=$atf_path/lib/pkgconfig
-         fi
-+        if test -f $atf_path/lib64/pkgconfig/atf-c.pc ; then
-+            atf_pcp=$atf_path/lib64/pkgconfig
-+        fi
-     else
-         # Not specified, try some common paths
-         atf_dirs="/usr /usr/local /usr/pkg /opt /opt/local"
-@@ -202,6 +205,9 @@ if test "$atf_path" != "no" ; then
-             if test -f $d/lib/pkgconfig/atf-c.pc ; then
-                 atf_pcp=$d/lib/pkgconfig
-             fi
-+            if test -f $d/lib64/pkgconfig/atf-c.pc ; then
-+                atf_pcp=$d/lib64/pkgconfig
-+            fi
-         done
-     fi
-     if test "$atf_pcp" = "" ; then

Comments

Michael Tremer Feb. 25, 2017, 3:24 p.m.
This depends on the bind update.

Please note that in the comment of the patch in the future.

Couldn't build it, so please submit again after the bind update has been
applied.

Best,
-Michael

On Thu, 2017-02-23 at 12:54 +0100, Stefan Schantl wrote:
> This is an update to the latest available version of the isc-dhcp.
> 
> Also rework the patch handling.
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
>  dhcp/dhcp.nm                                       |  81 +-
>  dhcp/patches/0001-dhcp-remove-bind.patch           | 261 +++++++
>  dhcp/patches/0002-dhcp-sharedlib.patch             | 140 ++++
>  dhcp/patches/0003-dhcp-errwarn-message.patch       |  64 ++
>  ...ions.patch => 0004-dhcp-dhclient-options.patch} | 254 +++----
>  ...-ifup.patch => 0005-dhcp-release-by-ifup.patch} |  10 +-
>  ...ch => 0006-dhcp-dhclient-decline-backoff.patch} |  38 +-
>  ...t-bootp.patch => 0007-dhcp-unicast-bootp.patch} |  30 +-
>  ...h => 0008-dhcp-default-requested-options.patch} |  14 +-
>  ...2.5-manpages.patch => 0009-dhcp-manpages.patch} |  61 +-
>  ...hcp-4.2.4-paths.patch => 0010-dhcp-paths.patch} |  16 +-
>  ...4.2.2-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch} | 178 +++--
>  dhcp/patches/0012-dhcp-garbage-chars.patch         |  12 +
>  dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch |  14 +
>  ...se.patch => 0014-dhcp-64_bit_lease_parse.patch} |  43 +-
>  ...capability.patch => 0015-dhcp-capability.patch} | 100 +--
>  ...ndDecline.patch => 0016-dhcp-sendDecline.patch} |  26 +-
>  ...017-dhcp-rfc3442-classless-static-routes.patch} | 110 +--
>  ...expired.patch => 0018-dhcp-honor-expired.patch} |  10 +-
>  .../{dhcp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch}  | 116 +--
>  ...p-4.2.5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} | 247 ++++---
>  dhcp/patches/0021-dhcp-IPoIB-log-id.patch          | 165 +++++
>  ...oved-xid.patch => 0022-dhcp-improved-xid.patch} |  74 +-
>  dhcp/patches/0023-dhcp-duidv4.patch                |  34 +
>  dhcp/patches/0024-dhcp-duid_uuid.patch             | 111 +++
>  ...getifaddrs.patch => 0025-dhcp-getifaddrs.patch} |  50 +-
>  ...26-dhcp-client-request-release-bind-iface.patch |  61 ++
>  ...-P1-interval.patch => 0027-dhcp-interval.patch} |   8 +-
>  dhcp/patches/0028-dhcp-no-subnet-error2info.patch  |  48 ++
>  dhcp/patches/0029-dhcp-sd_notify.patch             |  79 ++
>  .../patches/0030-dhcp-option97-pxe-client-id.patch | 217 ++++++
>  dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch    |  13 +
>  dhcp/patches/0032-dhcp-dhclient-preinit6s.patch    |  64 ++
>  .../patches/dhcp-4.2.0-add_timeout_when_NULL.patch |  14 -
>  dhcp/patches/dhcp-4.2.0-errwarn-message.patch      |  30 -
>  dhcp/patches/dhcp-4.2.0-garbage-chars.patch        |  12 -
>  dhcp/patches/dhcp-4.2.0-logpid.patch               |  12 -
>  dhcp/patches/dhcp-4.2.1-retransmission.patch       |  48 --
>  dhcp/patches/dhcp-4.2.2-gpxe-cid.patch             |  83 ---
>  dhcp/patches/dhcp-4.2.2-xen-checksum.patch         | 249 -------
>  dhcp/patches/dhcp-4.2.3-P2-log_perror.patch        |  11 -
>  .../dhcp-4.2.3-dhclient-decline-onetry.patch       |  27 -
>  dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch        |  46 --
>  .../dhcp-4.2.4-P2-conflex-do-forward-updates.patch |  12 -
>  dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch          |  13 -
>  dhcp/patches/dhcp-4.2.4-UseMulticast.patch         | 239 ------
>  dhcp/patches/dhcp-4.2.4-failOverPeer.patch         |  12 -
>  dhcp/patches/dhcp-4.2.4-send_release.patch         |  23 -
>  dhcp/patches/dhcp-4.2.5-next-server.patch          |  72 --
>  dhcp/patches/dhcp-4.2.5-paranoia.patch             | 202 -----
>  dhcp/patches/dhcp-4.2.5-range6.patch               |  42 --
>  dhcp/patches/dhcp-4.2.5-remove-bind.patch          | 164 ----
>  ...5-rfc5970-dhcpv6-options-for-network-boot.patch |  89 ---
>  dhcp/patches/dhcp-4.2.5-sharedlib.patch            | 120 ---
>  dhcp/patches/dhcp-4.2.5-systemtap.patch            | 822 --------------------
> -
>  dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch      |  23 -
>  56 files changed, 2014 insertions(+), 3100 deletions(-)
>  create mode 100644 dhcp/patches/0001-dhcp-remove-bind.patch
>  create mode 100644 dhcp/patches/0002-dhcp-sharedlib.patch
>  create mode 100644 dhcp/patches/0003-dhcp-errwarn-message.patch
>  rename dhcp/patches/{dhcp-4.2.4-dhclient-options.patch => 0004-dhcp-dhclient-
> options.patch} (72%)
>  rename dhcp/patches/{dhcp-4.2.0-release-by-ifup.patch => 0005-dhcp-release-
> by-ifup.patch} (88%)
>  rename dhcp/patches/{dhcp-4.2.0-dhclient-decline-backoff.patch => 0006-dhcp-
> dhclient-decline-backoff.patch} (56%)
>  rename dhcp/patches/{dhcp-4.2.4-unicast-bootp.patch => 0007-dhcp-unicast-
> bootp.patch} (72%)
>  rename dhcp/patches/{dhcp-4.2.0-default-requested-options.patch => 0008-dhcp-
> default-requested-options.patch} (76%)
>  rename dhcp/patches/{dhcp-4.2.5-manpages.patch => 0009-dhcp-manpages.patch}
> (70%)
>  rename dhcp/patches/{dhcp-4.2.4-paths.patch => 0010-dhcp-paths.patch} (57%)
>  rename dhcp/patches/{dhcp-4.2.2-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch}
> (63%)
>  create mode 100644 dhcp/patches/0012-dhcp-garbage-chars.patch
>  create mode 100644 dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
>  rename dhcp/patches/{dhcp-4.2.4-64_bit_lease_parse.patch => 0014-dhcp-
> 64_bit_lease_parse.patch} (51%)
>  rename dhcp/patches/{dhcp-4.2.2-capability.patch => 0015-dhcp-
> capability.patch} (64%)
>  rename dhcp/patches/{dhcp-4.2.5-sendDecline.patch => 0016-dhcp-
> sendDecline.patch} (88%)
>  rename dhcp/patches/{dhcp-4.2.5-rfc3442-classless-static-routes.patch =>
> 0017-dhcp-rfc3442-classless-static-routes.patch} (76%)
>  rename dhcp/patches/{dhcp-4.2.0-honor-expired.patch => 0018-dhcp-honor-
> expired.patch} (77%)
>  rename dhcp/patches/{dhcp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch} (62%)
>  rename dhcp/patches/{dhcp-4.2.5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} (70%)
>  create mode 100644 dhcp/patches/0021-dhcp-IPoIB-log-id.patch
>  rename dhcp/patches/{dhcp-4.2.4-improved-xid.patch => 0022-dhcp-improved-
> xid.patch} (71%)
>  create mode 100644 dhcp/patches/0023-dhcp-duidv4.patch
>  create mode 100644 dhcp/patches/0024-dhcp-duid_uuid.patch
>  rename dhcp/patches/{dhcp-4.2.4-getifaddrs.patch => 0025-dhcp-
> getifaddrs.patch} (89%)
>  create mode 100644 dhcp/patches/0026-dhcp-client-request-release-bind-
> iface.patch
>  rename dhcp/patches/{dhcp-4.2.4-P1-interval.patch => 0027-dhcp-
> interval.patch} (72%)
>  create mode 100644 dhcp/patches/0028-dhcp-no-subnet-error2info.patch
>  create mode 100644 dhcp/patches/0029-dhcp-sd_notify.patch
>  create mode 100644 dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
>  create mode 100644 dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
>  create mode 100644 dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.0-errwarn-message.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.0-garbage-chars.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.0-logpid.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.1-retransmission.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.2-gpxe-cid.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.2-xen-checksum.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.3-P2-log_perror.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-
> updates.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-UseMulticast.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-failOverPeer.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.4-send_release.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-next-server.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-paranoia.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-range6.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-remove-bind.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-
> network-boot.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-sharedlib.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5-systemtap.patch
>  delete mode 100644 dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
> 
> diff --git a/dhcp/dhcp.nm b/dhcp/dhcp.nm
> index 4cee3bd..eafb0b0 100644
> --- a/dhcp/dhcp.nm
> +++ b/dhcp/dhcp.nm
> @@ -4,8 +4,8 @@
>  #############################################################################
> ##
>  
>  name       = dhcp
> -version    = 4.2.5
> -release    = 3
> +version    = 4.3.5b1
> +release    = 1
>  
>  groups     = Networking/Daemons
>  url        = http://isc.org/products/DHCP/
> @@ -22,61 +22,17 @@ end
>  
>  source_dl  = ftp://ftp.isc.org/isc/dhcp/%{version}/
>  
> -# Apply patches in a special order.
> -patches = \
> -	dhcp-4.2.5-remove-bind.patch \
> -	dhcp-4.2.4-P1-remove-dst.patch \
> -	dhcp-4.2.0-errwarn-message.patch \
> -	dhcp-4.2.4-dhclient-options.patch \
> -	dhcp-4.2.0-release-by-ifup.patch \
> -	dhcp-4.2.0-dhclient-decline-backoff.patch \
> -	dhcp-4.2.4-unicast-bootp.patch \
> -	dhcp-4.2.0-default-requested-options.patch \
> -	dhcp-4.2.2-xen-checksum.patch \
> -	dhcp-4.2.5-manpages.patch \
> -	dhcp-4.2.4-paths.patch \
> -	dhcp-4.2.2-CLOEXEC.patch \
> -	dhcp-4.2.0-garbage-chars.patch \
> -	dhcp-4.2.0-add_timeout_when_NULL.patch \
> -	dhcp-4.2.4-64_bit_lease_parse.patch \
> -	dhcp-4.2.2-capability.patch \
> -	dhcp-4.2.0-logpid.patch \
> -	dhcp-4.2.4-UseMulticast.patch \
> -	dhcp-4.2.5-sendDecline.patch \
> -	dhcp-4.2.1-retransmission.patch \
> -	dhcp-4.2.5-rfc3442-classless-static-routes.patch \
> -	dhcp-4.2.0-honor-expired.patch \
> -	dhcp-4.2.5-sharedlib.patch \
> -	dhcp-4.2.5-PPP.patch \
> -	dhcp-4.2.5-paranoia.patch \
> -	dhcp-4.2.5-lpf-ib.patch \
> -	dhcp-4.2.4-improved-xid.patch \
> -	dhcp-4.2.2-gpxe-cid.patch \
> -	dhcp-4.2.5-systemtap.patch \
> -	dhcp-4.2.3-dhclient-decline-onetry.patch \
> -	dhcp-4.2.3-P2-log_perror.patch \
> -	dhcp-4.2.4-getifaddrs.patch \
> -	dhcp-4.2.4-send_release.patch \
> -	dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch \
> -	dhcp-4.2.4-failOverPeer.patch \
> -	dhcp-4.2.5b1-atf-pkgconfig.patch \
> -	dhcp-4.2.4-P1-interval.patch \
> -	dhcp-4.2.4-P2-conflex-do-forward-updates.patch \
> -	dhcp-4.2.4-P2-dupl-key.patch \
> -	dhcp-4.2.5-range6.patch \
> -	dhcp-4.2.5-next-server.patch
> -
>  build
>  	requires
>  		autoconf
>  		automake
> -		bind-devel>=9
> +		bind-devel>=9.9.9-P6
>  		bind-devel<10
>  		groff
>  		libtool
>  		openldap-devel
>  		libcap-ng-devel
> -		systemd-units
> +		systemd-devel
>  	end
>  
>  	CFLAGS += -fno-strict-aliasing
> @@ -98,18 +54,37 @@ build
>  		--with-libbind-libs=/usr/lib/ \
>  		--disable-static \
>  		--enable-paranoia \
> -		--enable-early-chroot
> +		--enable-early-chroot \
> +		--enable-binary-leases \
> +		--with-systemd
>  
>  	prepare_cmds
>  		# Remove bundled BIND source
>  		rm -rvf %{DIR_APP}/bind/bind.tar.gz
>  
> -		# Remove dst.
> -		rm -rvf dst includes/isc-dhcp
> -
>  		# Regenerate build environment
> -		#libtoolize --copy --force
>  		autoreconf --verbose --force --install
> +
> +		# Change DHCLIENT_DEFAULT_PREFIX_LEN  64 -> 128
> +		sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN
> 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' \
> +			includes/site.h
> +
> +		# Update PATH in all manpages
> +		for page in client/dhclient.conf.5 client/dhclient.leases.5 \
> +			client/dhclient-script.8 client/dhclient.8 ; do
> +
> +			sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
> +				-e 's|RUNDIR|/run|g' \
> +				-e 's|DBDIR|%{localstatedir}/lib/dhclient|g'
> \
> +				-e 's|ETCDIR|%{dhcpconfdir}|g' $page
> +		done
> +
> +		for page in server/dhcpd.conf.5 server/dhcpd.leases.5
> server/dhcpd.8 ; do
> +			sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
> +				-e 's|RUNDIR|/run|g' \
> +				-e 's|DBDIR|%{localstatedir}/lib/dhcpd|g' \
> +				-e 's|ETCDIR|%{dhcpconfdir}|g' $page
> +		done
>  	end
>  
>  	install_cmds
> diff --git a/dhcp/patches/0001-dhcp-remove-bind.patch b/dhcp/patches/0001-
> dhcp-remove-bind.patch
> new file mode 100644
> index 0000000..46bd323
> --- /dev/null
> +++ b/dhcp/patches/0001-dhcp-remove-bind.patch
> @@ -0,0 +1,261 @@
> +diff -up dhcp-4.3.5b1/client/Makefile.am.remove-bind dhcp-
> 4.3.5b1/client/Makefile.am
> +--- dhcp-4.3.5b1/client/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/client/Makefile.am	2016-09-12 17:00:22.797902248
> +0200
> +@@ -4,8 +4,6 @@
> + # production code. Sadly, we are not there yet.
> + SUBDIRS = . tests
> + 
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + AM_CPPFLAGS =
> -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
> + 	      -DLOCALSTATEDIR='"$(localstatedir)"'
> + 
> +@@ -15,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
> + 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos
> \
> + 		   scripts/netbsd scripts/nextstep scripts/openbsd \
> + 		   scripts/solaris scripts/openwrt
> +-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a
> $(BINDLIBDIR)/libirs.a \
> +-		 $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a
> $(BINDLIBDIR)/libisc.a
> ++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> ++		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
> + EXTRA_DIST = $(man_MANS)
> +diff -up dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind dhcp-
> 4.3.5b1/common/tests/Makefile.am
> +--- dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/common/tests/Makefile.am	2016-09-12
> 17:07:42.168232452 +0200
> +@@ -1,7 +1,5 @@
> + SUBDIRS = .
> + 
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
> + 
> + EXTRA_DIST = Atffile
> +@@ -15,26 +13,26 @@ ATF_TESTS += alloc_unittest dns_unittest
> + alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
> + alloc_unittest_LDADD = $(ATF_LDFLAGS)
> + alloc_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
> +-	$(BINDLIBDIR)/libdns.a
> $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
> ++	../../omapip/libomapi.a \
> ++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
> + dns_unittest_LDADD = $(ATF_LDFLAGS)
> + dns_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
> +-	$(BINDLIBDIR)/libdns.a
> $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
> ++	../../omapip/libomapi.a \
> ++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
> + misc_unittest_LDADD = $(ATF_LDFLAGS)
> + misc_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
> +-	$(BINDLIBDIR)/libdns.a
> $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
> ++	../../omapip/libomapi.a \
> ++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
> + ns_name_unittest_LDADD = $(ATF_LDFLAGS)
> + ns_name_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
> +-	$(BINDLIBDIR)/libdns.a
> $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
> ++	../../omapip/libomapi.a \
> ++	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + check: $(ATF_TESTS)
> + 	@if test $(top_srcdir) != ${top_builddir}; then \
> +diff -up dhcp-4.3.5b1/configure.ac.remove-bind dhcp-4.3.5b1/configure.ac
> +--- dhcp-4.3.5b1/configure.ac.remove-bind	2016-08-26
> 20:24:41.000000000 +0200
> ++++ dhcp-4.3.5b1/configure.ac	2016-09-12 17:00:22.798902249 +0200
> +@@ -682,20 +682,33 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
> + BINDDIR=
> + BINDSRCDIR=
> + AC_ARG_WITH(libbind,
> +-	AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries
> are in PATH
> +-		        (default is ./bind)]),
> ++	AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH
> ++		        (default is ./bind/includes)]),
> + 	use_libbind="$withval", use_libbind="no")
> + case "$use_libbind" in
> ++yes|no)
> ++	libbind="\${top_srcdir}/bind/include"
> ++	;;
> ++*)
> ++	libbind="$use_libbind"
> ++	;;
> ++esac
> ++
> ++BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
> ++AC_ARG_WITH(libbind-libs,
> ++	AC_HELP_STRING([--with-libbind-libs=PATH],
> ++		       [bind9 export libraries are in PATH]),
> ++		       [libbind_libs="$withval"], [libbind_libs='no'])
> ++case "$libbind_libs" in
> + yes)
> +-	BINDDIR="\${top_srcdir}/bind"
> +-	BINDSRCDIR="\${top_srcdir}/bind"
> ++	AC_MSG_ERROR([Specify path to bind9 libraries])
> + 	;;
> + no)
> +-	BINDDIR="\${top_srcdir}/bind"
> +-	BINDSRCDIR="\${top_srcdir}/bind"
> ++	BUNDLED_BIND=yes
> + 	;;
> + *)
> +-	BINDDIR="$use_libbind"
> ++	BIND9_LIBDIR="-L$libbind_libs"
> ++	BUNDLED_BIND=no
> + 	if test ! -d "$srcdir/bind"; then
> + 		# no bind directory, create it with a fake Makefile.in
> + 		# (AC_CONFIG_FILES and top Makefile refer to it so
> +@@ -709,8 +722,8 @@ EOF
> + 	fi
> + 	;;
> + esac
> +-AC_SUBST(BINDDIR)
> +-AC_SUBST(BINDSRCDIR)
> ++AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
> ++AC_SUBST([BIND9_LIBDIR])
> + 
> + # OpenLDAP support.
> + AC_ARG_WITH(ldap,
> +@@ -788,7 +801,7 @@ fi
> + CFLAGS="$CFLAGS $STD_CWARNINGS"
> + 
> + # Try to add the bind and dhcp include directories
> +-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
> ++CFLAGS="$CFLAGS -I$libbind"
> + 
> + case "$host" in
> + *-darwin*)
> +diff -up dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind dhcp-
> 4.3.5b1/dhcpctl/Makefile.am
> +--- dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/dhcpctl/Makefile.am	2016-09-12 17:00:22.798902249
> +0200
> +@@ -1,5 +1,3 @@
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + bin_PROGRAMS = omshell
> + lib_LIBRARIES = libdhcpctl.a
> + noinst_PROGRAMS = cltest
> +@@ -8,12 +6,10 @@ EXTRA_DIST = $(man_MANS)
> + 
> + omshell_SOURCES = omshell.c
> + omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> +-	        $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
> +-	        $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
> ++	        $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + 
> + libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
> + 
> + cltest_SOURCES = cltest.c
> + cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> +-	       $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
> +-               $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
> ++	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> +diff -up dhcp-4.3.5b1/Makefile.am.remove-bind dhcp-4.3.5b1/Makefile.am
> +--- dhcp-4.3.5b1/Makefile.am.remove-bind	2016-08-26 20:19:53.000000000
> +0200
> ++++ dhcp-4.3.5b1/Makefile.am	2016-09-12 17:00:22.798902249 +0200
> +@@ -26,7 +26,13 @@ EXTRA_DIST = RELNOTES LICENSE \
> + 	     bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
> + 	     common/tests/Atffile server/tests/Atffile
> + 
> +-SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay
> server
> ++if BUNDLED_BIND
> ++SUBDIRS = bind
> ++else
> ++SUBDIRS = 
> ++endif
> ++
> ++SUBDIRS += includes tests common omapip client dhcpctl relay server
> + 
> + nobase_include_HEADERS = dhcpctl/dhcpctl.h
> + 
> +diff -up dhcp-4.3.5b1/omapip/Makefile.am.remove-bind dhcp-
> 4.3.5b1/omapip/Makefile.am
> +--- dhcp-4.3.5b1/omapip/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/omapip/Makefile.am	2016-09-12 17:00:22.798902249
> +0200
> +@@ -1,5 +1,3 @@
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + lib_LIBRARIES = libomapi.a
> + noinst_PROGRAMS = svtest
> + 
> +@@ -12,6 +10,6 @@ man_MANS = omapi.3
> + EXTRA_DIST = $(man_MANS)
> + 
> + svtest_SOURCES = test.c
> +-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
> +-		$(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
> ++svtest_LDADD = libomapi.a \
> ++	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + 
> +diff -up dhcp-4.3.5b1/relay/Makefile.am.remove-bind dhcp-
> 4.3.5b1/relay/Makefile.am
> +--- dhcp-4.3.5b1/relay/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/relay/Makefile.am	2016-09-12 17:00:22.798902249 +0200
> +@@ -1,12 +1,9 @@
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
> + 
> + sbin_PROGRAMS = dhcrelay
> + dhcrelay_SOURCES = dhcrelay.c
> + dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> +-		 $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
> +-		 $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
> ++		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + man_MANS = dhcrelay.8
> + EXTRA_DIST = $(man_MANS)
> + 
> +diff -up dhcp-4.3.5b1/server/Makefile.am.remove-bind dhcp-
> 4.3.5b1/server/Makefile.am
> +--- dhcp-4.3.5b1/server/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/server/Makefile.am	2016-09-12 17:00:22.798902249
> +0200
> +@@ -4,8 +4,6 @@
> + # production code. Sadly, we are not there yet.
> + SUBDIRS = . tests
> + 
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
> + 
> + dist_sysconf_DATA = dhcpd.conf.example
> +@@ -15,10 +13,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
> + 		dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c
> ldap_krb_helper.c
> + 
> + dhcpd_CFLAGS = $(LDAP_CFLAGS)
> +-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> +-	      ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
> +-	      $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
> +-	      $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
> ++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a
> ../dhcpctl/libdhcpctl.a \
> ++	      $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export \
> ++	      $(LDAP_LIBS)
> + 
> + man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
> + EXTRA_DIST = $(man_MANS)
> +diff -up dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind dhcp-
> 4.3.5b1/server/tests/Makefile.am
> +--- dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/server/tests/Makefile.am	2016-09-12
> 17:00:22.799902249 +0200
> +@@ -1,9 +1,7 @@
> + SUBDIRS = .
> + 
> +-BINDLIBDIR = @BINDDIR@/lib
> +-
> + AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
> +-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
> ++AM_CPPFLAGS += -I$(top_srcdir)
> + AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
> + 
> + EXTRA_DIST = Atffile
> +@@ -20,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
> +           ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
> + 
> + DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.a \
> +-          $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
> +-	  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
> +-	  $(BINDLIBDIR)/libisc.a
> ++	   $(top_builddir)/dhcpctl/libdhcpctl.a \
> ++	   $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + ATF_TESTS =
> + if HAVE_ATF
> diff --git a/dhcp/patches/0002-dhcp-sharedlib.patch b/dhcp/patches/0002-dhcp-
> sharedlib.patch
> new file mode 100644
> index 0000000..3427f78
> --- /dev/null
> +++ b/dhcp/patches/0002-dhcp-sharedlib.patch
> @@ -0,0 +1,140 @@
> +diff -up dhcp-4.3.4/client/Makefile.am.sharedlib dhcp-
> 4.3.4/client/Makefile.am
> +--- dhcp-4.3.4/client/Makefile.am.sharedlib	2016-04-29
> 11:48:30.389923087 +0200
> ++++ dhcp-4.3.4/client/Makefile.am	2016-04-29 11:48:30.393923084 +0200
> +@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
> + 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos
> \
> + 		   scripts/netbsd scripts/nextstep scripts/openbsd \
> + 		   scripts/solaris scripts/openwrt
> +-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> ++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> + 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
> + EXTRA_DIST = $(man_MANS)
> +diff -up dhcp-4.3.4/common/tests/Makefile.am.sharedlib dhcp-
> 4.3.4/common/tests/Makefile.am
> +--- dhcp-4.3.4/common/tests/Makefile.am.sharedlib	2016-04-29
> 11:48:30.394923084 +0200
> ++++ dhcp-4.3.4/common/tests/Makefile.am	2016-04-29 11:54:16.890716651
> +0200
> +@@ -13,25 +13,25 @@ ATF_TESTS += alloc_unittest dns_unittest
> + alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
> + alloc_unittest_LDADD = $(ATF_LDFLAGS)
> + alloc_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a \
> ++	../../omapip/libomapi.la \
> + 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
> + dns_unittest_LDADD = $(ATF_LDFLAGS)
> + dns_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a \
> ++	../../omapip/libomapi.la \
> + 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
> + misc_unittest_LDADD = $(ATF_LDFLAGS)
> + misc_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a \
> ++	../../omapip/libomapi.la \
> + 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
> + ns_name_unittest_LDADD = $(ATF_LDFLAGS)
> + ns_name_unittest_LDADD += ../libdhcp.a  \
> +-	../../omapip/libomapi.a \
> ++	../../omapip/libomapi.la \
> + 	$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + check: $(ATF_TESTS)
> +diff -up dhcp-4.3.4/configure.ac.sharedlib dhcp-4.3.4/configure.ac
> +--- dhcp-4.3.4/configure.ac.sharedlib	2016-04-29 11:48:30.394923084
> +0200
> ++++ dhcp-4.3.4/configure.ac	2016-04-29 11:55:22.729691668 +0200
> +@@ -47,7 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$c
> + # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
> + AC_USE_SYSTEM_EXTENSIONS
> + 
> +-AC_PROG_RANLIB
> ++# Use libtool to simplify building of shared libraries
> ++AC_PROG_LIBTOOL
> + 
> + AC_PATH_PROG(AR, ar)
> + AC_SUBST(AR)
> +diff -up dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib dhcp-
> 4.3.4/dhcpctl/Makefile.am
> +--- dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib	2016-04-29
> 11:48:30.394923084 +0200
> ++++ dhcp-4.3.4/dhcpctl/Makefile.am	2016-04-29 11:56:18.390670546 +0200
> +@@ -1,15 +1,15 @@
> + bin_PROGRAMS = omshell
> +-lib_LIBRARIES = libdhcpctl.a
> ++lib_LTLIBRARIES = libdhcpctl.la
> + noinst_PROGRAMS = cltest
> + man_MANS = omshell.1 dhcpctl.3
> + EXTRA_DIST = $(man_MANS)
> + 
> + omshell_SOURCES = omshell.c
> +-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> ++omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
> + 	        $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + 
> +-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
> ++libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
> + 
> + cltest_SOURCES = cltest.c
> +-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> ++cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
> + 	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> +diff -up dhcp-4.3.4/omapip/Makefile.am.sharedlib dhcp-
> 4.3.4/omapip/Makefile.am
> +--- dhcp-4.3.4/omapip/Makefile.am.sharedlib	2016-04-29
> 11:48:30.392923085 +0200
> ++++ dhcp-4.3.4/omapip/Makefile.am	2016-04-29 11:57:33.709641969 +0200
> +@@ -1,7 +1,7 @@
> +-lib_LIBRARIES = libomapi.a
> ++lib_LTLIBRARIES = libomapi.la
> + noinst_PROGRAMS = svtest
> + 
> +-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
> ++libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
> + 		     errwarn.c listener.c dispatch.c generic.c support.c \
> + 		     handle.c message.c convert.c hash.c auth.c inet_addr.c
> \
> + 		     array.c trace.c toisc.c iscprint.c isclib.c
> +@@ -10,6 +10,6 @@ man_MANS = omapi.3
> + EXTRA_DIST = $(man_MANS)
> + 
> + svtest_SOURCES = test.c
> +-svtest_LDADD = libomapi.a \
> ++svtest_LDADD = libomapi.la \
> + 	       $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + 
> +diff -up dhcp-4.3.4/relay/Makefile.am.sharedlib dhcp-4.3.4/relay/Makefile.am
> +--- dhcp-4.3.4/relay/Makefile.am.sharedlib	2016-04-29
> 11:48:30.392923085 +0200
> ++++ dhcp-4.3.4/relay/Makefile.am	2016-04-29 11:48:30.395923083 +0200
> +@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
> + 
> + sbin_PROGRAMS = dhcrelay
> + dhcrelay_SOURCES = dhcrelay.c
> +-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> ++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> + 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
> + man_MANS = dhcrelay.8
> + EXTRA_DIST = $(man_MANS)
> +diff -up dhcp-4.3.4/server/Makefile.am.sharedlib dhcp-
> 4.3.4/server/Makefile.am
> +--- dhcp-4.3.4/server/Makefile.am.sharedlib	2016-04-29
> 11:48:30.392923085 +0200
> ++++ dhcp-4.3.4/server/Makefile.am	2016-04-29 11:48:30.395923083 +0200
> +@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
> + 		dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c
> ldap_krb_helper.c
> + 
> + dhcpd_CFLAGS = $(LDAP_CFLAGS)
> +-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a
> ../dhcpctl/libdhcpctl.a \
> ++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la
> ../dhcpctl/libdhcpctl.la \
> + 	      $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export \
> + 	      $(LDAP_LIBS)
> + 
> +diff -up dhcp-4.3.4/server/tests/Makefile.am.sharedlib dhcp-
> 4.3.4/server/tests/Makefile.am
> +--- dhcp-4.3.4/server/tests/Makefile.am.sharedlib	2016-04-29
> 11:48:30.395923083 +0200
> ++++ dhcp-4.3.4/server/tests/Makefile.am	2016-04-29 11:59:13.414604130
> +0200
> +@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
> +           ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c        \
> +           ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
> + 
> +-DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.a \
> +-	   $(top_builddir)/dhcpctl/libdhcpctl.a \
> ++DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.la \
> ++	   $(top_builddir)/dhcpctl/libdhcpctl.la \
> + 	   $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-
> export
> + 
> + ATF_TESTS =
> diff --git a/dhcp/patches/0003-dhcp-errwarn-message.patch b/dhcp/patches/0003-
> dhcp-errwarn-message.patch
> new file mode 100644
> index 0000000..f42d1e9
> --- /dev/null
> +++ b/dhcp/patches/0003-dhcp-errwarn-message.patch
> @@ -0,0 +1,64 @@
> +diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c
> +--- dhcp-4.3.5/omapip/errwarn.c.errwarn	2016-09-27 21:16:50.000000000
> +0200
> ++++ dhcp-4.3.5/omapip/errwarn.c	2016-11-29 19:44:03.515031147 +0100
> +@@ -49,6 +49,41 @@ void (*log_cleanup) (void);
> + static char mbuf [CVT_BUF_MAX + 1];
> + static char fbuf [CVT_BUF_MAX + 1];
> + 
> ++// get BUG_REPORT_URL from /etc/os-release
> ++char * bug_report_url(void) {
> ++    FILE * file = fopen("/etc/os-release", "r");
> ++    size_t len;
> ++    char * line = NULL;
> ++    char * url = NULL;
> ++    size_t url_len = 256;
> ++
> ++    url = (char *) malloc(url_len * sizeof(char));
> ++    strcpy(url, "https://bugzilla.redhat.com/");
> ++
> ++    if (!file)
> ++        return url;
> ++
> ++    while ((getline(&line, &len, file)) != -1) {
> ++        if (strstr(line, "BUG_REPORT_URL") != NULL) {
> ++            char * start = strchr(line, '=');
> ++            char * rquotes = strrchr(line, '"');
> ++
> ++            if (rquotes != NULL) {
> ++                *rquotes = '\0';
> ++                strncpy(url, start+2, url_len);
> ++            } else {
> ++                strncpy(url, start+1, url_len);
> ++            }
> ++            url[url_len-1] = '\0';
> ++            fclose(file);
> ++            return url;
> ++        }
> ++    }
> ++    fclose(file);
> ++    return url;
> ++}
> ++
> ++
> + /* Log an error message, then exit... */
> + 
> + void log_fatal (const char * fmt, ... )
> +@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... )
> +   }
> + 
> +   log_error ("%s", "");
> +-  log_error ("If you think you have received this message due to a bug
> rather");
> +-  log_error ("than a configuration issue please read the section on
> submitting");
> +-  log_error ("bugs on either our web page at www.isc.org or in the README
> file");
> +-  log_error ("before submitting a bug.  These pages explain the proper");
> +-  log_error ("process and the information we find helpful for debugging..");
> ++  log_error ("This version of ISC DHCP is based on the release available");
> ++  log_error ("on ftp.isc.org. Features have been added and other changes");
> ++  log_error ("have been made to the base software release in order to
> make");
> ++  log_error ("it work better with this distribution.");
> ++  log_error ("%s", "");
> ++  log_error ("Please report issues with this software via: ");
> ++  log_error ("%s", bug_report_url());
> +   log_error ("%s", "");
> +   log_error ("exiting.");
> + 
> diff --git a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch
> b/dhcp/patches/0004-dhcp-dhclient-options.patch
> similarity index 72%
> rename from dhcp/patches/dhcp-4.2.4-dhclient-options.patch
> rename to dhcp/patches/0004-dhcp-dhclient-options.patch
> index 40c3271..8f0dfe9 100644
> --- a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch
> +++ b/dhcp/patches/0004-dhcp-dhclient-options.patch
> @@ -1,14 +1,48 @@
> -diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8
> ---- dhcp-4.2.1b1/client/dhclient.8.man	2010-07-14 22:09:34.000000000
> +0200
> -+++ dhcp-4.2.1b1/client/dhclient.8	2011-01-27 18:19:07.000000000 +0100
> -@@ -115,6 +115,33 @@ dhclient - Dynamic Host Configuration Pr
> +diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
> +--- dhcp-4.3.4/client/clparse.c.options	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:06:13.485470579 +0200
> +@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
> + 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option
> cache)
> + 	 */
> + 	top_level_config.requested_lease = 7200;
> ++	top_level_config.bootp_broadcast_always = 0;
> + 
> + 	group_allocate (&top_level_config.on_receipt, MDL);
> + 	if (!top_level_config.on_receipt)
> +@@ -394,7 +395,8 @@ void read_client_leases ()
> + 	interface-declaration |
> + 	LEASE client-lease-statement |
> + 	ALIAS client-lease-statement |
> +-	KEY key-definition */
> ++	KEY key-definition |
> ++	BOOTP_BROADCAST_ALWAYS */
> + 
> + void parse_client_statement (cfile, ip, config)
> + 	struct parse *cfile;
> +@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip,
> + 		parse_lease_id_format(cfile);
> + 		break;
> + 
> ++	      case BOOTP_BROADCAST_ALWAYS:
> ++		token = next_token(&val, (unsigned*)0, cfile);
> ++		config -> bootp_broadcast_always = 1;
> ++		parse_semi (cfile);
> ++		return;
> ++
> + 
> + 	      default:
> + 		lose = 0;
> +diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
> +--- dhcp-4.3.4/client/dhclient.8.options	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/client/dhclient.8	2016-04-29 11:59:50.446590077 +0200
> +@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr
>   .B -w
>   ]
>   [
>  +.B -B
>  +]
>  +[
> -+.B -I
> ++.B -C
>  +.I dhcp-client-identifier
>  +]
>  +[
> @@ -24,18 +58,18 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-
> 4.2.1b1/client/dhclient.8
>  +.I vendor-class-identifier
>  +]
>  +[
> -+.B -R
> ++.B --request-options
>  +.I request-option-list
>  +]
>  +[
> -+.B -timeout
> ++.B --timeout
>  +.I timeout
>  +]
>  +[
>   .B -v
>   ]
>   [
> -@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc
> +@@ -289,6 +316,69 @@ not to exit when it doesn't find any suc
>   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.
> @@ -46,7 +80,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-
> 4.2.1b1/client/dhclient.8
>  +broadcast replies.
>  +
>  +.TP
> -+.BI \-I\ <dhcp-client-identifier>
> ++.BI \-C\ <dhcp-client-identifier>
>  +Specify the dhcp-client-identifier option to send to the DHCP server.
>  +
>  +.TP
> @@ -73,7 +107,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-
> 4.2.1b1/client/dhclient.8
>  +Specify the vendor-class-identifier option to send to the DHCP server.
>  +
>  +.TP
> -+.BI \-R\ <option>[,<option>...]
> ++.BI \--request-options\ <option>[,<option>...]
>  +Specify the list of options the client is to request from the server.  The
>  +option list must be a single string consisting of option names separated
>  +by at least one command and optional space characters.  The default option
> @@ -87,16 +121,16 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-
> 4.2.1b1/client/dhclient.8
>  +    nis-domain, nis-servers, ntp-servers, interface-mtu
>  +
>  +.TP
> -+.B -R
> ++.B --request-options
>  +option does not append options to the default request, it overrides the
>  +default request list.  Keep this in mind if you want to request an
>  +additional option besides the default request list.  You will have to
>  +specify all option names for the
> -+.B -R
> ++.B --request-options
>  +parameter.
>  +
>  +.TP
> -+.BI \-timeout\ <timeout>
> ++.BI \--timeout\ <timeout>
>  +Specify the time after which
>  +.B dhclient
>  +will decide that no DHCP servers can be contacted when no responses have
> been
> @@ -105,45 +139,11 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-
> 4.2.1b1/client/dhclient.8
>   .TP
>   .BI \-n
>   Do not configure any interfaces.  This is most likely to be useful in
> -diff -up dhcp-4.2.4-P2/client/clparse.c.options dhcp-4.2.4-
> P2/client/clparse.c
> ---- dhcp-4.2.4-P2/client/clparse.c.options	2012-08-24
> 21:11:21.000000000 +0200
> -+++ dhcp-4.2.4-P2/client/clparse.c	2012-09-26 10:34:27.140049896 +0200
> -@@ -154,6 +154,7 @@ isc_result_t read_client_conf ()
> - 	/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option
> cache)
> - 	 */
> - 	top_level_config.requested_lease = 7200;
> -+	top_level_config.bootp_broadcast_always = 0;
> - 
> - 	group_allocate (&top_level_config.on_receipt, MDL);
> - 	if (!top_level_config.on_receipt)
> -@@ -320,7 +321,8 @@ void read_client_leases ()
> - 	interface-declaration |
> - 	LEASE client-lease-statement |
> - 	ALIAS client-lease-statement |
> --	KEY key-definition */
> -+	KEY key-definition |
> -+	BOOTP_BROADCAST_ALWAYS */
> - 
> - void parse_client_statement (cfile, ip, config)
> - 	struct parse *cfile;
> -@@ -739,6 +741,12 @@ void parse_client_statement (cfile, ip,
> - 		parse_reject_statement (cfile, config);
> - 		return;
> - 
> -+	      case BOOTP_BROADCAST_ALWAYS:
> -+		token = next_token(&val, (unsigned*)0, cfile);
> -+		config -> bootp_broadcast_always = 1;
> -+		parse_semi (cfile);
> -+		return;
> -+
> - 	      default:
> - 		lose = 0;
> - 		stmt = (struct executable_statement *)0;
> -diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-4.2.4-
> P2/client/dhclient.c
> ---- dhcp-4.2.4-P2/client/dhclient.c.options	2012-08-28
> 04:13:03.000000000 +0200
> -+++ dhcp-4.2.4-P2/client/dhclient.c	2012-09-26 10:36:10.396967531
> +0200
> -@@ -39,6 +39,12 @@
> - #include <limits.h>
> +diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.options	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:12:14.182364093 +0200
> +@@ -40,6 +40,12 @@
> + #include <isc/file.h>
>   #include <dns/result.h>
>   
>  +/*
> @@ -155,20 +155,34 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>   TIME default_lease_time = 43200; /* 12 hours... */
>   TIME max_lease_time = 86400; /* 24 hours... */
>   
> -@@ -87,6 +93,9 @@ int wanted_ia_na = -1;		/* the absolute
> - int wanted_ia_ta = 0;
> - int wanted_ia_pd = 0;
> - char *mockup_relay = NULL;
> +@@ -100,6 +106,10 @@ char *mockup_relay = NULL;
> + 
> + char *progname = NULL;
> + 
>  +int bootp_broadcast_always = 0;
>  +
> -+extern u_int32_t default_requested_options[];
> ++extern struct option *default_requested_options[];
> ++
> + void run_stateless(int exit_mode, u_int16_t port);
> + 
> + static isc_result_t write_duid(struct data_string *duid);
> +@@ -177,7 +187,11 @@ usage(const char *sfmt, const char *sarg
> + 		  "                [-s server-addr] [-cf config-file]\n"
> + 		  "                [-df duid-file] [-lf lease-file]\n"
> + 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
> +-		  "                [-sf script-file] [interface]*",
> ++		  "                [-sf script-file] [interface]*\n"
> ++		  "                [-C <dhcp-client-identifier>] [-B]\n"
> ++		  "                [-H <host-name> | -F <fqdn.fqdn>] [
> --timeout <timeout>]\n"
> ++		  "                [-V <vendor-class-identifier>]\n"
> ++		  "                [--request-options <request option
> list>]",
> + 		  isc_file_basename(progname));
> + }
>   
> - void run_stateless(int exit_mode);
> +@@ -214,6 +228,16 @@ main(int argc, char **argv) {
> + 	progname = argv[0];
> + #endif
>   
> -@@ -123,6 +132,15 @@ main(int argc, char **argv) {
> - 	int local_family_set = 0;
> - #endif /* DHCPv6 */
> - 	char *s;
>  +	char *dhcp_client_identifier_arg = NULL;
>  +	char *dhcp_host_name_arg = NULL;
>  +	char *dhcp_fqdn_arg = NULL;
> @@ -178,21 +192,22 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +	int timeout_arg = 0;
>  +	char *arg_conf = NULL;
>  +	int arg_conf_len = 0;
> - 
> ++
>   	/* Initialize client globals. */
>   	memset(&default_duid, 0, sizeof(default_duid));
> -@@ -310,6 +328,88 @@ main(int argc, char **argv) {
> - 		} else if (!strcmp(argv[i], "--version")) {
> - 			log_info("isc-dhclient-%s", PACKAGE_VERSION);
> + 
> +@@ -431,6 +455,88 @@ main(int argc, char **argv) {
> + 					 strlen(PACKAGE_VERSION)));
> + 			IGNORE_RET(write(STDERR_FILENO, "\n", 1));
>   			exit(0);
> -+		} else if (!strcmp(argv[i], "-I")) {
> ++		} else if (!strcmp(argv[i], "-C")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
>  +			if (strlen(argv[i]) >= DHCP_MAX_OPTION_LEN) {
> -+				log_error("-I option dhcp-client-identifier
> string \"%s\" is too long - maximum length is: %d", argv[i],
> DHCP_MAX_OPTION_LEN-1);
> ++				log_error("-C option dhcp-client-identifier
> string \"%s\" is too long - maximum length is: %d", argv[i],
> DHCP_MAX_OPTION_LEN-1);
>  +				exit(1);
>  +			}
>  +
> @@ -201,7 +216,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			bootp_broadcast_always = 1;
>  +		} else if (!strcmp(argv[i], "-H")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
> @@ -218,7 +233,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			dhcp_host_name_arg = argv[i];
>  +		} else if (!strcmp(argv[i], "-F")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
> @@ -238,9 +253,9 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			}
>  +
>  +			dhcp_fqdn_arg = argv[i];
> -+		} else if (!strcmp(argv[i], "-timeout")) {
> ++		} else if (!strcmp(argv[i], "--timeout")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
> @@ -250,7 +265,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			}
>  +		} else if (!strcmp(argv[i], "-V")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
> @@ -260,17 +275,17 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			}
>  +
>  +			dhcp_vendor_class_identifier_arg = argv[i];
> -+		} else if (!strcmp(argv[i], "-R")) {
> ++		} else if (!strcmp(argv[i], "--request-options")) {
>  +			if ((++i == argc) || (argv[i] == NULL) ||
> (*(argv[i])=='\0')) {
> -+				usage();
> ++				usage(use_noarg, argv[i-1]);
>  +				exit(1);
>  +			}
>  +
>  +			dhclient_request_options = argv[i];
>   		} else if (argv[i][0] == '-') {
> - 		    usage();
> + 			usage("Unknown command: %s", argv[i]);
>   		} else if (interfaces_requested < 0) {
> -@@ -484,6 +584,156 @@ main(int argc, char **argv) {
> +@@ -630,6 +736,156 @@ main(int argc, char **argv) {
>   	/* Parse the dhclient.conf file. */
>   	read_client_conf();
>   
> @@ -279,7 +294,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-
> identifier \"%s\";", dhcp_client_identifier_arg);
>  +
>  +		if ((arg_conf == 0) || (arg_conf_len <= 0))
> -+			log_fatal("Unable to send -I option dhcp-client-
> identifier");
> ++			log_fatal("Unable to send -C option dhcp-client-
> identifier");
>  +	}
>  +
>  +	if ((dhcp_host_name_arg != NULL) && (*dhcp_host_name_arg != '\0')) {
> @@ -323,14 +338,14 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			arg_conf_len = asprintf(&arg_conf,  "timeout %d;",
> timeout_arg);
>  +
>  +			if ((arg_conf == 0) || (arg_conf_len <= 0))
> -+				log_fatal("Unable to process -timeout
> timeout argument");
> ++				log_fatal("Unable to process --timeout
> timeout argument");
>  +		} else {
>  +			char *last_arg_conf = arg_conf;
>  +			arg_conf = NULL;
>  +			arg_conf_len = asprintf(&arg_conf, "%s\ntimeout
> %d;", last_arg_conf, timeout_arg);
>  +
>  +			if ((arg_conf == 0) || (arg_conf_len == 0))
> -+				log_fatal("Unable to process -timeout
> timeout argument");
> ++				log_fatal("Unable to process --timeout
> timeout argument");
>  +
>  +			free(last_arg_conf);
>  +		}
> @@ -359,14 +374,14 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			arg_conf_len = asprintf(&arg_conf,  "request %s;",
> dhclient_request_options);
>  +
>  +			if ((arg_conf == 0) || (arg_conf_len <= 0))
> -+				log_fatal("Unable to parse -R <request
> options list> argument");
> ++				log_fatal("Unable to parse --request-options 
> <request options list> argument");
>  +		} else {
>  +			char *last_arg_conf = arg_conf;
>  +			arg_conf = NULL;
>  +			arg_conf_len = asprintf(&arg_conf, "%s\nrequest
> %s;", last_arg_conf, dhclient_request_options);
>  +
>  +			if ((arg_conf == 0)  || (arg_conf_len <= 0))
> -+				log_fatal("Unable to parse -R <request
> options list> argument");
> ++				log_fatal("Unable to parse --request-options 
> <request options list> argument");
>  +
>  +			free(last_arg_conf);
>  +		}
> @@ -376,7 +391,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +		if (arg_conf_len == 0)
>  +			if ((arg_conf_len = strlen(arg_conf)) == 0)
>  +				/* huh ? cannot happen ! */
> -+				log_fatal("Unable to process -I/-H/-F/-
> timeout/-V/-R configuration arguments");
> ++				log_fatal("Unable to process -C/-H/-F/
> --timeout/-V/--request-options configuration arguments");
>  +
>  +		/* parse the extra dhclient.conf configuration arguments
>  +		 * into top level config: */
> @@ -384,10 +399,10 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +		const char *val = NULL;
>  +		int token;
>  +
> -+		status = new_parse(&cfile, -1, arg_conf, arg_conf_len,
> "extra dhclient -I/-H/-F/-timeout/-V/-R configuration arguments", 0);
> ++		status = new_parse(&cfile, -1, arg_conf, arg_conf_len,
> "extra dhclient -C/-H/-F/--timeout/-V/--request-options configuration
> arguments", 0);
>  +
>  +		if ((status != ISC_R_SUCCESS) || (cfile ->
> warnings_occurred))
> -+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R
> configuration arguments !");
> ++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/
> --request-options configuration arguments !");
>  +		/* more detailed parse failures will be logged */
>  +
>  +		do {
> @@ -399,7 +414,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>  +		} while (1);
>  +
>  +		if (cfile -> warnings_occurred)
> -+			log_fatal("Cannot parse -I/-H/-F/-timeout/-V/-R
> configuration arguments !");
> ++			log_fatal("Cannot parse -C/-H/-F/--timeout/-V/
> --request-options configuration arguments !");
>  +		end_parse(&cfile);
>  +
>  +		if (timeout_arg) {
> @@ -427,18 +442,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>   	/* Parse the lease database. */
>   	read_client_leases();
>   
> -@@ -715,6 +965,10 @@ static void usage()
> - 		  "                [-s server-addr] [-cf config-file] "
> - 		  "[-lf lease-file]\n"
> - 		  "                [-pf pid-file] [--no-pid] [-e VAR=val]\n"
> -+		  "                [-I <dhcp-client-identifier>] [-B]\n"
> -+		  "                [-H <host-name> | -F <fqdn.fqdn>] [-
> timeout <timeout>]\n"
> -+		  "                [-V <vendor-class-identifier>]\n"
> -+		  "                [-R <request option list>]\n"
> - 		  "                [-sf script-file] [interface]");
> - }
> - 
> -@@ -2421,7 +2675,8 @@ void make_discover (client, lease)
> +@@ -3067,7 +3323,8 @@ void make_discover (client, lease)
>   	client -> packet.xid = random ();
>   	client -> packet.secs = 0; /* filled in by send_discover. */
>   
> @@ -448,7 +452,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>   		client -> packet.flags = 0;
>   	else
>   		client -> packet.flags = htons (BOOTP_BROADCAST);
> -@@ -2505,7 +2760,9 @@ void make_request (client, lease)
> +@@ -3152,7 +3409,9 @@ void make_request (client, lease)
>   	} else {
>   		memset (&client -> packet.ciaddr, 0,
>   			sizeof client -> packet.ciaddr);
> @@ -459,7 +463,7 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>   			client -> packet.flags = 0;
>   		else
>   			client -> packet.flags = htons (BOOTP_BROADCAST);
> -@@ -2567,7 +2824,8 @@ void make_decline (client, lease)
> +@@ -3215,7 +3474,8 @@ void make_decline (client, lease)
>   	client -> packet.hops = 0;
>   	client -> packet.xid = client -> xid;
>   	client -> packet.secs = 0; /* Filled in by send_request. */
> @@ -469,41 +473,41 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.options dhcp-
> 4.2.4-P2/client/dhclient.c
>   		client -> packet.flags = 0;
>   	else
>   		client -> packet.flags = htons (BOOTP_BROADCAST);
> -diff -up dhcp-4.2.4-P2/common/conflex.c.options dhcp-4.2.4-
> P2/common/conflex.c
> ---- dhcp-4.2.4-P2/common/conflex.c.options	2012-08-28
> 04:13:03.000000000 +0200
> -+++ dhcp-4.2.4-P2/common/conflex.c	2012-09-26 10:34:27.142049876 +0200
> -@@ -808,6 +808,8 @@ intern(char *atom, enum dhcp_token dfv)
> - 			return BALANCE;
> - 		if (!strcasecmp (atom + 1, "ound"))
> - 			return BOUND;
> +diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
> +--- dhcp-4.3.4/common/conflex.c.options	2016-04-29 11:59:50.448590077
> +0200
> ++++ dhcp-4.3.4/common/conflex.c	2016-04-29 12:13:23.637342420 +0200
> +@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
> + 		if (!strcasecmp(atom+1, "ig-endian")) {
> + 			return TOKEN_BIG_ENDIAN;
> + 		}
>  +		if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
>  +			return BOOTP_BROADCAST_ALWAYS;
>   		break;
>   	      case 'c':
>   		if (!strcasecmp(atom + 1, "ase"))
> -diff -up dhcp-4.2.4-P2/includes/dhcpd.h.options dhcp-4.2.4-
> P2/includes/dhcpd.h
> ---- dhcp-4.2.4-P2/includes/dhcpd.h.options	2012-08-28
> 04:13:22.000000000 +0200
> -+++ dhcp-4.2.4-P2/includes/dhcpd.h	2012-09-26 10:34:27.143049865 +0200
> -@@ -1153,6 +1153,9 @@ struct client_config {
> - 	int do_forward_update;		/* If nonzero, and if we have
> the
> - 					   information we need, update the
> - 					   A record for the address we get.
> */
> +diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
> +--- dhcp-4.3.4/includes/dhcpd.h.options	2016-04-29 11:59:50.448590077
> +0200
> ++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:14:05.361329401 +0200
> +@@ -1246,6 +1246,9 @@ struct client_config {
> + 
> + 	int lease_id_format;		/* format for IDs in lease file,
> + 					   TOKEN_OCTAL or TOKEN_HEX */
>  +
>  +	int bootp_broadcast_always;	/* If nonzero, always set the
> BOOTP_BROADCAST
>  +					   flag in requests */
>   };
>   
>   /* Per-interface state used in the dhcp client... */
> -diff -up dhcp-4.2.4-P2/includes/dhctoken.h.options dhcp-4.2.4-
> P2/includes/dhctoken.h
> ---- dhcp-4.2.4-P2/includes/dhctoken.h.options	2012-08-28
> 04:13:03.000000000 +0200
> -+++ dhcp-4.2.4-P2/includes/dhctoken.h	2012-09-26 10:34:27.144049854
> +0200
> -@@ -364,7 +364,8 @@ enum dhcp_token {
> - 	GETHOSTBYNAME = 665,
> - 	PRIMARY6 = 666,
> - 	SECONDARY6 = 667,
> --	TOKEN_INFINIBAND = 668
> -+	TOKEN_INFINIBAND = 668,
> -+	BOOTP_BROADCAST_ALWAYS = 669
> +diff -up dhcp-4.3.4/includes/dhctoken.h.options dhcp-
> 4.3.4/includes/dhctoken.h
> +--- dhcp-4.3.4/includes/dhctoken.h.options	2016-04-29
> 11:59:50.449590076 +0200
> ++++ dhcp-4.3.4/includes/dhctoken.h	2016-04-29 12:15:03.073300846 +0200
> +@@ -373,7 +373,8 @@ enum dhcp_token {
> + 	TOKEN_BIG_ENDIAN = 675,
> + 	LEASE_ID_FORMAT = 676,
> + 	TOKEN_HEX = 677,
> +-	TOKEN_OCTAL = 678
> ++	TOKEN_OCTAL = 678,
> ++	BOOTP_BROADCAST_ALWAYS = 679
>   };
>   
>   #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
> diff --git a/dhcp/patches/dhcp-4.2.0-release-by-ifup.patch
> b/dhcp/patches/0005-dhcp-release-by-ifup.patch
> similarity index 88%
> rename from dhcp/patches/dhcp-4.2.0-release-by-ifup.patch
> rename to dhcp/patches/0005-dhcp-release-by-ifup.patch
> index 300c5f3..677eb5c 100644
> --- a/dhcp/patches/dhcp-4.2.0-release-by-ifup.patch
> +++ b/dhcp/patches/0005-dhcp-release-by-ifup.patch
> @@ -1,8 +1,8 @@
> -diff -up dhcp-4.2.0/client/dhclient.c.ifup dhcp-4.2.0/client/dhclient.c
> ---- dhcp-4.2.0/client/dhclient.c.ifup	2010-07-21 13:30:10.000000000
> +0200
> -+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 13:37:03.000000000 +0200
> -@@ -497,9 +497,81 @@ main(int argc, char **argv) {
> - 					kill(oldpid, SIGTERM);
> +diff -up dhcp-4.3.0a1/client/dhclient.c.ifup dhcp-4.3.0a1/client/dhclient.c
> +--- dhcp-4.3.0a1/client/dhclient.c.ifup	2013-12-19 14:53:08.817760677
> +0100
> ++++ dhcp-4.3.0a1/client/dhclient.c	2013-12-19 15:05:16.290518574 +0100
> +@@ -521,9 +521,81 @@ main(int argc, char **argv) {
> + 				}
>   			}
>   			fclose(pidfd);
>  +		} else {
> diff --git a/dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch
> b/dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
> similarity index 56%
> rename from dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch
> rename to dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
> index 81bec7b..645f931 100644
> --- a/dhcp/patches/dhcp-4.2.0-dhclient-decline-backoff.patch
> +++ b/dhcp/patches/0006-dhcp-dhclient-decline-backoff.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-4.2.0/client/dhclient.c
> ---- dhcp-4.2.0/client/dhclient.c.backoff	2010-07-21 13:37:03.000000000
> +0200
> -+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 13:38:31.000000000 +0200
> -@@ -1208,6 +1208,8 @@ void state_init (cpp)
> +diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.backoff	2016-04-29 12:16:26.976245611
> +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:16:26.979245609 +0200
> +@@ -1423,6 +1423,8 @@ void state_init (cpp)
>   	void *cpp;
>   {
>   	struct client_state *client = cpp;
> @@ -10,7 +10,7 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-
> 4.2.0/client/dhclient.c
>   
>   	ASSERT_STATE(state, S_INIT);
>   
> -@@ -1220,9 +1222,18 @@ void state_init (cpp)
> +@@ -1435,9 +1437,18 @@ void state_init (cpp)
>   	client -> first_sending = cur_time;
>   	client -> interval = client -> config -> initial_interval;
>   
> @@ -32,15 +32,15 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-
> 4.2.0/client/dhclient.c
>   }
>   
>   /*
> -@@ -1501,6 +1512,7 @@ void bind_lease (client)
> - 		send_decline (client);
> - 		destroy_client_lease (client -> new);
> - 		client -> new = (struct client_lease *)0;
> -+		client -> state = S_DECLINED;
> - 		state_init (client);
> - 		return;
> - 	}
> -@@ -3711,6 +3723,7 @@ void client_location_changed ()
> +@@ -1734,6 +1745,7 @@ void bind_lease (client)
> + 					 "try (declined).  Exiting.");
> + 			exit(2);
> + 		} else {
> ++			client -> state = S_DECLINED;
> + 			state_init(client);
> + 			return;
> + 		}
> +@@ -4626,6 +4638,7 @@ void client_location_changed ()
>   			      case S_INIT:
>   			      case S_REBINDING:
>   			      case S_STOPPED:
> @@ -48,10 +48,10 @@ diff -up dhcp-4.2.0/client/dhclient.c.backoff dhcp-
> 4.2.0/client/dhclient.c
>   				break;
>   			}
>   			client -> state = S_INIT;
> -diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-4.2.0/includes/dhcpd.h
> ---- dhcp-4.2.0/includes/dhcpd.h.backoff	2010-07-21 13:29:05.000000000
> +0200
> -+++ dhcp-4.2.0/includes/dhcpd.h	2010-07-21 13:38:31.000000000 +0200
> -@@ -1056,7 +1056,8 @@ enum dhcp_state {
> +diff -up dhcp-4.3.4/includes/dhcpd.h.backoff dhcp-4.3.4/includes/dhcpd.h
> +--- dhcp-4.3.4/includes/dhcpd.h.backoff	2016-04-29 12:16:26.980245609
> +0200
> ++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:17:30.893203533 +0200
> +@@ -1171,7 +1171,8 @@ enum dhcp_state {
>   	S_BOUND = 5,
>   	S_RENEWING = 6,
>   	S_REBINDING = 7,
> @@ -60,4 +60,4 @@ diff -up dhcp-4.2.0/includes/dhcpd.h.backoff dhcp-
> 4.2.0/includes/dhcpd.h
>  +	S_DECLINED = 9
>   };
>   
> - /* Authentication and BOOTP policy possibilities (not all values work
> + /* Possible pending client operations. */
> diff --git a/dhcp/patches/dhcp-4.2.4-unicast-bootp.patch b/dhcp/patches/0007-
> dhcp-unicast-bootp.patch
> similarity index 72%
> rename from dhcp/patches/dhcp-4.2.4-unicast-bootp.patch
> rename to dhcp/patches/0007-dhcp-unicast-bootp.patch
> index 69ab4c8..abf89f2 100644
> --- a/dhcp/patches/dhcp-4.2.4-unicast-bootp.patch
> +++ b/dhcp/patches/0007-dhcp-unicast-bootp.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-4.2.4b1/server/bootp.c
> ---- dhcp-4.2.4b1/server/bootp.c.unicast	2012-04-10 23:27:06.000000000
> +0200
> -+++ dhcp-4.2.4b1/server/bootp.c	2012-04-16 17:28:42.095919022 +0200
> -@@ -59,6 +59,7 @@ void bootp (packet)
> +diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
> +--- dhcp-4.3.4/server/bootp.c.unicast	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/server/bootp.c	2016-05-02 15:09:40.023243008 +0200
> +@@ -52,6 +52,7 @@ void bootp (packet)
>   	char msgbuf [1024];
>   	int ignorep;
>   	int peer_has_leases = 0;
> @@ -9,7 +9,7 @@ diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-
> 4.2.4b1/server/bootp.c
>   
>   	if (packet -> raw -> op != BOOTREQUEST)
>   		return;
> -@@ -74,7 +75,7 @@ void bootp (packet)
> +@@ -67,7 +68,7 @@ void bootp (packet)
>   		 ? inet_ntoa (packet -> raw -> giaddr)
>   		 : packet -> interface -> name);
>   
> @@ -18,7 +18,7 @@ diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-
> 4.2.4b1/server/bootp.c
>   		log_info ("%s: network unknown", msgbuf);
>   		return;
>   	}
> -@@ -399,6 +400,15 @@ void bootp (packet)
> +@@ -428,6 +429,15 @@ void bootp (packet)
>   
>   			goto out;
>   		}
> @@ -34,18 +34,18 @@ diff -up dhcp-4.2.4b1/server/bootp.c.unicast dhcp-
> 4.2.4b1/server/bootp.c
>   
>   	/* If it comes from a client that already knows its address
>   	   and is not requesting a broadcast response, and we can
> -diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-4.2.4b1/server/dhcp.c
> ---- dhcp-4.2.4b1/server/dhcp.c.unicast	2012-03-09 12:28:12.000000000
> +0100
> -+++ dhcp-4.2.4b1/server/dhcp.c	2012-04-16 17:26:55.067418285 +0200
> -@@ -4299,6 +4299,7 @@ int locate_network (packet)
> +diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
> +--- dhcp-4.3.4/server/dhcp.c.unicast	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/server/dhcp.c	2016-05-02 15:10:13.255267511 +0200
> +@@ -5132,6 +5132,7 @@ int locate_network (packet)
>   	struct data_string data;
>   	struct subnet *subnet = (struct subnet *)0;
>   	struct option_cache *oc;
>  +	int norelay = 0;
>   
> - 	/* See if there's a Relay Agent Link Selection Option, or a
> - 	 * Subnet Selection Option.  The Link-Select and Subnet-Select
> -@@ -4314,12 +4315,24 @@ int locate_network (packet)
> + #if defined(DHCPv6) && defined(DHCP4o6)
> + 	if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
> +@@ -5153,12 +5154,24 @@ int locate_network (packet)
>   	   from the interface, if there is one.   If not, fail. */
>   	if (!oc && !packet -> raw -> giaddr.s_addr) {
>   		if (packet -> interface -> shared_network) {
> @@ -75,7 +75,7 @@ diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-
> 4.2.4b1/server/dhcp.c
>   	}
>   
>   	/* If there's an option indicating link connection, and it's valid,
> -@@ -4342,7 +4355,10 @@ int locate_network (packet)
> +@@ -5185,7 +5198,10 @@ int locate_network (packet)
>   		data_string_forget (&data, MDL);
>   	} else {
>   		ia.len = 4;
> @@ -87,7 +87,7 @@ diff -up dhcp-4.2.4b1/server/dhcp.c.unicast dhcp-
> 4.2.4b1/server/dhcp.c
>   	}
>   
>   	/* If we know the subnet on which the IP address lives, use it. */
> -@@ -4350,7 +4366,10 @@ int locate_network (packet)
> +@@ -5193,7 +5209,10 @@ int locate_network (packet)
>   		shared_network_reference (&packet -> shared_network,
>   					  subnet -> shared_network, MDL);
>   		subnet_dereference (&subnet, MDL);
> diff --git a/dhcp/patches/dhcp-4.2.0-default-requested-options.patch
> b/dhcp/patches/0008-dhcp-default-requested-options.patch
> similarity index 76%
> rename from dhcp/patches/dhcp-4.2.0-default-requested-options.patch
> rename to dhcp/patches/0008-dhcp-default-requested-options.patch
> index fea8a4b..f57fa1f 100644
> --- a/dhcp/patches/dhcp-4.2.0-default-requested-options.patch
> +++ b/dhcp/patches/0008-dhcp-default-requested-options.patch
> @@ -1,16 +1,16 @@
> -diff -up dhcp-4.2.0/client/clparse.c.requested dhcp-4.2.0/client/clparse.c
> ---- dhcp-4.2.0/client/clparse.c.requested	2010-07-21
> 13:29:05.000000000 +0200
> -+++ dhcp-4.2.0/client/clparse.c	2010-07-21 13:50:29.000000000 +0200
> -@@ -37,7 +37,7 @@
> +diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
> +--- dhcp-4.3.4/client/clparse.c.requested	2016-04-29
> 12:18:50.157151352 +0200
> ++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:19:22.235137243 +0200
> +@@ -31,7 +31,7 @@
>   
>   struct client_config top_level_config;
>   
>  -#define NUM_DEFAULT_REQUESTED_OPTS	9
>  +#define NUM_DEFAULT_REQUESTED_OPTS	14
> - struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
> + /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
> + struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 +
> 1];
>   
> - static void parse_client_default_duid(struct parse *cfile);
> -@@ -111,6 +111,31 @@ isc_result_t read_client_conf ()
> +@@ -116,6 +116,31 @@ isc_result_t read_client_conf ()
>   	option_code_hash_lookup(&default_requested_options[8],
>   				dhcpv6_universe.code_hash, &code, 0, MDL);
>   
> diff --git a/dhcp/patches/dhcp-4.2.5-manpages.patch b/dhcp/patches/0009-dhcp-
> manpages.patch
> similarity index 70%
> rename from dhcp/patches/dhcp-4.2.5-manpages.patch
> rename to dhcp/patches/0009-dhcp-manpages.patch
> index fb931bc..24d6972 100644
> --- a/dhcp/patches/dhcp-4.2.5-manpages.patch
> +++ b/dhcp/patches/0009-dhcp-manpages.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-
> 4.2.5b1/client/dhclient.conf.5
> ---- dhcp-4.2.5b1/client/dhclient.conf.5.man	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/client/dhclient.conf.5	2012-12-17 12:49:52.818451301
> +0100
> -@@ -202,7 +202,8 @@ responding to the client send the client
> +diff -up dhcp-4.3.5b1/client/dhclient.conf.5.man dhcp-
> 4.3.5b1/client/dhclient.conf.5
> +--- dhcp-4.3.5b1/client/dhclient.conf.5.man	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/client/dhclient.conf.5	2016-09-12 17:09:23.243313514
> +0200
> +@@ -228,7 +228,8 @@ responding to the client send the client
>   options.  Only the option names should be specified in the request
>   statement - not option parameters.  By default, the DHCPv4 client
>   requests the subnet-mask, broadcast-address, time-offset, routers,
> @@ -11,7 +11,7 @@ diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-
> 4.2.5b1/client/dhclient.co
>   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.
> -@@ -688,6 +689,17 @@ know the DHCP service(s) anycast MAC add
> +@@ -736,6 +737,17 @@ know the DHCP service(s) anycast MAC add
>   client.  The \fIlink-type\fR and \fImac-address\fR parameters are configured
>   in a similar manner to the \fBhardware\fR statement.
>   .PP
> @@ -27,21 +27,12 @@ diff -up dhcp-4.2.5b1/client/dhclient.conf.5.man dhcp-
> 4.2.5b1/client/dhclient.co
>  +on IBM s390 Linux guests.
>  +.PP
>   .SH SAMPLE
> - The following configuration file is used on a laptop running NetBSD
> - 1.3.  The laptop has an IP alias of 192.5.5.213, and has one
> -@@ -713,7 +725,7 @@ interface "ep0" {
> -     supersede domain-search "fugue.com", "rc.vix.com", "home.vix.com";
> -     prepend domain-name-servers 127.0.0.1;
> -     request subnet-mask, broadcast-address, time-offset, routers,
> --	    domain-name, domain-name-servers, host-name;
> -+	    domain-search, domain-name, domain-name-servers, host-name;
> -     require subnet-mask, domain-name-servers;
> -     script "CLIENTBINDIR/dhclient-script";
> -     media "media 10baseT/UTP", "media 10base2/BNC";
> -diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-
> 4.2.5b1/client/dhclient-script.8
> ---- dhcp-4.2.5b1/client/dhclient-script.8.man	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/client/dhclient-script.8	2012-12-17
> 12:47:48.410130998 +0100
> -@@ -48,7 +48,7 @@ customizations are needed, they should b
> + The following configuration file was used on a laptop running NetBSD
> + 1.3, though the domains have been modified.
> +diff -up dhcp-4.3.5b1/client/dhclient-script.8.man dhcp-
> 4.3.5b1/client/dhclient-script.8
> +--- dhcp-4.3.5b1/client/dhclient-script.8.man	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/client/dhclient-script.8	2016-09-12
> 17:08:09.516254385 +0200
> +@@ -45,7 +45,7 @@ customizations are needed, they should b
>   exit hooks provided (see HOOKS for details).   These hooks will allow the
>   user to override the default behaviour of the client in creating a
>   .B /etc/resolv.conf
> @@ -50,7 +41,7 @@ diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-
> 4.2.5b1/client/dhclient-
>   .PP
>   No standard client script exists for some operating systems, even though
>   the actual client may work, so a pioneering user may well need to create
> -@@ -92,6 +92,26 @@ present.   The
> +@@ -89,6 +89,26 @@ present.   The
>   .B ETCDIR/dhclient-exit-hooks
>   script can modify the valid of exit_status to change the exit status
>   of dhclient-script.
> @@ -77,10 +68,10 @@ diff -up dhcp-4.2.5b1/client/dhclient-script.8.man dhcp-
> 4.2.5b1/client/dhclient-
>   .SH OPERATION
>   When dhclient needs to invoke the client configuration script, it
>   defines a set of variables in the environment, and then invokes
> -diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-4.2.5b1/common/dhcp-
> options.5
> ---- dhcp-4.2.5b1/common/dhcp-options.5.man	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 12:47:48.411130985
> +0100
> -@@ -914,6 +914,21 @@ classless IP routing - it does not inclu
> +diff -up dhcp-4.3.5b1/common/dhcp-options.5.man dhcp-4.3.5b1/common/dhcp-
> options.5
> +--- dhcp-4.3.5b1/common/dhcp-options.5.man	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/common/dhcp-options.5	2016-09-12 17:08:09.517254386
> +0200
> +@@ -1013,6 +1013,21 @@ classless IP routing - it does not inclu
>   classless IP routing is now the most widely deployed routing standard,
>   this option is virtually useless, and is not implemented by any of the
>   popular DHCP clients, for example the Microsoft DHCP client.
> @@ -102,10 +93,10 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.man dhcp-
> 4.2.5b1/common/dhcp-options
>   .RE
>   .PP
>   .nf
> -diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-
> 4.2.5b1/server/dhcpd.conf.5
> ---- dhcp-4.2.5b1/server/dhcpd.conf.5.man	2012-12-05 02:17:39.000000000
> +0100
> -+++ dhcp-4.2.5b1/server/dhcpd.conf.5	2012-12-17 12:50:52.117650542
> +0100
> -@@ -519,6 +519,9 @@ pool {
> +diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.man dhcp-
> 4.3.5b1/server/dhcpd.conf.5
> +--- dhcp-4.3.5b1/server/dhcpd.conf.5.man	2016-08-26 20:19:53.000000000
> +0200
> ++++ dhcp-4.3.5b1/server/dhcpd.conf.5	2016-09-12 17:10:11.205351980
> +0200
> +@@ -528,6 +528,9 @@ pool {
>   };
>   .fi
>   .PP
> @@ -115,19 +106,19 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-
> 4.2.5b1/server/dhcpd.conf.5
>   The  server currently  does very  little  sanity checking,  so if  you
>   configure it wrong, it will just  fail in odd ways.  I would recommend
>   therefore that you either do  failover or don't do failover, but don't
> -@@ -533,9 +536,9 @@ primary server might look like this:
> +@@ -542,9 +545,9 @@ primary server might look like this:
>   failover peer "foo" {
>     primary;
> -   address anthrax.rc.vix.com;
> +   address anthrax.rc.example.com;
>  -  port 519;
>  +  port 647;
> -   peer address trantor.rc.vix.com;
> +   peer address trantor.rc.example.com;
>  -  peer port 520;
>  +  peer port 847;
>     max-response-delay 60;
>     max-unacked-updates 10;
>     mclt 3600;
> -@@ -1318,7 +1321,7 @@ the zone containing PTR records - for IS
> +@@ -1246,7 +1249,7 @@ the zone containing PTR records - for IS
>   .PP
>   .nf
>   key DHCP_UPDATER {
> @@ -136,7 +127,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-
> 4.2.5b1/server/dhcpd.conf.5
>     secret pRP5FapFoJ95JEL06sv4PQ==;
>   };
>   
> -@@ -1341,7 +1344,7 @@ dhcpd.conf file:
> +@@ -1269,7 +1272,7 @@ dhcpd.conf file:
>   .PP
>   .nf
>   key DHCP_UPDATER {
> @@ -145,7 +136,7 @@ diff -up dhcp-4.2.5b1/server/dhcpd.conf.5.man dhcp-
> 4.2.5b1/server/dhcpd.conf.5
>     secret pRP5FapFoJ95JEL06sv4PQ==;
>   };
>   
> -@@ -2555,7 +2558,8 @@ statement
> +@@ -2742,7 +2745,8 @@ statement
>   The \fInext-server\fR statement is used to specify the host address of
>   the server from which the initial boot file (specified in the
>   \fIfilename\fR statement) is to be loaded.  \fIServer-name\fR should
> diff --git a/dhcp/patches/dhcp-4.2.4-paths.patch b/dhcp/patches/0010-dhcp-
> paths.patch
> similarity index 57%
> rename from dhcp/patches/dhcp-4.2.4-paths.patch
> rename to dhcp/patches/0010-dhcp-paths.patch
> index 52647ac..59a711d 100644
> --- a/dhcp/patches/dhcp-4.2.4-paths.patch
> +++ b/dhcp/patches/0010-dhcp-paths.patch
> @@ -1,6 +1,6 @@
> -diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-4.2.4-
> P2/doc/examples/dhcpd-dhcpv6.conf
> ---- dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf.paths  2012-08-24
> 21:11:21.000000000 +0200
> -+++ dhcp-4.2.4-P2/doc/examples/dhcpd-dhcpv6.conf        2012-10-26
> 18:10:08.716560729 +0200
> +diff -up dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths dhcp-
> 4.3.0a1/doc/examples/dhcpd-dhcpv6.conf
> +--- dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf.paths	2013-11-07
> 20:15:08.000000000 +0100
> ++++ dhcp-4.3.0a1/doc/examples/dhcpd-dhcpv6.conf	2013-12-19
> 15:34:16.262247711 +0100
>  @@ -42,7 +42,7 @@ option dhcp6.domain-search "test.example
>   option dhcp6.info-refresh-time 21600;
>   
> @@ -10,10 +10,10 @@ diff -up dhcp-4.2.4-P2/doc/examples/dhcpd-
> dhcpv6.conf.paths dhcp-4.2.4-P2/doc/ex
>   
>   # Static definition (must be global)
>   host myclient {
> -diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-4.2.4b1/includes/dhcpd.h
> ---- dhcp-4.2.4b1/includes/dhcpd.h.paths	2012-04-18 11:12:34.000000000
> +0200
> -+++ dhcp-4.2.4b1/includes/dhcpd.h	2012-04-18 11:14:38.541272405 +0200
> -@@ -1420,7 +1420,7 @@ typedef unsigned char option_mask [16];
> +diff -up dhcp-4.3.0a1/includes/dhcpd.h.paths dhcp-4.3.0a1/includes/dhcpd.h
> +--- dhcp-4.3.0a1/includes/dhcpd.h.paths	2013-12-19 15:34:16.253247840
> +0100
> ++++ dhcp-4.3.0a1/includes/dhcpd.h	2013-12-19 15:34:16.263247697 +0100
> +@@ -1429,7 +1429,7 @@ typedef unsigned char option_mask [16];
>   #else /* !DEBUG */
>   
>   #ifndef _PATH_DHCPD_CONF
> @@ -22,7 +22,7 @@ diff -up dhcp-4.2.4b1/includes/dhcpd.h.paths dhcp-
> 4.2.4b1/includes/dhcpd.h
>   #endif /* DEBUG */
>   
>   #ifndef _PATH_DHCPD_DB
> -@@ -1442,11 +1442,11 @@ typedef unsigned char option_mask [16];
> +@@ -1451,11 +1451,11 @@ typedef unsigned char option_mask [16];
>   #endif /* DEBUG */
>   
>   #ifndef _PATH_DHCLIENT_CONF
> diff --git a/dhcp/patches/dhcp-4.2.2-CLOEXEC.patch b/dhcp/patches/0011-dhcp-
> CLOEXEC.patch
> similarity index 63%
> rename from dhcp/patches/dhcp-4.2.2-CLOEXEC.patch
> rename to dhcp/patches/0011-dhcp-CLOEXEC.patch
> index 1f4538e..309a87c 100644
> --- a/dhcp/patches/dhcp-4.2.2-CLOEXEC.patch
> +++ b/dhcp/patches/0011-dhcp-CLOEXEC.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
> ---- dhcp-4.2.2b1/client/clparse.c.cloexec	2011-07-01
> 14:13:30.973887714 +0200
> -+++ dhcp-4.2.2b1/client/clparse.c	2011-07-01 14:15:15.021580693 +0200
> -@@ -246,7 +246,7 @@ int read_client_conf_file (const char *n
> +diff -up dhcp-4.3.3b1/client/clparse.c.cloexec dhcp-4.3.3b1/client/clparse.c
> +--- dhcp-4.3.3b1/client/clparse.c.cloexec	2015-08-10
> 10:46:20.264755543 +0200
> ++++ dhcp-4.3.3b1/client/clparse.c	2015-08-10 10:46:20.274755510 +0200
> +@@ -247,7 +247,7 @@ int read_client_conf_file (const char *n
>   	int token;
>   	isc_result_t status;
>   
> @@ -10,7 +10,7 @@ diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-
> 4.2.2b1/client/clparse.c
>   		return uerr2isc (errno);
>   
>   	cfile = NULL;
> -@@ -283,7 +283,7 @@ void read_client_leases ()
> +@@ -323,7 +323,7 @@ void read_client_leases ()
>   
>   	/* Open the lease file.   If we can't open it, just return -
>   	   we can safely trust the server to remember our state. */
> @@ -19,10 +19,10 @@ diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-
> 4.2.2b1/client/clparse.c
>   		return;
>   
>   	cfile = NULL;
> -diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
> ---- dhcp-4.2.2b1/client/dhclient.c.cloexec	2011-07-01
> 14:13:30.970887717 +0200
> -+++ dhcp-4.2.2b1/client/dhclient.c	2011-07-01 14:16:51.485930388 +0200
> -@@ -148,11 +148,11 @@ main(int argc, char **argv) {
> +diff -up dhcp-4.3.3b1/client/dhclient.c.cloexec dhcp-
> 4.3.3b1/client/dhclient.c
> +--- dhcp-4.3.3b1/client/dhclient.c.cloexec	2015-08-10
> 10:46:20.260755556 +0200
> ++++ dhcp-4.3.3b1/client/dhclient.c	2015-08-10 10:46:20.275755506 +0200
> +@@ -153,11 +153,11 @@ main(int argc, char **argv) {
>   	/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
>   	   2 (stderr) are open. To do this, we assume that when we
>   	   open a file the lowest available file descriptor is used. */
> @@ -37,16 +37,16 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   	if (fd == 2)
>   		log_perror = 0; /* No sense logging to /dev/null. */
>   	else if (fd != -1)
> -@@ -506,7 +506,7 @@ main(int argc, char **argv) {
> +@@ -519,7 +519,7 @@ main(int argc, char **argv) {
> + 		long temp;
>   		int e;
>   
> - 		oldpid = 0;
>  -		if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
>  +		if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
>   			e = fscanf(pidfd, "%ld\n", &temp);
>   			oldpid = (pid_t)temp;
>   
> -@@ -548,7 +548,7 @@ main(int argc, char **argv) {
> +@@ -574,7 +574,7 @@ main(int argc, char **argv) {
>   					strncpy(new_path_dhclient_pid,
> path_dhclient_pid, pfx);
>   					sprintf(new_path_dhclient_pid + pfx,
> "-%s.pid", ip->name);
>   
> @@ -55,7 +55,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   						e = fscanf(pidfd, "%ld\n",
> &temp);
>   						oldpid = (pid_t)temp;
>   
> -@@ -573,7 +573,7 @@ main(int argc, char **argv) {
> +@@ -599,7 +599,7 @@ main(int argc, char **argv) {
>   		int dhc_running = 0;
>   		char procfn[256] = "";
>   
> @@ -64,7 +64,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   			if ((fscanf(pidfp, "%ld", &temp)==1) &&
> ((dhcpid=(pid_t)temp) > 0)) {
>   				snprintf(procfn,256,"/proc/%u",dhcpid);
>   				dhc_running = (access(procfn, F_OK) == 0);
> -@@ -2995,7 +2995,7 @@ void rewrite_client_leases ()
> +@@ -3120,7 +3120,7 @@ void rewrite_client_leases ()
>   
>   	if (leaseFile != NULL)
>   		fclose (leaseFile);
> @@ -73,7 +73,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   	if (leaseFile == NULL) {
>   		log_error ("can't create %s: %m", path_dhclient_db);
>   		return;
> -@@ -3105,7 +3105,7 @@ write_duid(struct data_string *duid)
> +@@ -3313,7 +3313,7 @@ write_duid(struct data_string *duid)
>   		return DHCP_R_INVALIDARG;
>   
>   	if (leaseFile == NULL) {	/* XXX? */
> @@ -82,7 +82,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   		if (leaseFile == NULL) {
>   			log_error("can't create %s: %m", path_dhclient_db);
>   			return ISC_R_IOERROR;
> -@@ -3285,7 +3285,7 @@ int write_client_lease (client, lease, r
> +@@ -3493,7 +3493,7 @@ int write_client_lease (client, lease, r
>   		return 1;
>   
>   	if (leaseFile == NULL) {	/* XXX */
> @@ -91,20 +91,20 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   		if (leaseFile == NULL) {
>   			log_error ("can't create %s: %m", path_dhclient_db);
>   			return 0;
> -@@ -3772,9 +3772,9 @@ void go_daemon ()
> - 	close(2);
> +@@ -4011,9 +4011,9 @@ void go_daemon ()
> + 	(void) close(2);
>   
>   	/* Reopen them on /dev/null. */
> --	open("/dev/null", O_RDWR);
> --	open("/dev/null", O_RDWR);
> --	open("/dev/null", O_RDWR);
> -+	open("/dev/null", O_RDWR | O_CLOEXEC);
> -+	open("/dev/null", O_RDWR | O_CLOEXEC);
> -+	open("/dev/null", O_RDWR | O_CLOEXEC);
> +-	(void) open("/dev/null", O_RDWR);
> +-	(void) open("/dev/null", O_RDWR);
> +-	(void) open("/dev/null", O_RDWR);
> ++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
> ++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
> ++	(void) open("/dev/null", O_RDWR | O_CLOEXEC);
>   
>   	write_client_pid_file ();
>   
> -@@ -3791,14 +3791,14 @@ void write_client_pid_file ()
> +@@ -4030,14 +4030,14 @@ void write_client_pid_file ()
>   		return;
>   	}
>   
> @@ -121,10 +121,10 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-
> 4.2.2b1/client/dhclient.c
>   	if (!pf) {
>   		close(pfdesc);
>   		log_error ("Can't fdopen %s: %m", path_dhclient_pid);
> -diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
> ---- dhcp-4.2.2b1/common/bpf.c.cloexec	2011-07-01 14:13:30.976887712
> +0200
> -+++ dhcp-4.2.2b1/common/bpf.c	2011-07-01 14:13:31.030887673 +0200
> -@@ -94,7 +94,7 @@ int if_register_bpf (info)
> +diff -up dhcp-4.3.3b1/common/bpf.c.cloexec dhcp-4.3.3b1/common/bpf.c
> +--- dhcp-4.3.3b1/common/bpf.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/common/bpf.c	2015-08-10 10:46:20.275755506 +0200
> +@@ -95,7 +95,7 @@ int if_register_bpf (info)
>   	for (b = 0; 1; b++) {
>   		/* %Audit% 31 bytes max. %2004.06.17,Safe% */
>   		sprintf(filename, BPF_FORMAT, b);
> @@ -133,10 +133,10 @@ diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-
> 4.2.2b1/common/bpf.c
>   		if (sock < 0) {
>   			if (errno == EBUSY) {
>   				continue;
> -diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
> ---- dhcp-4.2.2b1/common/dlpi.c.cloexec	2011-07-01 14:13:30.977887712
> +0200
> -+++ dhcp-4.2.2b1/common/dlpi.c	2011-07-01 14:13:31.032887673 +0200
> -@@ -806,7 +806,7 @@ dlpiopen(const char *ifname) {
> +diff -up dhcp-4.3.3b1/common/dlpi.c.cloexec dhcp-4.3.3b1/common/dlpi.c
> +--- dhcp-4.3.3b1/common/dlpi.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/common/dlpi.c	2015-08-10 10:46:20.275755506 +0200
> +@@ -804,7 +804,7 @@ dlpiopen(const char *ifname) {
>   	}
>   	*dp = '\0';
>   	
> @@ -145,10 +145,10 @@ diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-
> 4.2.2b1/common/dlpi.c
>   }
>   
>   /*
> -diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
> ---- dhcp-4.2.2b1/common/nit.c.cloexec	2011-07-01 14:13:30.978887712
> +0200
> -+++ dhcp-4.2.2b1/common/nit.c	2011-07-01 14:13:31.033887672 +0200
> -@@ -81,7 +81,7 @@ int if_register_nit (info)
> +diff -up dhcp-4.3.3b1/common/nit.c.cloexec dhcp-4.3.3b1/common/nit.c
> +--- dhcp-4.3.3b1/common/nit.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/common/nit.c	2015-08-10 10:46:20.275755506 +0200
> +@@ -75,7 +75,7 @@ int if_register_nit (info)
>   	struct strioctl sio;
>   
>   	/* Open a NIT device */
> @@ -157,10 +157,10 @@ diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-
> 4.2.2b1/common/nit.c
>   	if (sock < 0)
>   		log_fatal ("Can't open NIT device for %s: %m", info ->
> name);
>   
> -diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
> ---- dhcp-4.2.2b1/common/resolv.c.cloexec	2009-11-20 02:49:01.000000000
> +0100
> -+++ dhcp-4.2.2b1/common/resolv.c	2011-07-01 14:13:31.033887672 +0200
> -@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
> +diff -up dhcp-4.3.3b1/common/resolv.c.cloexec dhcp-4.3.3b1/common/resolv.c
> +--- dhcp-4.3.3b1/common/resolv.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/common/resolv.c	2015-08-10 10:46:20.276755503 +0200
> +@@ -44,7 +44,7 @@ void read_resolv_conf (parse_time)
>   	struct domain_search_list *dp, *dl, *nd;
>   	isc_result_t status;
>   
> @@ -169,10 +169,10 @@ diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-
> 4.2.2b1/common/resolv.c
>   		log_error ("Can't open %s: %m", path_resolv_conf);
>   		return;
>   	}
> -diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
> ---- dhcp-4.2.2b1/common/upf.c.cloexec	2011-07-01 14:13:30.979887712
> +0200
> -+++ dhcp-4.2.2b1/common/upf.c	2011-07-01 14:13:31.034887671 +0200
> -@@ -77,7 +77,7 @@ int if_register_upf (info)
> +diff -up dhcp-4.3.3b1/common/upf.c.cloexec dhcp-4.3.3b1/common/upf.c
> +--- dhcp-4.3.3b1/common/upf.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/common/upf.c	2015-08-10 10:46:20.276755503 +0200
> +@@ -71,7 +71,7 @@ int if_register_upf (info)
>   		/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
>   		sprintf(filename, "/dev/pf/pfilt%d", b);
>   
> @@ -181,10 +181,10 @@ diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-
> 4.2.2b1/common/upf.c
>   		if (sock < 0) {
>   			if (errno == EBUSY) {
>   				continue;
> -diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
> ---- dhcp-4.2.2b1/omapip/trace.c.cloexec	2010-05-27 02:34:57.000000000
> +0200
> -+++ dhcp-4.2.2b1/omapip/trace.c	2011-07-01 14:13:31.036887669 +0200
> -@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi
> +diff -up dhcp-4.3.3b1/omapip/trace.c.cloexec dhcp-4.3.3b1/omapip/trace.c
> +--- dhcp-4.3.3b1/omapip/trace.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/omapip/trace.c	2015-08-10 10:46:20.276755503 +0200
> +@@ -138,10 +138,10 @@ isc_result_t trace_begin (const char *fi
>   		return DHCP_R_INVALIDARG;
>   	}
>   
> @@ -197,7 +197,7 @@ diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-
> 4.2.2b1/omapip/trace.c
>   				     0600);
>   	}
>   
> -@@ -431,7 +431,7 @@ void trace_file_replay (const char *file
> +@@ -429,7 +429,7 @@ void trace_file_replay (const char *file
>   	isc_result_t result;
>   	int len;
>   
> @@ -206,10 +206,10 @@ diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-
> 4.2.2b1/omapip/trace.c
>   	if (!traceinfile) {
>   		log_error("Can't open tracefile %s: %m", filename);
>   		return;
> -diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
> ---- dhcp-4.2.2b1/relay/dhcrelay.c.cloexec	2011-05-10
> 15:07:37.000000000 +0200
> -+++ dhcp-4.2.2b1/relay/dhcrelay.c	2011-07-01 14:18:07.630209767 +0200
> -@@ -183,11 +183,11 @@ main(int argc, char **argv) {
> +diff -up dhcp-4.3.3b1/relay/dhcrelay.c.cloexec dhcp-4.3.3b1/relay/dhcrelay.c
> +--- dhcp-4.3.3b1/relay/dhcrelay.c.cloexec	2015-07-30
> 15:17:16.000000000 +0200
> ++++ dhcp-4.3.3b1/relay/dhcrelay.c	2015-08-10 10:46:20.276755503 +0200
> +@@ -187,11 +187,11 @@ main(int argc, char **argv) {
>   	/* Make sure that file descriptors 0(stdin), 1,(stdout), and
>   	   2(stderr) are open. To do this, we assume that when we
>   	   open a file the lowest available file descriptor is used. */
> @@ -224,7 +224,7 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-
> 4.2.2b1/relay/dhcrelay.c
>   	if (fd == 2)
>   		log_perror = 0; /* No sense logging to /dev/null. */
>   	else if (fd != -1)
> -@@ -540,13 +540,13 @@ main(int argc, char **argv) {
> +@@ -558,13 +558,13 @@ main(int argc, char **argv) {
>   
>   		if (no_pid_file == ISC_FALSE) {
>   			pfdesc = open(path_dhcrelay_pid,
> @@ -240,10 +240,10 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-
> 4.2.2b1/relay/dhcrelay.c
>   				if (!pf)
>   					log_error("Can't fdopen %s: %m",
>   						  path_dhcrelay_pid);
> -diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-
> 4.2.2b1/server/confpars.c
> ---- dhcp-4.2.2b1/server/confpars.c.cloexec	2010-10-14
> 00:34:45.000000000 +0200
> -+++ dhcp-4.2.2b1/server/confpars.c	2011-07-01 14:13:31.039887666 +0200
> -@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char 
> +diff -up dhcp-4.3.3b1/server/confpars.c.cloexec dhcp-
> 4.3.3b1/server/confpars.c
> +--- dhcp-4.3.3b1/server/confpars.c.cloexec	2015-07-30
> 15:17:16.000000000 +0200
> ++++ dhcp-4.3.3b1/server/confpars.c	2015-08-10 10:46:20.277755500 +0200
> +@@ -111,7 +111,7 @@ isc_result_t read_conf_file (const char
>   	}
>   #endif
>   
> @@ -252,10 +252,10 @@ diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-
> 4.2.2b1/server/confpars.c
>   		if (leasep) {
>   			log_error ("Can't open lease database %s: %m --",
>   				   path_dhcpd_db);
> -diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
> ---- dhcp-4.2.2b1/server/db.c.cloexec	2010-09-14 00:15:26.000000000
> +0200
> -+++ dhcp-4.2.2b1/server/db.c	2011-07-01 14:13:31.040887665 +0200
> -@@ -1035,7 +1035,7 @@ void db_startup (testp)
> +diff -up dhcp-4.3.3b1/server/db.c.cloexec dhcp-4.3.3b1/server/db.c
> +--- dhcp-4.3.3b1/server/db.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/server/db.c	2015-08-10 10:47:32.644518358 +0200
> +@@ -1072,7 +1072,7 @@ void db_startup (testp)
>   	}
>   #endif
>   	if (!testp) {
> @@ -264,7 +264,7 @@ diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-
> 4.2.2b1/server/db.c
>   		if (!db_file)
>   			log_fatal ("Can't open %s for append.",
> path_dhcpd_db);
>   		expire_all_pools ();
> -@@ -1083,12 +1083,12 @@ int new_lease_file ()
> +@@ -1120,7 +1120,7 @@ int new_lease_file ()
>   		     path_dhcpd_db, (int)t) >= sizeof newfname)
>   		log_fatal("new_lease_file: lease file path too long");
>   
> @@ -273,16 +273,19 @@ diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-
> 4.2.2b1/server/db.c
>   	if (db_fd < 0) {
>   		log_error ("Can't create new lease file: %m");
>   		return 0;
> +@@ -1141,7 +1141,7 @@ int new_lease_file ()
>   	}
> + #endif /* PARANOIA */
> + 
>  -	if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
>  +	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
>   		log_error("Can't fdopen new lease file: %m");
>   		close(db_fd);
>   		goto fdfail;
> -diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
> ---- dhcp-4.2.2b1/server/dhcpd.c.cloexec	2011-04-21 16:08:15.000000000
> +0200
> -+++ dhcp-4.2.2b1/server/dhcpd.c	2011-07-01 14:19:40.354124505 +0200
> -@@ -270,11 +270,11 @@ main(int argc, char **argv) {
> +diff -up dhcp-4.3.3b1/server/dhcpd.c.cloexec dhcp-4.3.3b1/server/dhcpd.c
> +--- dhcp-4.3.3b1/server/dhcpd.c.cloexec	2015-07-30 15:17:16.000000000
> +0200
> ++++ dhcp-4.3.3b1/server/dhcpd.c	2015-08-10 10:46:20.278755497 +0200
> +@@ -194,11 +194,11 @@ main(int argc, char **argv) {
>           /* Make sure that file descriptors 0 (stdin), 1, (stdout), and
>              2 (stderr) are open. To do this, we assume that when we
>              open a file the lowest available file descriptor is used. */
> @@ -297,41 +300,32 @@ diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-
> 4.2.2b1/server/dhcpd.c
>           if (fd == 2)
>                   log_perror = 0; /* No sense logging to /dev/null. */
>           else if (fd != -1)
> -@@ -793,7 +793,7 @@ main(int argc, char **argv) {
> +@@ -743,7 +743,7 @@ main(int argc, char **argv) {
> + 	 * appropriate.
>   	 */
>   	if (no_pid_file == ISC_FALSE) {
> - 		/*Read previous pid file. */
> --		if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
> -+		if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0)
> {
> - 			status = read(i, pbuf, (sizeof pbuf) - 1);
> - 			close (i);
> - 			if (status > 0) {
> -@@ -812,7 +812,7 @@ main(int argc, char **argv) {
> - 		}
> - 
> - 		/* Write new pid file. */
>  -		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644);
>  +		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC,
> 0644);
>   		if (i >= 0) {
>   			sprintf(pbuf, "%d\n", (int) getpid());
> - 			IGNORE_RET (write(i, pbuf, strlen(pbuf)));
> -@@ -840,9 +840,9 @@ main(int argc, char **argv) {
> -                 close(2);
> + 			IGNORE_RET(write(i, pbuf, strlen(pbuf)));
> +@@ -787,9 +787,9 @@ main(int argc, char **argv) {
> +                 (void) close(2);
>   
>                   /* Reopen them on /dev/null. */
> --                open("/dev/null", O_RDWR);
> --                open("/dev/null", O_RDWR);
> --                open("/dev/null", O_RDWR);
> -+                open("/dev/null", O_RDWR | O_CLOEXEC);
> -+                open("/dev/null", O_RDWR | O_CLOEXEC);
> -+                open("/dev/null", O_RDWR | O_CLOEXEC);
> +-                (void) open("/dev/null", O_RDWR);
> +-                (void) open("/dev/null", O_RDWR);
> +-                (void) open("/dev/null", O_RDWR);
> ++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
> ++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
> ++                (void) open("/dev/null", O_RDWR | O_CLOEXEC);
>                   log_perror = 0; /* No sense logging to /dev/null. */
>   
>          		IGNORE_RET (chdir("/"));
> -diff -up dhcp-4.2.2b1/server/ldap.c.cloexec dhcp-4.2.2b1/server/ldap.c
> ---- dhcp-4.2.2b1/server/ldap.c.cloexec	2010-03-25 16:26:58.000000000
> +0100
> -+++ dhcp-4.2.2b1/server/ldap.c	2011-07-01 14:13:31.043887665 +0200
> -@@ -685,7 +685,7 @@ ldap_start (void)
> +diff -up dhcp-4.3.3b1/server/ldap.c.cloexec dhcp-4.3.3b1/server/ldap.c
> +--- dhcp-4.3.3b1/server/ldap.c.cloexec	2015-07-30 21:03:40.000000000
> +0200
> ++++ dhcp-4.3.3b1/server/ldap.c	2015-08-10 10:46:20.279755493 +0200
> +@@ -1442,7 +1442,7 @@ ldap_start (void)
>   
>     if (ldap_debug_file != NULL && ldap_debug_fd == -1)
>       {
> diff --git a/dhcp/patches/0012-dhcp-garbage-chars.patch b/dhcp/patches/0012-
> dhcp-garbage-chars.patch
> new file mode 100644
> index 0000000..131360b
> --- /dev/null
> +++ b/dhcp/patches/0012-dhcp-garbage-chars.patch
> @@ -0,0 +1,12 @@
> +diff -up dhcp-4.3.0rc1/common/tables.c.garbage dhcp-4.3.0rc1/common/tables.c
> +--- dhcp-4.3.0rc1/common/tables.c.garbage	2014-01-29
> 10:03:52.132624677 +0100
> ++++ dhcp-4.3.0rc1/common/tables.c	2014-01-29 10:04:51.413875343 +0100
> +@@ -213,7 +213,7 @@ static struct option dhcp_options[] = {
> + 	{ "name-service-search", "Sa",		&dhcp_universe, 117, 1
> },
> + #endif
> + 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
> +-	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
> ++	{ "domain-search", "D",			&dhcp_universe, 119,
> 1 },
> + 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1
> },
> + 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1
> },
> + #if 0
> diff --git a/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
> b/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
> new file mode 100644
> index 0000000..103824c
> --- /dev/null
> +++ b/dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch
> @@ -0,0 +1,14 @@
> +diff -up dhcp-4.3.0a1/common/dispatch.c.dracut dhcp-4.3.0a1/common/dispatch.c
> +--- dhcp-4.3.0a1/common/dispatch.c.dracut	2013-12-11
> 01:25:12.000000000 +0100
> ++++ dhcp-4.3.0a1/common/dispatch.c	2013-12-19 15:39:50.350505860 +0100
> +@@ -210,6 +210,10 @@ void add_timeout (when, where, what, ref
> + 	isc_interval_t interval;
> + 	isc_time_t expires;
> + 
> ++	if (when == NULL) {
> ++		return;
> ++	}
> ++
> + 	/* See if this timeout supersedes an existing timeout. */
> + 	t = (struct timeout *)0;
> + 	for (q = timeouts; q; q = q->next) {
> diff --git a/dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch
> b/dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
> similarity index 51%
> rename from dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch
> rename to dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
> index c1b978b..a07b5b0 100644
> --- a/dhcp/patches/dhcp-4.2.4-64_bit_lease_parse.patch
> +++ b/dhcp/patches/0014-dhcp-64_bit_lease_parse.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-
> 4.2.4b1/common/parse.c
> ---- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse	2012-03-09
> 12:28:10.000000000 +0100
> -+++ dhcp-4.2.4b1/common/parse.c	2012-04-16 17:30:55.867045149 +0200
> -@@ -906,8 +906,8 @@ TIME
> +diff -up dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse dhcp-
> 4.3.0a1/common/parse.c
> +--- dhcp-4.3.0a1/common/parse.c.64-bit_lease_parse	2013-12-11
> 01:25:12.000000000 +0100
> ++++ dhcp-4.3.0a1/common/parse.c	2013-12-19 15:45:25.990771814 +0100
> +@@ -938,8 +938,8 @@ TIME
>   parse_date_core(cfile)
>   	struct parse *cfile;
>   {
> @@ -12,16 +12,16 @@ diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse
> dhcp-4.2.4b1/common/pars
>   	const char *val;
>   	enum dhcp_token token;
>   	static int months[11] = { 31, 59, 90, 120, 151, 181,
> -@@ -933,7 +933,7 @@ parse_date_core(cfile)
> +@@ -965,7 +965,7 @@ parse_date_core(cfile)
>   		}
>   
> - 		token = next_token(&val, NULL, cfile); /* consume number */
> + 		skip_token(&val, NULL, cfile); /* consume number */
>  -		guess = atoi(val);
>  +		guess = atol(val);
>   
>   		return((TIME)guess);
>   	}
> -@@ -961,7 +961,7 @@ parse_date_core(cfile)
> +@@ -993,7 +993,7 @@ parse_date_core(cfile)
>   	   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. */
> @@ -30,55 +30,46 @@ diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse
> dhcp-4.2.4b1/common/pars
>   	if (year > 1900)
>   		year -= 1900;
>   
> -@@ -985,7 +985,7 @@ parse_date_core(cfile)
> +@@ -1039,7 +1039,7 @@ parse_date_core(cfile)
>   		return((TIME)0);
>   	}
> - 	token = next_token(&val, NULL, cfile); /* consume month */	
> --	mon = atoi(val) - 1;
> -+	mon = atol(val) - 1;
> - 
> - 	/* Slash separating month from day... */
> - 	token = peek_token(&val, NULL, cfile);
> -@@ -1007,7 +1007,7 @@ parse_date_core(cfile)
> - 		return((TIME)0);
> - 	}
> - 	token = next_token(&val, NULL, cfile); /* consume day of month */
> + 	skip_token(&val, NULL, cfile); /* consume day of month */
>  -	mday = atoi(val);
>  +	mday = atol(val);
>   
>   	/* Hour... */
>   	token = peek_token(&val, NULL, cfile);
> -@@ -1018,7 +1018,7 @@ parse_date_core(cfile)
> +@@ -1050,7 +1050,7 @@ parse_date_core(cfile)
>   		return((TIME)0);
>   	}
> - 	token = next_token(&val, NULL, cfile); /* consume hour */
> + 	skip_token(&val, NULL, cfile); /* consume hour */
>  -	hour = atoi(val);
>  +	hour = atol(val);
>   
>   	/* Colon separating hour from minute... */
>   	token = peek_token(&val, NULL, cfile);
> -@@ -1040,7 +1040,7 @@ parse_date_core(cfile)
> +@@ -1072,7 +1072,7 @@ parse_date_core(cfile)
>   		return((TIME)0);
>   	}
> - 	token = next_token(&val, NULL, cfile); /* consume minute */
> + 	skip_token(&val, NULL, cfile); /* consume minute */
>  -	min = atoi(val);
>  +	min = atol(val);
>   
>   	/* Colon separating minute from second... */
>   	token = peek_token(&val, NULL, cfile);
> -@@ -1062,13 +1062,13 @@ parse_date_core(cfile)
> +@@ -1094,13 +1094,13 @@ parse_date_core(cfile)
>   		return((TIME)0);
>   	}
> - 	token = next_token(&val, NULL, cfile); /* consume second */
> + 	skip_token(&val, NULL, cfile); /* consume second */
>  -	sec = atoi(val);
>  +	sec = atol(val);
>   
>   	tzoff = 0;
>   	token = peek_token(&val, NULL, cfile);
>   	if (token == NUMBER) {
> - 		token = next_token(&val, NULL, cfile); /* consume tzoff */
> + 		skip_token(&val, NULL, cfile); /* consume tzoff */
>  -		tzoff = atoi(val);
>  +		tzoff = atol(val);
>   	} else if (token != SEMI) {
> - 		token = next_token(&val, NULL, cfile);
> + 		skip_token(&val, NULL, cfile);
>   		parse_warn(cfile,
> diff --git a/dhcp/patches/dhcp-4.2.2-capability.patch b/dhcp/patches/0015-
> dhcp-capability.patch
> similarity index 64%
> rename from dhcp/patches/dhcp-4.2.2-capability.patch
> rename to dhcp/patches/0015-dhcp-capability.patch
> index db2fb38..4572c34 100644
> --- a/dhcp/patches/dhcp-4.2.2-capability.patch
> +++ b/dhcp/patches/0015-dhcp-capability.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-
> 4.2.2b1/client/dhclient.8
> ---- dhcp-4.2.2b1/client/dhclient.8.capability	2011-07-01
> 15:09:06.603784531 +0200
> -+++ dhcp-4.2.2b1/client/dhclient.8	2011-07-01 15:09:06.663783913 +0200
> -@@ -118,6 +118,9 @@ dhclient - Dynamic Host Configuration Pr
> +diff -up dhcp-4.3.4/client/dhclient.8.capability dhcp-4.3.4/client/dhclient.8
> +--- dhcp-4.3.4/client/dhclient.8.capability	2016-04-29
> 12:19:40.657129322 +0200
> ++++ dhcp-4.3.4/client/dhclient.8	2016-04-29 12:19:40.715129297 +0200
> +@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Pr
>   .B -w
>   ]
>   [
> @@ -11,7 +11,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-
> 4.2.2b1/client/dhclient.
>   .B -B
>   ]
>   [
> -@@ -296,6 +299,32 @@ has been added or removed, so that the c
> +@@ -318,6 +321,32 @@ has been added or removed, so that the c
>   address on that interface.
>   
>   .TP
> @@ -44,11 +44,11 @@ diff -up dhcp-4.2.2b1/client/dhclient.8.capability dhcp-
> 4.2.2b1/client/dhclient.
>   .BI \-B
>   Set the BOOTP broadcast flag in request packets so servers will always
>   broadcast replies.
> -diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-
> 4.2.2b1/client/dhclient.c
> ---- dhcp-4.2.2b1/client/dhclient.c.capability	2011-07-01
> 15:09:06.644784107 +0200
> -+++ dhcp-4.2.2b1/client/dhclient.c	2011-07-01 15:09:06.664783903 +0200
> -@@ -39,6 +39,10 @@
> - #include <limits.h>
> +diff -up dhcp-4.3.4/client/dhclient.c.capability dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.capability	2016-04-29
> 12:19:40.691129307 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:21:07.620091930 +0200
> +@@ -40,6 +40,10 @@
> + #include <isc/file.h>
>   #include <dns/result.h>
>   
>  +#ifdef HAVE_LIBCAP_NG
> @@ -58,7 +58,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-
> 4.2.2b1/client/dhclient.
>   /*
>    * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
>    * that when building ISC code.
> -@@ -141,6 +145,9 @@ main(int argc, char **argv) {
> +@@ -237,6 +241,9 @@ main(int argc, char **argv) {
>   	int timeout_arg = 0;
>   	char *arg_conf = NULL;
>   	int arg_conf_len = 0;
> @@ -68,7 +68,7 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-
> 4.2.2b1/client/dhclient.
>   
>   	/* Initialize client globals. */
>   	memset(&default_duid, 0, sizeof(default_duid));
> -@@ -410,6 +417,10 @@ main(int argc, char **argv) {
> +@@ -537,6 +544,10 @@ main(int argc, char **argv) {
>   			}
>   
>   			dhclient_request_options = argv[i];
> @@ -77,9 +77,9 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-
> 4.2.2b1/client/dhclient.
>  +			keep_capabilities = 1;
>  +#endif
>   		} else if (argv[i][0] == '-') {
> - 		    usage();
> + 			usage("Unknown command: %s", argv[i]);
>   		} else if (interfaces_requested < 0) {
> -@@ -458,6 +469,19 @@ main(int argc, char **argv) {
> +@@ -597,6 +608,19 @@ main(int argc, char **argv) {
>   		path_dhclient_script = s;
>   	}
>   
> @@ -99,10 +99,10 @@ diff -up dhcp-4.2.2b1/client/dhclient.c.capability dhcp-
> 4.2.2b1/client/dhclient.
>   	/* Set up the initial dhcp option universe. */
>   	initialize_common_option_spaces();
>   
> -diff -up dhcp-4.2.2b1/client/dhclient-script.8.capability dhcp-
> 4.2.2b1/client/dhclient-script.8
> ---- dhcp-4.2.2b1/client/dhclient-script.8.capability	2011-07-01
> 15:09:06.604784521 +0200
> -+++ dhcp-4.2.2b1/client/dhclient-script.8	2011-07-01
> 15:09:06.666783883 +0200
> -@@ -239,6 +239,16 @@ repeatedly initialized to the values pro
> +diff -up dhcp-4.3.4/client/dhclient-script.8.capability dhcp-
> 4.3.4/client/dhclient-script.8
> +--- dhcp-4.3.4/client/dhclient-script.8.capability	2016-04-29
> 12:19:40.668129317 +0200
> ++++ dhcp-4.3.4/client/dhclient-script.8	2016-04-29 12:19:40.717129296
> +0200
> +@@ -243,6 +243,16 @@ repeatedly initialized to the values pro
>   the other.   Assuming the information provided by both servers is
>   valid, this shouldn't cause any real problems, but it could be
>   confusing.
> @@ -119,22 +119,22 @@ diff -up dhcp-4.2.2b1/client/dhclient-
> script.8.capability dhcp-4.2.2b1/client/dh
>   .SH SEE ALSO
>   dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
>   dhclient.leases(5).
> -diff -up dhcp-4.2.2b1/client/Makefile.am.capability dhcp-
> 4.2.2b1/client/Makefile.am
> ---- dhcp-4.2.2b1/client/Makefile.am.capability	2011-07-01
> 15:09:06.526785327 +0200
> -+++ dhcp-4.2.2b1/client/Makefile.am	2011-07-01 15:09:06.667783873
> +0200
> -@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c 
> +diff -up dhcp-4.3.4/client/Makefile.am.capability dhcp-
> 4.3.4/client/Makefile.am
> +--- dhcp-4.3.4/client/Makefile.am.capability	2016-04-29
> 12:19:40.652129324 +0200
> ++++ dhcp-4.3.4/client/Makefile.am	2016-04-29 12:19:40.717129296 +0200
> +@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
> + 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos
> \
>   		   scripts/netbsd scripts/nextstep scripts/openbsd \
>   		   scripts/solaris scripts/openwrt
> - dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --		 $(BIND9_LIBDIR) -ldns-export -lisc-export
> -+		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
> +-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> ++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
> + 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
>   man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
>   EXTRA_DIST = $(man_MANS)
> - 
> -diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-4.2.2b1/configure.ac
> ---- dhcp-4.2.2b1/configure.ac.capability	2011-07-01 15:09:06.527785317
> +0200
> -+++ dhcp-4.2.2b1/configure.ac	2011-07-01 15:09:06.667783873 +0200
> -@@ -449,6 +449,41 @@ AC_TRY_LINK(
> +diff -up dhcp-4.3.4/configure.ac.capability dhcp-4.3.4/configure.ac
> +--- dhcp-4.3.4/configure.ac.capability	2016-04-29 12:19:40.652129324
> +0200
> ++++ dhcp-4.3.4/configure.ac	2016-04-29 12:19:40.717129296 +0200
> +@@ -585,6 +585,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
>   # Look for optional headers.
>   AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
>   
> @@ -176,12 +176,12 @@ diff -up dhcp-4.2.2b1/configure.ac.capability dhcp-
> 4.2.2b1/configure.ac
>   # Solaris needs some libraries for functions
>   AC_SEARCH_LIBS(socket, [socket])
>   AC_SEARCH_LIBS(inet_ntoa, [nsl])
> -diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-
> 4.2.2b1/relay/dhcrelay.c
> ---- dhcp-4.2.2b1/relay/dhcrelay.c.capability	2011-07-01
> 15:09:06.626784295 +0200
> -+++ dhcp-4.2.2b1/relay/dhcrelay.c	2011-07-01 15:12:05.362223794 +0200
> -@@ -36,6 +36,11 @@
> - #include <syslog.h>
> +diff -up dhcp-4.3.4/relay/dhcrelay.c.capability dhcp-4.3.4/relay/dhcrelay.c
> +--- dhcp-4.3.4/relay/dhcrelay.c.capability	2016-04-29
> 12:19:40.694129306 +0200
> ++++ dhcp-4.3.4/relay/dhcrelay.c	2016-04-29 12:22:30.278056386 +0200
> +@@ -32,6 +32,11 @@
>   #include <sys/time.h>
> + #include <isc/file.h>
>   
>  +#ifdef HAVE_LIBCAP_NG
>  +#  include <cap-ng.h>
> @@ -191,9 +191,9 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-
> 4.2.2b1/relay/dhcrelay.c
>   TIME default_lease_time = 43200; /* 12 hours... */
>   TIME max_lease_time = 86400; /* 24 hours... */
>   struct tree_cache *global_options[256];
> -@@ -356,6 +361,10 @@ main(int argc, char **argv) {
> - 			sl->next = upstreams;
> - 			upstreams = sl;
> +@@ -454,6 +459,10 @@ main(int argc, char **argv) {
> + 				usage(use_noarg, argv[i-1]);
> + 			dhcrelay_sub_id = argv[i];
>   #endif
>  +		} else if (!strcmp(argv[i], "-nc")) {
>  +#ifdef HAVE_LIBCAP_NG
> @@ -201,8 +201,8 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-
> 4.2.2b1/relay/dhcrelay.c
>  +#endif
>   		} else if (!strcmp(argv[i], "-pf")) {
>   			if (++i == argc)
> - 				usage();
> -@@ -426,6 +435,17 @@ main(int argc, char **argv) {
> + 				usage(use_noarg, argv[i-1]);
> +@@ -528,6 +537,17 @@ main(int argc, char **argv) {
>   #endif
>   	}
>   
> @@ -220,8 +220,8 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-
> 4.2.2b1/relay/dhcrelay.c
>   	if (!quiet) {
>   		log_info("%s %s", message, PACKAGE_VERSION);
>   		log_info(copyright);
> -@@ -573,6 +593,15 @@ main(int argc, char **argv) {
> - 		dhcpv6_packet_handler = do_packet6;
> +@@ -680,6 +700,15 @@ main(int argc, char **argv) {
> + 	signal(SIGTERM, dhcp_signal_handler);  /* kill */
>   #endif
>   
>  +#ifdef HAVE_LIBCAP_NG
> @@ -236,15 +236,15 @@ diff -up dhcp-4.2.2b1/relay/dhcrelay.c.capability dhcp-
> 4.2.2b1/relay/dhcrelay.c
>   	/* Start dispatching packets and timeouts... */
>   	dispatch();
>   
> -diff -up dhcp-4.2.2b1/relay/Makefile.am.capability dhcp-
> 4.2.2b1/relay/Makefile.am
> ---- dhcp-4.2.2b1/relay/Makefile.am.capability	2011-07-01
> 15:09:06.546785121 +0200
> -+++ dhcp-4.2.2b1/relay/Makefile.am	2011-07-01 15:09:06.670783841 +0200
> -@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
> +diff -up dhcp-4.3.4/relay/Makefile.am.capability dhcp-4.3.4/relay/Makefile.am
> +--- dhcp-4.3.4/relay/Makefile.am.capability	2016-04-29
> 12:19:40.653129323 +0200
> ++++ dhcp-4.3.4/relay/Makefile.am	2016-04-29 12:19:40.718129295 +0200
> +@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
> + 
>   sbin_PROGRAMS = dhcrelay
>   dhcrelay_SOURCES = dhcrelay.c
> - dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --		 $(BIND9_LIBDIR) -ldns-export -lisc-export
> -+		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
> +-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> ++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la $(CAPNG_LDADD) \
> + 		 $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export
> -lisc-export
>   man_MANS = dhcrelay.8
>   EXTRA_DIST = $(man_MANS)
> - 
> diff --git a/dhcp/patches/dhcp-4.2.5-sendDecline.patch b/dhcp/patches/0016-
> dhcp-sendDecline.patch
> similarity index 88%
> rename from dhcp/patches/dhcp-4.2.5-sendDecline.patch
> rename to dhcp/patches/0016-dhcp-sendDecline.patch
> index 0853730..ede9298 100644
> --- a/dhcp/patches/dhcp-4.2.5-sendDecline.patch
> +++ b/dhcp/patches/0016-dhcp-sendDecline.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-4.2.5b1/client/dhc6.c
> ---- dhcp-4.2.5b1/client/dhc6.c.sendDecline	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/client/dhc6.c	2012-12-17 13:21:16.922444939 +0100
> -@@ -96,6 +96,8 @@ void do_select6(void *input);
> +diff -up dhcp-4.3.4/client/dhc6.c.sendDecline dhcp-4.3.4/client/dhc6.c
> +--- dhcp-4.3.4/client/dhc6.c.sendDecline	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/client/dhc6.c	2016-05-02 14:51:57.916578401 +0200
> +@@ -115,6 +115,8 @@ void do_select6(void *input);
>   void do_refresh6(void *input);
>   static void do_release6(void *input);
>   static void start_bound(struct client_state *client);
> @@ -10,7 +10,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   static void start_informed(struct client_state *client);
>   void informed_handler(struct packet *packet, struct client_state *client);
>   void bound_handler(struct packet *packet, struct client_state *client);
> -@@ -2080,6 +2082,7 @@ start_release6(struct client_state *clie
> +@@ -2314,6 +2316,7 @@ start_release6(struct client_state *clie
>   	cancel_timeout(do_select6, client);
>   	cancel_timeout(do_refresh6, client);
>   	cancel_timeout(do_release6, client);
> @@ -18,7 +18,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   	client->state = S_STOPPED;
>   
>   	/*
> -@@ -2713,6 +2716,7 @@ dhc6_check_reply(struct client_state *cl
> +@@ -2968,6 +2971,7 @@ dhc6_check_reply(struct client_state *cl
>   		break;
>   
>   	      case S_STOPPED:
> @@ -26,7 +26,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   		action = dhc6_stop_action;
>   		break;
>   
> -@@ -2814,6 +2818,7 @@ dhc6_check_reply(struct client_state *cl
> +@@ -3084,6 +3088,7 @@ dhc6_check_reply(struct client_state *cl
>   		break;
>   
>   	      case S_STOPPED:
> @@ -34,7 +34,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   		/* Nothing critical to do at this stage. */
>   		break;
>   
> -@@ -3804,17 +3809,23 @@ reply_handler(struct packet *packet, str
> +@@ -4214,17 +4219,23 @@ reply_handler(struct packet *packet, str
>   	cancel_timeout(do_select6, client);
>   	cancel_timeout(do_refresh6, client);
>   	cancel_timeout(do_release6, client);
> @@ -66,7 +66,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   		return;
>   	}
>   
> -@@ -4342,7 +4353,11 @@ start_bound(struct client_state *client)
> +@@ -4798,7 +4809,11 @@ start_bound(struct client_state *client)
>   			dhc6_marshall_values("new_", client, lease, ia,
> addr);
>   			script_write_requested6(client);
>   
> @@ -79,7 +79,7 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>   		}
>   
>   		/* XXX: maybe we should loop on the old values instead? */
> -@@ -4390,6 +4405,149 @@ start_bound(struct client_state *client)
> +@@ -4851,6 +4866,149 @@ start_bound(struct client_state *client)
>   	dhc6_check_times(client);
>   }
>   
> @@ -121,8 +121,8 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>  +{
>  +	struct client_state *client;
>  +	struct data_string ds;
> -+	int send_ret;
>  +	struct timeval elapsed, tv;
> ++	int send_ret, added;
>  +
>  +	client = input;
>  +
> @@ -183,13 +183,13 @@ diff -up dhcp-4.2.5b1/client/dhc6.c.sendDecline dhcp-
> 4.2.5b1/client/dhc6.c
>  +	/* Append IA's (but don't release temporary addresses). */
>  +	if (wanted_ia_na &&
>  +	    dhc6_add_ia_na(client, &ds, client->active_lease,
> -+			   DHCPV6_DECLINE) != ISC_R_SUCCESS) {
> ++			   DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
>  +		data_string_forget(&ds, MDL);
>  +		goto decline_done;
>  +	}
>  +	if (wanted_ia_pd &&
>  +	    dhc6_add_ia_pd(client, &ds, client->active_lease,
> -+			   DHCPV6_DECLINE) != ISC_R_SUCCESS) {
> ++			   DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
>  +		data_string_forget(&ds, MDL);
>  +		goto decline_done;
>  +	}
> diff --git a/dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
> b/dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
> similarity index 76%
> rename from dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
> rename to dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
> index 62a2b69..6c3a239 100644
> --- a/dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
> +++ b/dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
> @@ -1,16 +1,16 @@
> -diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
> ---- dhcp-4.2.5b1/client/clparse.c.rfc3442	2012-12-17
> 13:23:34.387564654 +0100
> -+++ dhcp-4.2.5b1/client/clparse.c	2012-12-17 13:23:34.437563996 +0100
> -@@ -37,7 +37,7 @@
> +diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
> +--- dhcp-4.3.4/client/clparse.c.rfc3442	2016-04-29 12:23:34.192032714
> +0200
> ++++ dhcp-4.3.4/client/clparse.c	2016-04-29 12:24:37.531016317 +0200
> +@@ -31,7 +31,7 @@
>   
>   struct client_config top_level_config;
>   
>  -#define NUM_DEFAULT_REQUESTED_OPTS	14
>  +#define NUM_DEFAULT_REQUESTED_OPTS	15
> - struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
> + /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
> + struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 +
> 1];
>   
> - static void parse_client_default_duid(struct parse *cfile);
> -@@ -90,7 +90,11 @@ isc_result_t read_client_conf ()
> +@@ -87,7 +87,11 @@ isc_result_t read_client_conf ()
>   				dhcp_universe.code_hash, &code, 0, MDL);
>   
>   	/* 4 */
> @@ -23,7 +23,7 @@ diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-
> 4.2.5b1/client/clparse.c
>   	option_code_hash_lookup(&default_requested_options[3],
>   				dhcp_universe.code_hash, &code, 0, MDL);
>   
> -@@ -144,6 +148,11 @@ isc_result_t read_client_conf ()
> +@@ -141,6 +145,11 @@ isc_result_t read_client_conf ()
>   	option_code_hash_lookup(&default_requested_options[13],
>   				dhcp_universe.code_hash, &code, 0, MDL);
>   
> @@ -35,10 +35,10 @@ diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-
> 4.2.5b1/client/clparse.c
>   	for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
>   		if (default_requested_options[code] == NULL)
>   			log_fatal("Unable to find option definition for "
> -diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-
> options.5
> ---- dhcp-4.2.5b1/common/dhcp-options.5.rfc3442	2012-12-17
> 13:23:34.376564797 +0100
> -+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 13:25:18.435141385
> +0100
> -@@ -116,6 +116,26 @@ hexadecimal, separated by colons.  For e
> +diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-
> options.5
> +--- dhcp-4.3.4/common/dhcp-options.5.rfc3442	2016-04-29
> 12:23:34.183032716 +0200
> ++++ dhcp-4.3.4/common/dhcp-options.5	2016-04-29 12:23:34.237032703
> +0200
> +@@ -111,6 +111,26 @@ hexadecimal, separated by colons.  For e
>   or
>     option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
>   .fi
> @@ -65,7 +65,7 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-
> 4.2.5b1/common/dhcp-opt
>   .SH SETTING OPTION VALUES USING EXPRESSIONS
>   Sometimes it's helpful to be able to set the value of a DHCP option
>   based on some value that the client has sent.  To do this, you can
> -@@ -932,6 +952,29 @@ dhclient-script will create routes:
> +@@ -1031,6 +1051,29 @@ dhclient-script will create routes:
>   .RE
>   .PP
>   .nf
> @@ -95,10 +95,10 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-
> 4.2.5b1/common/dhcp-opt
>   .B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
>                                              [\fB,\fR \fIip-
> address\fR...]\fB;\fR
>   .fi
> -diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
> ---- dhcp-4.2.5b1/common/inet.c.rfc3442	2012-12-05 02:17:38.000000000
> +0100
> -+++ dhcp-4.2.5b1/common/inet.c	2012-12-17 13:23:34.440563957 +0100
> -@@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
> +diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
> +--- dhcp-4.3.4/common/inet.c.rfc3442	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/common/inet.c	2016-04-29 12:23:34.237032703 +0200
> +@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
>   	return ISC_R_SUCCESS;
>   }
>   
> @@ -159,9 +159,9 @@ diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-
> 4.2.5b1/common/inet.c
>   /* piaddr() turns an iaddr structure into a printable address. */
>   /* XXX: should use a const pointer rather than passing the structure */
>   const char *
> -diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
> ---- dhcp-4.2.5b1/common/options.c.rfc3442	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/common/options.c	2012-12-17 13:29:38.961536040 +0100
> +diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
> +--- dhcp-4.3.4/common/options.c.rfc3442	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/common/options.c	2016-04-29 12:23:34.237032703 +0200
>  @@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
>   		 * packet.
>   		 */
> @@ -191,7 +191,7 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-
> 4.2.5b1/common/options.c
>   	/* Figure out the size of the data. */
>   	for (l = i = 0; option -> format [i]; i++, l++) {
>   		if (l >= sizeof(fmtbuf) - 1)
> -@@ -1876,6 +1882,33 @@ const char *pretty_print_option (option,
> +@@ -1894,6 +1900,33 @@ const char *pretty_print_option (option,
>   	if (numhunk < 0)
>   		numhunk = 1;
>   
> @@ -225,7 +225,7 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-
> 4.2.5b1/common/options.c
>   	/* Cycle through the array (or hunk) printing the data. */
>   	for (i = 0; i < numhunk; i++) {
>   		if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
> -@@ -2031,6 +2064,20 @@ const char *pretty_print_option (option,
> +@@ -2049,6 +2082,20 @@ const char *pretty_print_option (option,
>   				strcpy(op, piaddr(iaddr));
>   				dp += 4;
>   				break;
> @@ -246,9 +246,9 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-
> 4.2.5b1/common/options.c
>   			      case '6':
>   				iaddr.len = 16;
>   				memcpy(iaddr.iabuf, dp, 16);
> -diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
> ---- dhcp-4.2.5b1/common/parse.c.rfc3442	2012-12-17 13:23:34.408564378
> +0100
> -+++ dhcp-4.2.5b1/common/parse.c	2012-12-17 13:23:34.444563905 +0100
> +diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
> +--- dhcp-4.3.4/common/parse.c.rfc3442	2016-04-29 12:23:34.220032707
> +0200
> ++++ dhcp-4.3.4/common/parse.c	2016-04-29 12:23:34.238032702 +0200
>  @@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
>   }	
>   
> @@ -289,7 +289,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-
> 4.2.5b1/common/parse.c
>    * Return true if every character in the string is hexadecimal.
>    */
>   static int
> -@@ -719,8 +752,10 @@ unsigned char *parse_numeric_aggregate (
> +@@ -720,8 +753,10 @@ unsigned char *parse_numeric_aggregate (
>   		if (count) {
>   			token = peek_token (&val, (unsigned *)0, cfile);
>   			if (token != separator) {
> @@ -301,7 +301,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-
> 4.2.5b1/common/parse.c
>   				if (token != RBRACE && token != LBRACE)
>   					token = next_token (&val,
>   							    (unsigned *)0,
> -@@ -1660,6 +1695,9 @@ int parse_option_code_definition (cfile,
> +@@ -1668,6 +1703,9 @@ int parse_option_code_definition (cfile,
>   	      case IP_ADDRESS:
>   		type = 'I';
>   		break;
> @@ -311,7 +311,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-
> 4.2.5b1/common/parse.c
>   	      case IP6_ADDRESS:
>   		type = '6';
>   		break;
> -@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
> +@@ -5097,6 +5135,15 @@ int parse_option_token (rv, cfile, fmt,
>   		}
>   		break;
>   
> @@ -327,7 +327,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-
> 4.2.5b1/common/parse.c
>   	      case '6': /* IPv6 address. */
>   		if (!parse_ip6_addr(cfile, &addr)) {
>   			return 0;
> -@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
> +@@ -5374,6 +5421,13 @@ int parse_option_decl (oc, cfile)
>   					goto exit;
>   				len = ip_addr.len;
>   				dp = ip_addr.iabuf;
> @@ -341,10 +341,10 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-
> 4.2.5b1/common/parse.c
>   
>   			      alloc:
>   				if (hunkix + len > sizeof hunkbuf) {
> -diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
> ---- dhcp-4.2.5b1/common/tables.c.rfc3442	2012-12-17 13:23:34.398564508
> +0100
> -+++ dhcp-4.2.5b1/common/tables.c	2012-12-17 13:23:34.445563891 +0100
> -@@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig
> +diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
> +--- dhcp-4.3.4/common/tables.c.rfc3442	2016-04-29 12:23:34.209032710
> +0200
> ++++ dhcp-4.3.4/common/tables.c	2016-04-29 12:23:34.238032702 +0200
> +@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsig
>      Format codes:
>   
>      I - IPv4 address
> @@ -352,18 +352,18 @@ diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-
> 4.2.5b1/common/tables.c
>      6 - IPv6 address
>      l - 32-bit signed integer
>      L - 32-bit unsigned integer
> -@@ -210,6 +211,7 @@ static struct option dhcp_options[] = {
> - 	{ "default-url", "t",			&dhcp_universe, 114, 1
> },
> +@@ -216,6 +217,7 @@ static struct option dhcp_options[] = {
> + #endif
>   	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
> - 	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
> + 	{ "domain-search", "D",			&dhcp_universe, 119,
> 1 },
>  +	{ "classless-static-routes", "RIA",	&dhcp_universe, 121, 1 },
>   	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1
> },
>   	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1
> },
>   #if 0
> -diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
> ---- dhcp-4.2.5b1/includes/dhcpd.h.rfc3442	2012-12-17
> 13:23:34.382564719 +0100
> -+++ dhcp-4.2.5b1/includes/dhcpd.h	2012-12-17 13:23:34.446563877 +0100
> -@@ -2678,6 +2678,7 @@ isc_result_t range2cidr(struct iaddrcidr
> +diff -up dhcp-4.3.4/includes/dhcpd.h.rfc3442 dhcp-4.3.4/includes/dhcpd.h
> +--- dhcp-4.3.4/includes/dhcpd.h.rfc3442	2016-04-29 12:23:34.186032716
> +0200
> ++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:23:34.239032702 +0200
> +@@ -2894,6 +2894,7 @@ isc_result_t range2cidr(struct iaddrcidr
>   			const struct iaddr *lo, const struct iaddr *hi);
>   isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
>   const char *piaddr (struct iaddr);
> @@ -371,7 +371,7 @@ diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-
> 4.2.5b1/includes/dhcpd.h
>   char *piaddrmask(struct iaddr *, struct iaddr *);
>   char *piaddrcidr(const struct iaddr *, unsigned int);
>   u_int16_t validate_port(char *);
> -@@ -2887,6 +2888,7 @@ void parse_client_lease_declaration (str
> +@@ -3108,6 +3109,7 @@ void parse_client_lease_declaration (str
>   int parse_option_decl (struct option_cache **, struct parse *);
>   void parse_string_list (struct parse *, struct string_list **, int);
>   int parse_ip_addr (struct parse *, struct iaddr *);
> @@ -379,10 +379,10 @@ diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-
> 4.2.5b1/includes/dhcpd.h
>   int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
>   void parse_reject_statement (struct parse *, struct client_config *);
>   
> -diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
> ---- dhcp-4.2.5b1/includes/dhcp.h.rfc3442	2012-10-23 21:02:13.000000000
> +0200
> -+++ dhcp-4.2.5b1/includes/dhcp.h	2012-12-17 13:23:34.446563877 +0100
> -@@ -163,6 +163,7 @@ struct dhcp_packet {
> +diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
> +--- dhcp-4.3.4/includes/dhcp.h.rfc3442	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/includes/dhcp.h	2016-04-29 12:23:34.239032702 +0200
> +@@ -159,6 +159,7 @@ struct dhcp_packet {
>   #define DHO_ASSOCIATED_IP			92
>   #define DHO_SUBNET_SELECTION			118 /* RFC3011! */
>   #define DHO_DOMAIN_SEARCH			119 /* RFC3397 */
> @@ -390,16 +390,16 @@ diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-
> 4.2.5b1/includes/dhcp.h
>   #define DHO_VIVCO_SUBOPTIONS			124
>   #define DHO_VIVSO_SUBOPTIONS			125
>   
> -diff -up dhcp-4.2.5b1/includes/dhctoken.h.rfc3442 dhcp-
> 4.2.5b1/includes/dhctoken.h
> ---- dhcp-4.2.5b1/includes/dhctoken.h.rfc3442	2012-12-17
> 13:23:34.348565167 +0100
> -+++ dhcp-4.2.5b1/includes/dhctoken.h	2012-12-17 13:23:34.446563877
> +0100
> -@@ -365,7 +365,8 @@ enum dhcp_token {
> - 	PRIMARY6 = 666,
> - 	SECONDARY6 = 667,
> - 	TOKEN_INFINIBAND = 668,
> --	BOOTP_BROADCAST_ALWAYS = 669
> -+	BOOTP_BROADCAST_ALWAYS = 669,
> -+	DESTINATION_DESCRIPTOR = 670
> +diff -up dhcp-4.3.4/includes/dhctoken.h.rfc3442 dhcp-
> 4.3.4/includes/dhctoken.h
> +--- dhcp-4.3.4/includes/dhctoken.h.rfc3442	2016-04-29
> 12:23:34.239032702 +0200
> ++++ dhcp-4.3.4/includes/dhctoken.h	2016-04-29 12:25:07.236008628 +0200
> +@@ -374,7 +374,8 @@ enum dhcp_token {
> + 	LEASE_ID_FORMAT = 676,
> + 	TOKEN_HEX = 677,
> + 	TOKEN_OCTAL = 678,
> +-	BOOTP_BROADCAST_ALWAYS = 679
> ++	BOOTP_BROADCAST_ALWAYS = 679,
> ++	DESTINATION_DESCRIPTOR = 680
>   };
>   
>   #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
> diff --git a/dhcp/patches/dhcp-4.2.0-honor-expired.patch b/dhcp/patches/0018-
> dhcp-honor-expired.patch
> similarity index 77%
> rename from dhcp/patches/dhcp-4.2.0-honor-expired.patch
> rename to dhcp/patches/0018-dhcp-honor-expired.patch
> index 0ae9128..bd89297 100644
> --- a/dhcp/patches/dhcp-4.2.0-honor-expired.patch
> +++ b/dhcp/patches/0018-dhcp-honor-expired.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-4.2.0/client/dhc6.c
> ---- dhcp-4.2.0/client/dhc6.c.honor-expired	2010-10-07
> 12:55:37.000000000 +0200
> -+++ dhcp-4.2.0/client/dhc6.c	2010-10-07 12:56:43.000000000 +0200
> -@@ -1405,6 +1405,32 @@ start_info_request6(struct client_state 
> +diff -up dhcp-4.3.0a1/client/dhc6.c.honor-expired dhcp-4.3.0a1/client/dhc6.c
> +--- dhcp-4.3.0a1/client/dhc6.c.honor-expired	2013-12-19
> 16:00:28.062183037 +0100
> ++++ dhcp-4.3.0a1/client/dhc6.c	2013-12-19 16:00:28.076182842 +0100
> +@@ -1351,6 +1351,32 @@ start_info_request6(struct client_state
>   		go_daemon();
>   }
>   
> @@ -34,7 +34,7 @@ diff -up dhcp-4.2.0/client/dhc6.c.honor-expired dhcp-
> 4.2.0/client/dhc6.c
>   /*
>    * start_confirm6() kicks off an "init-reboot" version of the process, at
>    * startup to find out if old bindings are 'fair' and at runtime whenever
> -@@ -1417,8 +1446,10 @@ start_confirm6(struct client_state *clie
> +@@ -1363,8 +1389,10 @@ start_confirm6(struct client_state *clie
>   
>   	/* If there is no active lease, there is nothing to check. */
>   	if ((client->active_lease == NULL) ||
> diff --git a/dhcp/patches/dhcp-4.2.5-PPP.patch b/dhcp/patches/0019-dhcp-
> PPP.patch
> similarity index 62%
> rename from dhcp/patches/dhcp-4.2.5-PPP.patch
> rename to dhcp/patches/0019-dhcp-PPP.patch
> index 1bc1e3f..b3d82ea 100644
> --- a/dhcp/patches/dhcp-4.2.5-PPP.patch
> +++ b/dhcp/patches/0019-dhcp-PPP.patch
> @@ -1,7 +1,31 @@
> -diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-4.2.4b1/client/dhc6.c
> ---- dhcp-4.2.4b1/client/dhc6.c.PPP	2012-04-16 17:37:23.243618764 +0200
> -+++ dhcp-4.2.4b1/client/dhc6.c	2012-04-16 17:37:23.252618638 +0200
> -@@ -133,7 +133,7 @@ extern int stateless;
> +diff -up dhcp-4.3.4/client/dhc6.c.PPP dhcp-4.3.4/client/dhc6.c
> +--- dhcp-4.3.4/client/dhc6.c.PPP	2016-04-29 12:46:29.824988665 +0200
> ++++ dhcp-4.3.4/client/dhc6.c	2016-04-29 12:46:29.828988666 +0200
> +@@ -5641,7 +5641,8 @@ make_client6_options(struct client_state
> + 	 */
> + 	if ((oc = lookup_option(&dhcpv6_universe, *op,
> + 				D6O_CLIENTID)) == NULL) {
> +-		if (!option_cache(&oc, &default_duid, NULL, clientid_option,
> ++		if (default_duid.len == 0 ||
> ++		    !option_cache(&oc, &default_duid, NULL, clientid_option,
> + 				  MDL))
> + 			log_fatal("Failure assembling a DUID.");
> + 
> +diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.PPP	2016-04-29 12:46:29.815988664
> +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:46:29.830988666 +0200
> +@@ -1077,8 +1077,8 @@ main(int argc, char **argv) {
> + 			if (default_duid.buffer != NULL)
> + 				data_string_forget(&default_duid, MDL);
> + 
> +-			form_duid(&default_duid, MDL);
> +-			write_duid(&default_duid);
> ++			if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
> ++				write_duid(&default_duid);
> + 		}
> + 	}
> + 
> +@@ -3808,7 +3808,7 @@ write_options(struct client_state *clien
>    * is not how it is intended.  Upcoming rearchitecting the client should
>    * address this "one daemon model."
>    */
> @@ -10,7 +34,7 @@ diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-
> 4.2.4b1/client/dhc6.c
>   form_duid(struct data_string *duid, const char *file, int line)
>   {
>   	struct interface_info *ip;
> -@@ -145,6 +145,15 @@ form_duid(struct data_string *duid, cons
> +@@ -3821,6 +3821,15 @@ form_duid(struct data_string *duid, cons
>   	if (ip == NULL)
>   		log_fatal("Impossible condition at %s:%d.", MDL);
>   
> @@ -26,42 +50,18 @@ diff -up dhcp-4.2.4b1/client/dhc6.c.PPP dhcp-
> 4.2.4b1/client/dhc6.c
>   	if ((ip->hw_address.hlen == 0) ||
>   	    (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
>   		log_fatal("Impossible hardware address length at %s:%d.",
> MDL);
> -@@ -180,6 +189,8 @@ form_duid(struct data_string *duid, cons
> - 		memcpy(duid->buffer->data + 4, ip->hw_address.hbuf + 1,
> - 		       ip->hw_address.hlen - 1);
> +@@ -3866,6 +3875,8 @@ form_duid(struct data_string *duid, cons
> + 		log_info("Created duid %s.", str);
> + 		dfree(str, MDL);
>   	}
> -+
> ++	
>  +	return ISC_R_SUCCESS;
>   }
>   
> - /*
> -@@ -5130,7 +5141,8 @@ make_client6_options(struct client_state
> - 	 */
> - 	if ((oc = lookup_option(&dhcpv6_universe, *op,
> - 				D6O_CLIENTID)) == NULL) {
> --		if (!option_cache(&oc, &default_duid, NULL, clientid_option,
> -+		if (default_duid.len == 0 ||
> -+		    !option_cache(&oc, &default_duid, NULL, clientid_option,
> - 				  MDL))
> - 			log_fatal("Failure assembling a DUID.");
> - 
> -diff -up dhcp-4.2.4b1/client/dhclient.c.PPP dhcp-4.2.4b1/client/dhclient.c
> ---- dhcp-4.2.4b1/client/dhclient.c.PPP	2012-04-16 17:37:23.214619170
> +0200
> -+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:37:23.254618610 +0200
> -@@ -919,8 +919,8 @@ main(int argc, char **argv) {
> - 			if (default_duid.buffer != NULL)
> - 				data_string_forget(&default_duid, MDL);
> - 
> --			form_duid(&default_duid, MDL);
> --			write_duid(&default_duid);
> -+			if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS)
> -+				write_duid(&default_duid);
> - 		}
> - 
> - 		for (ip = interfaces ; ip != NULL ; ip = ip->next) {
> -diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-4.2.4b1/common/bpf.c
> ---- dhcp-4.2.4b1/common/bpf.c.PPP	2012-04-16 17:37:23.175619716 +0200
> -+++ dhcp-4.2.4b1/common/bpf.c	2012-04-16 17:37:23.255618596 +0200
> + /* Write the default DUID to the lease store. */
> +diff -up dhcp-4.3.4/common/bpf.c.PPP dhcp-4.3.4/common/bpf.c
> +--- dhcp-4.3.4/common/bpf.c.PPP	2016-04-29 12:46:29.794988660 +0200
> ++++ dhcp-4.3.4/common/bpf.c	2016-04-29 12:46:29.830988666 +0200
>  @@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har
>                           memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
>                           break;
> @@ -85,10 +85,10 @@ diff -up dhcp-4.2.4b1/common/bpf.c.PPP dhcp-
> 4.2.4b1/common/bpf.c
>                   default:
>                           log_fatal("Unsupported device type %d for \"%s\"",
>                                     sa->sdl_type, name);
> -diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-4.2.4b1/common/lpf.c
> ---- dhcp-4.2.4b1/common/lpf.c.PPP	2012-04-16 17:37:23.155619996 +0200
> -+++ dhcp-4.2.4b1/common/lpf.c	2012-04-16 17:37:23.256618582 +0200
> -@@ -503,6 +503,22 @@ get_hw_addr(const char *name, struct har
> +diff -up dhcp-4.3.4/common/lpf.c.PPP dhcp-4.3.4/common/lpf.c
> +--- dhcp-4.3.4/common/lpf.c.PPP	2016-03-22 14:16:51.000000000 +0100
> ++++ dhcp-4.3.4/common/lpf.c	2016-04-29 12:46:29.830988666 +0200
> +@@ -548,6 +548,22 @@ get_hw_addr(const char *name, struct har
>   			hw->hbuf[0] = HTYPE_FDDI;
>   			memcpy(&hw->hbuf[1], sa->sa_data, 6);
>   			break;
> @@ -111,22 +111,22 @@ diff -up dhcp-4.2.4b1/common/lpf.c.PPP dhcp-
> 4.2.4b1/common/lpf.c
>   		default:
>   			log_fatal("Unsupported device type %ld for \"%s\"",
>   				  (long int)sa->sa_family, name);
> -diff -up dhcp-4.2.4b1/includes/dhcpd.h.PPP dhcp-4.2.4b1/includes/dhcpd.h
> ---- dhcp-4.2.4b1/includes/dhcpd.h.PPP	2012-04-16 17:37:23.239618820
> +0200
> -+++ dhcp-4.2.4b1/includes/dhcpd.h	2012-04-16 17:37:23.257618568 +0200
> -@@ -2760,7 +2760,7 @@ void dhcpv4_client_assignments(void);
> - void dhcpv6_client_assignments(void);
> +diff -up dhcp-4.3.4/includes/dhcpd.h.PPP dhcp-4.3.4/includes/dhcpd.h
> +--- dhcp-4.3.4/includes/dhcpd.h.PPP	2016-04-29 12:46:29.831988667
> +0200
> ++++ dhcp-4.3.4/includes/dhcpd.h	2016-04-29 12:47:13.167995959 +0200
> +@@ -2990,7 +2990,7 @@ void client_dns_remove(struct client_sta
>   
> - /* dhc6.c */
> + void dhcpv4_client_assignments(void);
> + void dhcpv6_client_assignments(void);
>  -void form_duid(struct data_string *duid, const char *file, int line);
>  +isc_result_t form_duid(struct data_string *duid, const char *file, int
> line);
> - void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int
> line);
> - void start_init6(struct client_state *client);
> - void start_info_request6(struct client_state *client);
> -diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-4.2.4b1/includes/dhcp.h
> ---- dhcp-4.2.4b1/includes/dhcp.h.PPP	2012-04-16 17:37:23.000000000
> +0200
> -+++ dhcp-4.2.4b1/includes/dhcp.h	2012-04-16 17:38:34.675618138 +0200
> -@@ -85,6 +85,8 @@ struct dhcp_packet {
> + 
> + void dhcp4o6_start(void);
> + 
> +diff -up dhcp-4.3.4/includes/dhcp.h.PPP dhcp-4.3.4/includes/dhcp.h
> +--- dhcp-4.3.4/includes/dhcp.h.PPP	2016-04-29 12:46:29.822988665 +0200
> ++++ dhcp-4.3.4/includes/dhcp.h	2016-04-29 12:46:29.832988667 +0200
> +@@ -81,6 +81,8 @@ struct dhcp_packet {
>   					 * is no standard for this so we
>   					 * just steal a type            */
>   
> @@ -135,10 +135,10 @@ diff -up dhcp-4.2.4b1/includes/dhcp.h.PPP dhcp-
> 4.2.4b1/includes/dhcp.h
>   /* Magic cookie validating dhcp options field (and bootp vendor
>      extensions field). */
>   #define DHCP_OPTIONS_COOKIE	"\143\202\123\143"
> -diff -up dhcp-4.2.4b1/server/dhcpv6.c.PPP dhcp-4.2.4b1/server/dhcpv6.c
> ---- dhcp-4.2.4b1/server/dhcpv6.c.PPP	2012-04-16 17:37:23.218619114
> +0200
> -+++ dhcp-4.2.4b1/server/dhcpv6.c	2012-04-16 17:37:23.260618526 +0200
> -@@ -300,6 +300,9 @@ generate_new_server_duid(void) {
> +diff -up dhcp-4.3.4/server/dhcpv6.c.PPP dhcp-4.3.4/server/dhcpv6.c
> +--- dhcp-4.3.4/server/dhcpv6.c.PPP	2016-03-22 14:16:51.000000000 +0100
> ++++ dhcp-4.3.4/server/dhcpv6.c	2016-04-29 12:46:29.833988667 +0200
> +@@ -454,6 +454,9 @@ generate_new_server_duid(void) {
>   		if (p->hw_address.hlen > 0) {
>   			break;
>   		}
> diff --git a/dhcp/patches/dhcp-4.2.5-lpf-ib.patch b/dhcp/patches/0020-dhcp-
> lpf-ib.patch
> similarity index 70%
> rename from dhcp/patches/dhcp-4.2.5-lpf-ib.patch
> rename to dhcp/patches/0020-dhcp-lpf-ib.patch
> index a136c6c..766d518 100644
> --- a/dhcp/patches/dhcp-4.2.5-lpf-ib.patch
> +++ b/dhcp/patches/0020-dhcp-lpf-ib.patch
> @@ -1,16 +1,16 @@
> -diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-4.2.4-
> P2/client/dhclient.c
> ---- dhcp-4.2.4-P2/client/dhclient.c.lpf-ib	2012-11-30
> 14:05:07.399394154 +0100
> -+++ dhcp-4.2.4-P2/client/dhclient.c	2012-11-30 14:05:07.406394070
> +0100
> -@@ -113,6 +113,8 @@ static int check_domain_name_list(const
> - static int check_option_values(struct universe *universe, unsigned int opt,
> - 			       const char *ptr, size_t len);
> +diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.lpf-ib	2016-05-02 14:37:36.945128001
> +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-05-02 14:37:36.952128005 +0200
> +@@ -163,6 +163,8 @@ static const char use_noarg[] = "No argu
> + static const char use_v6command[] = "Command not used for DHCPv4: %s";
> + #endif
>   
>  +static void setup_ib_interface(struct interface_info *ip);
>  +
> - int
> - main(int argc, char **argv) {
> - 	int fd;
> -@@ -909,6 +911,14 @@ main(int argc, char **argv) {
> + static void
> + usage(const char *sfmt, const char *sarg)
> + {
> +@@ -1066,6 +1068,13 @@ main(int argc, char **argv) {
>   	}
>   	srandom(seed + cur_time + (unsigned)getpid());
>   
> @@ -21,11 +21,10 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-
> 4.2.4-P2/client/dhclient.c
>  +			setup_ib_interface(ip);
>  +		}
>  +	}
> -+
> - 	/* Start a configuration state machine for each interface. */
> - #ifdef DHCPv6
> - 	if (local_family == AF_INET6) {
> -@@ -1185,6 +1195,29 @@ int find_subnet (struct subnet **sp,
> + 
> + 	/*
> + 	 * Establish a default DUID.  We always do so for v6 and
> +@@ -1361,6 +1370,29 @@ int find_subnet (struct subnet **sp,
>   	return 0;
>   }
>   
> @@ -55,10 +54,10 @@ diff -up dhcp-4.2.4-P2/client/dhclient.c.lpf-ib dhcp-
> 4.2.4-P2/client/dhclient.c
>   /* Individual States:
>    *
>    * Each routine is called from the dhclient_state_machine() in one of
> -diff -up dhcp-4.2.4-P2/common/bpf.c.lpf-ib dhcp-4.2.4-P2/common/bpf.c
> ---- dhcp-4.2.4-P2/common/bpf.c.lpf-ib	2012-11-30 14:05:07.394394214
> +0100
> -+++ dhcp-4.2.4-P2/common/bpf.c	2012-11-30 14:05:07.407394058 +0100
> -@@ -198,11 +198,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
> +diff -up dhcp-4.3.4/common/bpf.c.lpf-ib dhcp-4.3.4/common/bpf.c
> +--- dhcp-4.3.4/common/bpf.c.lpf-ib	2016-05-02 14:37:36.946128001 +0200
> ++++ dhcp-4.3.4/common/bpf.c	2016-05-02 14:37:36.952128005 +0200
> +@@ -198,11 +198,43 @@ struct bpf_insn dhcp_bpf_filter [] = {
>   	BPF_STMT(BPF_RET+BPF_K, 0),
>   };
>   
> @@ -94,30 +93,44 @@ diff -up dhcp-4.2.4-P2/common/bpf.c.lpf-ib dhcp-4.2.4-
> P2/common/bpf.c
>  +};
>  +
>   #if defined (DEC_FDDI)
> - struct bpf_insn *bpf_fddi_filter;
> + struct bpf_insn *bpf_fddi_filter = NULL;
>   #endif
>   
>   int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn);
>  +int dhcp_ib_bpf_filter_len = sizeof dhcp_ib_bpf_filter / sizeof (struct
> bpf_insn);
> -+
>   #if defined (HAVE_TR_SUPPORT)
>   struct bpf_insn dhcp_bpf_tr_filter [] = {
>           /* accept all token ring packets due to variable length header */
> -diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-P2/common/lpf.c
> ---- dhcp-4.2.4-P2/common/lpf.c.lpf-ib	2012-11-30 14:05:07.394394214
> +0100
> -+++ dhcp-4.2.4-P2/common/lpf.c	2012-11-30 14:19:27.211031532 +0100
> -@@ -42,6 +42,7 @@
> - #include "includes/netinet/udp.h"
> - #include "includes/netinet/if_ether.h"
> +diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
> +--- dhcp-4.3.4/common/discover.c.lpf-ib	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/common/discover.c	2016-05-02 14:38:08.257147982 +0200
> +@@ -1235,7 +1235,7 @@ discover_interfaces(int state) {
> + 				if_register_send(tmp);
> + 			} else {
> + 				/* get_hw_addr() was called by register. */
> +-				get_hw_addr(tmp->name, &tmp->hw_address);
> ++				get_hw_addr(tmp);
> + 			}
> + 			break;
> + #ifdef DHCPv6
> +@@ -1248,7 +1248,7 @@ discover_interfaces(int state) {
> + 				   so now we have to call it explicitly
> + 				   to not leave the hardware address unknown
> + 				   (some code expects it cannot be. */
> +-				get_hw_addr(tmp->name, &tmp->hw_address);
> ++				get_hw_addr(tmp);
> + 			} else {
> + 				if_register_linklocal6(tmp);
> + 			}
> +diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
> +--- dhcp-4.3.4/common/lpf.c.lpf-ib	2016-05-02 14:37:36.947128002 +0200
> ++++ dhcp-4.3.4/common/lpf.c	2016-05-02 14:37:36.953128006 +0200
> +@@ -47,6 +47,17 @@
> + #include <sys/ioctl.h>
> + #include <sys/socket.h>
>   #include <net/if.h>
>  +#include <ifaddrs.h>
> - 
> - #ifndef PACKET_AUXDATA
> - #define PACKET_AUXDATA 8
> -@@ -59,6 +60,15 @@ struct tpacket_auxdata
> - /* Reinitializes the specified interface after an address change.   This
> -    is not required for packet-filter APIs. */
> - 
> ++
>  +/* Default broadcast address for IPoIB */
>  +static unsigned char default_ib_bcast_addr[20] = {
>  + 	0x00, 0xff, 0xff, 0xff,
> @@ -127,21 +140,17 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +	0xff, 0xff, 0xff, 0xff
>  +};
>  +
> - #ifdef USE_LPF_SEND
> - void if_reinitialize_send (info)
> - 	struct interface_info *info;
> -@@ -86,10 +96,21 @@ int if_register_lpf (info)
> + #endif
> + 
> + #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
> +@@ -80,10 +91,20 @@ int if_register_lpf (info)
>   		struct sockaddr common;
> - 	} sa;
> + 		} sa;
>   	struct ifreq ifr;
>  +	int type;
>  +	int protocol;
> - 
> - 	/* Make an LPF socket. */
> --	if ((sock = socket(PF_PACKET, SOCK_RAW,
> --			   htons((short)ETH_P_ALL))) < 0) {
> -+	get_hw_addr(info);
>  +
> ++	get_hw_addr(info);
>  +	if (info->hw_address.hbuf[0] == HTYPE_INFINIBAND) {
>  +		type = SOCK_DGRAM;
>  +		protocol = ETHERTYPE_IP;
> @@ -149,12 +158,15 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +		type = SOCK_RAW;
>  +		protocol = ETH_P_ALL;
>  +	}
> -+
> + 
> + 	/* Make an LPF socket. */
> +-	if ((sock = socket(PF_PACKET, SOCK_RAW,
> +-			   htons((short)ETH_P_ALL))) < 0) {
>  +	if ((sock = socket(PF_PACKET, type, htons((short)protocol))) < 0) {
>   		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
>   		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
>   		    errno == EAFNOSUPPORT || errno == EINVAL) {
> -@@ -112,6 +133,7 @@ int if_register_lpf (info)
> +@@ -106,6 +127,7 @@ int if_register_lpf (info)
>   	/* Bind to the interface name */
>   	memset (&sa, 0, sizeof sa);
>   	sa.ll.sll_family = AF_PACKET;
> @@ -162,8 +174,8 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   	sa.ll.sll_ifindex = ifr.ifr_ifindex;
>   	if (bind (sock, &sa.common, sizeof sa)) {
>   		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
> -@@ -127,8 +149,6 @@ int if_register_lpf (info)
> - 		log_fatal ("Bind socket to interface: %m");
> +@@ -122,8 +144,6 @@ int if_register_lpf (info)
> + 
>   	}
>   
>  -	get_hw_addr(info->name, &info->hw_address);
> @@ -171,7 +183,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   	return sock;
>   }
>   #endif /* USE_LPF_SEND || USE_LPF_RECEIVE */
> -@@ -183,6 +203,8 @@ void if_deregister_send (info)
> +@@ -178,6 +198,8 @@ void if_deregister_send (info)
>      in bpf includes... */
>   extern struct sock_filter dhcp_bpf_filter [];
>   extern int dhcp_bpf_filter_len;
> @@ -180,26 +192,25 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   
>   #if defined (HAVE_TR_SUPPORT)
>   extern struct sock_filter dhcp_bpf_tr_filter [];
> -@@ -200,11 +222,13 @@ void if_register_receive (info)
> - 	/* Open a LPF device and hang it on this interface... */
> - 	info -> rfdesc = if_register_lpf (info);
> - 
> --	val = 1;
> --	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
> --			sizeof val) < 0) {
> --		if (errno != ENOPROTOOPT)
> +@@ -196,11 +218,12 @@ void if_register_receive (info)
> + #ifdef PACKET_AUXDATA
> + 	{
> + 	int val = 1;
> +-
> +-	if (setsockopt(info->rfdesc, SOL_PACKET, PACKET_AUXDATA,
> +-		       &val, sizeof(val)) < 0) {
> +-		if (errno != ENOPROTOOPT) {
>  -			log_fatal ("Failed to set auxiliary packet data:
> %m");
>  +	if (info->hw_address.hbuf[0] != HTYPE_INFINIBAND) {
> -+		val = 1;
> -+		if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA,
> -+				&val, sizeof val) < 0) {
> -+			if (errno != ENOPROTOOPT)
> ++		if (setsockopt(info->rfdesc, SOL_PACKET, PACKET_AUXDATA,
> ++			      &val, sizeof(val)) < 0) {
> ++			if (errno != ENOPROTOOPT) {
>  +				log_fatal ("Failed to set auxiliary packet
> data: %m");
> -+		}
> ++			}
> + 		}
>   	}
> - 
> - #if defined (HAVE_TR_SUPPORT)
> -@@ -250,15 +274,28 @@ static void lpf_gen_filter_setup (info)
> + 	}
> +@@ -250,15 +273,28 @@ static void lpf_gen_filter_setup (info)
>   
>   	memset(&p, 0, sizeof(p));
>   
> @@ -237,7 +248,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   
>   	if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p,
>   			sizeof p) < 0) {
> -@@ -315,6 +352,54 @@ static void lpf_tr_filter_setup (info)
> +@@ -315,6 +351,54 @@ static void lpf_tr_filter_setup (info)
>   #endif /* USE_LPF_RECEIVE */
>   
>   #ifdef USE_LPF_SEND
> @@ -292,7 +303,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   ssize_t send_packet (interface, packet, raw, len, from, to, hto)
>   	struct interface_info *interface;
>   	struct packet *packet;
> -@@ -335,6 +420,11 @@ ssize_t send_packet (interface, packet,
> +@@ -335,6 +419,11 @@ ssize_t send_packet (interface, packet,
>   		return send_fallback (interface, packet, raw,
>   				      len, from, to, hto);
>   
> @@ -304,7 +315,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   	if (hto == NULL && interface->anycast_mac_addr.hlen)
>   		hto = &interface->anycast_mac_addr;
>   
> -@@ -356,6 +446,42 @@ ssize_t send_packet (interface, packet,
> +@@ -355,6 +444,42 @@ ssize_t send_packet (interface, packet,
>   #endif /* USE_LPF_SEND */
>   
>   #ifdef USE_LPF_RECEIVE
> @@ -347,21 +358,21 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   ssize_t receive_packet (interface, buf, len, from, hfrom)
>   	struct interface_info *interface;
>   	unsigned char *buf;
> -@@ -382,6 +508,10 @@ ssize_t receive_packet (interface, buf,
> +@@ -393,6 +518,10 @@ ssize_t receive_packet (interface, buf,
>   	};
> - 	struct cmsghdr *cmsg;
> + #endif /* PACKET_AUXDATA */
>   
>  +	if (interface->hw_address.hbuf[0] == HTYPE_INFINIBAND) {
>  +		return receive_packet_ib(interface, buf, len, from, hfrom);
>  +	}
>  +
> - 	length = recvmsg (interface -> rfdesc, &msg, 0);
> + 	length = recvmsg (interface->rfdesc, &msg, 0);
>   	if (length <= 0)
>   		return length;
> -@@ -461,11 +591,32 @@ void maybe_setup_fallback ()
> - 	}
> - }
> +@@ -506,11 +635,33 @@ void maybe_setup_fallback ()
> + #endif
>   
> + #if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR)
>  -void
>  -get_hw_addr(const char *name, struct hardware *hw) {
>  +struct sockaddr_ll *
> @@ -380,6 +391,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +		if (strcmp((*ifa)->ifa_name, name) == 0)
>  +			return (struct sockaddr_ll *)(void *)(*ifa)-
> >ifa_addr;
>  +	}
> ++	*ifa = NULL;
>  +	return NULL;
>  +}
>  +
> @@ -394,7 +406,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   
>   	if (strlen(name) >= sizeof(tmp.ifr_name)) {
>   		log_fatal("Device name too long: \"%s\"", name);
> -@@ -479,16 +630,52 @@ get_hw_addr(const char *name, struct har
> +@@ -524,16 +675,61 @@ get_hw_addr(const char *name, struct har
>   	memset(&tmp, 0, sizeof(tmp));
>   	strcpy(tmp.ifr_name, name);
>   	if (ioctl(sock, SIOCGIFHWADDR, &tmp) < 0) {
> @@ -412,6 +424,13 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +		log_fatal("Unable to allocate memory for link layer
> address");
>  +	memcpy(&sll->sll_hatype, &sa->sa_family, sizeof (sll->sll_hatype));
>  +	memcpy(sll->sll_addr, sa->sa_data, sizeof (sll->sll_addr));
> ++	switch (sll->sll_hatype) {
> ++		case ARPHRD_INFINIBAND:
> ++			sll->sll_halen = HARDWARE_ADDR_LEN_IOCTL;
> ++			break;
> ++		default:
> ++			break;
> ++	}
>  +	return sll;
>  +}
>  +
> @@ -424,6 +443,8 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +	struct ifaddrs *ifa = NULL;
>  +	struct sockaddr_ll *sll = NULL;
>  +	int sll_allocated = 0;
> ++	char *dup = NULL;
> ++	char *colon = NULL;
>  +
>  +	if (getifaddrs(&ifaddrs) == -1)
>  +		log_fatal("Failed to get interfaces");
> @@ -437,7 +458,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +		if (sll != NULL)
>  +			sll_allocated = 1;
>  +		else
> -+			// shouldn't happed
> ++			// shouldn't happen
>  +			log_fatal("Unexpected internal error");
>  +	}
>  +
> @@ -450,7 +471,7 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   			break;
>   		case ARPHRD_IEEE802:
>   #ifdef ARPHRD_IEEE802_TR
> -@@ -496,18 +683,35 @@ get_hw_addr(const char *name, struct har
> +@@ -541,18 +737,50 @@ get_hw_addr(const char *name, struct har
>   #endif /* ARPHRD_IEEE802_TR */
>   			hw->hlen = 7;
>   			hw->hbuf[0] = HTYPE_IEEE802;
> @@ -464,10 +485,22 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +			memcpy(&hw->hbuf[1], sll->sll_addr, 6);
>  +			break;
>  +		case ARPHRD_INFINIBAND:
> ++			dup = strdup(name);
> ++			/* Aliased infiniband interface is special case
> where
> ++			 * neither get_ll() nor ioctl_get_ll() get's correct
> hw
> ++			 * address, so we have to truncate the :0 and run
> ++			 * get_ll() again for the rest.
> ++			*/
> ++			if ((colon = strchr(dup, ':')) != NULL) {
> ++				*colon = '\0';
> ++				if ((sll = get_ll(ifaddrs, &ifa, dup)) ==
> NULL)
> ++					log_fatal("Error getting hardware
> address for \"%s\": %m", name);
> ++			}
> ++			free (dup);
>  +			/* For Infiniband, save the broadcast address and
> store
>  +			 * the port GUID into the hardware address.
>  +			 */
> -+			if (ifa->ifa_flags & IFF_BROADCAST) {
> ++			if (ifa && (ifa->ifa_flags & IFF_BROADCAST)) {
>  +				struct sockaddr_ll *bll;
>  +
>  +				bll = (struct sockaddr_ll *)ifa-
> >ifa_broadaddr;
> @@ -477,8 +510,11 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +				       20);
>  +			}
>  +
> -+			hw->hlen = 1;
> ++			hw->hlen = HARDWARE_ADDR_LEN_IOCTL + 1;
>  +			hw->hbuf[0] = HTYPE_INFINIBAND;
> ++			memcpy(&hw->hbuf[1],
> ++			       &sll->sll_addr[sll->sll_halen -
> HARDWARE_ADDR_LEN_IOCTL],
> ++			       HARDWARE_ADDR_LEN_IOCTL);
>   			break;
>   #if defined(ARPHRD_PPP)
>   		case ARPHRD_PPP:
> @@ -490,14 +526,14 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>   			hw->hlen = 0;
>   			hw->hbuf[0] = HTYPE_RESERVED;
>   			/* 0xdeadbeef should never occur on the wire,
> -@@ -520,10 +724,13 @@ get_hw_addr(const char *name, struct har
> +@@ -565,10 +793,13 @@ get_hw_addr(const char *name, struct har
>   			break;
>   #endif
>   		default:
>  -			log_fatal("Unsupported device type %ld for \"%s\"",
>  -				  (long int)sa->sa_family, name);
>  +			freeifaddrs(ifaddrs);
> -+			log_fatal("Unsupported device type %h for \"%s\"",
> ++			log_fatal("Unsupported device type %hu for \"%s\"",
>  +				  sll->sll_hatype, name);
>   	}
>   
> @@ -507,11 +543,11 @@ diff -up dhcp-4.2.4-P2/common/lpf.c.lpf-ib dhcp-4.2.4-
> P2/common/lpf.c
>  +	freeifaddrs(ifaddrs);
>   }
>   #endif
> -diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-P2/common/socket.c
> ---- dhcp-4.2.4-P2/common/socket.c.lpf-ib	2012-08-24 21:11:21.000000000
> +0200
> -+++ dhcp-4.2.4-P2/common/socket.c	2012-11-30 14:05:07.408394046 +0100
> -@@ -325,7 +325,7 @@ void if_register_send (info)
> - 	info->wfdesc = if_register_socket(info, AF_INET, 0);
> +diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
> +--- dhcp-4.3.4/common/socket.c.lpf-ib	2016-03-22 14:16:51.000000000
> +0100
> ++++ dhcp-4.3.4/common/socket.c	2016-05-02 14:37:36.953128006 +0200
> +@@ -328,7 +328,7 @@ void if_register_send (info)
> + 	info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
>   	/* If this is a normal IPv4 address, get the hardware address. */
>   	if (strcmp(info->name, "fallback") != 0)
>  -		get_hw_addr(info->name, &info->hw_address);
> @@ -519,7 +555,7 @@ diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-
> P2/common/socket.c
>   #if defined (USE_SOCKET_FALLBACK)
>   	/* Fallback only registers for send, but may need to receive as
>   	   well. */
> -@@ -388,7 +388,7 @@ void if_register_receive (info)
> +@@ -391,7 +391,7 @@ void if_register_receive (info)
>   #endif /* IP_PKTINFO... */
>   	/* If this is a normal IPv4 address, get the hardware address. */
>   	if (strcmp(info->name, "fallback") != 0)
> @@ -528,7 +564,7 @@ diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-4.2.4-
> P2/common/socket.c
>   
>   	if (!quiet_interface_discovery)
>   		log_info ("Listening on Socket/%s%s%s",
> -@@ -498,7 +498,7 @@ if_register6(struct interface_info *info
> +@@ -505,7 +505,7 @@ if_register6(struct interface_info *info
>   	if (req_multi)
>   		if_register_multicast(info);
>   
> @@ -537,10 +573,29 @@ diff -up dhcp-4.2.4-P2/common/socket.c.lpf-ib dhcp-
> 4.2.4-P2/common/socket.c
>   
>   	if (!quiet_interface_discovery) {
>   		if (info->shared_network != NULL) {
> -diff -up dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib dhcp-4.2.4-P2/includes/dhcpd.h
> ---- dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib	2012-11-30
> 14:05:07.400394142 +0100
> -+++ dhcp-4.2.4-P2/includes/dhcpd.h	2012-11-30 14:05:07.409394034 +0100
> -@@ -1249,6 +1249,7 @@ struct interface_info {
> +@@ -561,7 +561,7 @@ if_register_linklocal6(struct interface_
> + 	info->rfdesc = sock;
> + 	info->wfdesc = sock;
> + 
> +-	get_hw_addr(info->name, &info->hw_address);
> ++	get_hw_addr(info);
> + 
> + 	if (!quiet_interface_discovery) {
> + 		if (info->shared_network != NULL) {
> +diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
> +--- dhcp-4.3.4/includes/dhcpd.h.lpf-ib	2016-05-02 14:37:36.948128002
> +0200
> ++++ dhcp-4.3.4/includes/dhcpd.h	2016-05-02 14:37:36.954128006 +0200
> +@@ -482,6 +482,9 @@ struct packet {
> + 
> + #define HARDWARE_ADDR_LEN 20
> + 
> ++/* ioctl limits hardware addresses to 8 bytes */
> ++#define HARDWARE_ADDR_LEN_IOCTL	8
> ++
> + struct hardware {
> + 	u_int8_t hlen;
> + 	u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
> +@@ -1343,6 +1346,7 @@ struct interface_info {
>   	struct shared_network *shared_network;
>   				/* Networks connected to this interface. */
>   	struct hardware hw_address;	/* Its physical address. */
> @@ -548,12 +603,12 @@ diff -up dhcp-4.2.4-P2/includes/dhcpd.h.lpf-ib dhcp-
> 4.2.4-P2/includes/dhcpd.h
>   	struct in_addr *addresses;	/* Addresses associated with this
>   					 * interface.
>   					 */
> -@@ -2368,7 +2369,7 @@ void print_dns_status (int, struct dhcp_
> +@@ -2580,7 +2584,7 @@ void print_dns_status (int, struct dhcp_
>   #endif
>   const char *print_time(TIME);
>   
>  -void get_hw_addr(const char *name, struct hardware *hw);
>  +void get_hw_addr(struct interface_info *info);
> - 
> - /* socket.c */
> - #if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
> + char *buf_to_hex (const unsigned char *s, unsigned len,
> +                    const char *file, int line);
> + char *format_lease_id(const unsigned char *s, unsigned len, int format,
> diff --git a/dhcp/patches/0021-dhcp-IPoIB-log-id.patch b/dhcp/patches/0021-
> dhcp-IPoIB-log-id.patch
> new file mode 100644
> index 0000000..97e9dd5
> --- /dev/null
> +++ b/dhcp/patches/0021-dhcp-IPoIB-log-id.patch
> @@ -0,0 +1,165 @@
> +diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
> +--- dhcp-4.3.4/server/dhcp.c.IPoIB-log-id	2016-04-29
> 12:52:14.285061620 +0200
> ++++ dhcp-4.3.4/server/dhcp.c	2016-04-29 12:53:59.535088020 +0200
> +@@ -85,6 +85,42 @@ const int dhcp_type_name_max = ((sizeof
> + # define send_packet trace_packet_send
> + #endif
> + 
> ++char *print_client_identifier_from_packet (packet)
> ++	struct packet *packet;
> ++{
> ++	struct option_cache *oc;
> ++	struct data_string client_identifier;
> ++	char *ci;
> ++
> ++	memset (&client_identifier, 0, sizeof client_identifier);
> ++
> ++	oc = lookup_option (&dhcp_universe, packet -> options,
> ++			DHO_DHCP_CLIENT_IDENTIFIER);
> ++	if (oc &&
> ++	    evaluate_option_cache (&client_identifier,
> ++				    packet, (struct lease *)0,
> ++				    (struct client_state *)0,
> ++				    packet -> options,
> ++				    (struct option_state *)0,
> ++				    &global_scope, oc, MDL)) {
> ++		ci = print_hw_addr (HTYPE_INFINIBAND, client_identifier.len,
> client_identifier.data);
> ++		data_string_forget (&client_identifier, MDL);
> ++		return ci;
> ++	} else
> ++		return "\"no client id\"";
> ++}
> ++
> ++char *print_hw_addr_or_client_id (packet)
> ++	struct packet *packet;
> ++{
> ++	if (packet -> raw -> htype == HTYPE_INFINIBAND)
> ++		return print_client_identifier_from_packet (packet);
> ++	else
> ++		return print_hw_addr (packet -> raw -> htype,
> ++				      packet -> raw -> hlen,
> ++				      packet -> raw -> chaddr);
> ++}
> ++
> + void
> + dhcp (struct packet *packet) {
> + 	int ms_nulltp = 0;
> +@@ -127,9 +163,7 @@ dhcp (struct packet *packet) {
> + 
> + 		log_info("%s from %s via %s: %s", s,
> + 			 (packet->raw->htype
> +-			  ? print_hw_addr(packet->raw->htype,
> +-					  packet->raw->hlen,
> +-					  packet->raw->chaddr)
> ++			  ? print_hw_addr_or_client_id(packet)
> + 			  : "<no identifier>"),
> + 			 packet->raw->giaddr.s_addr
> + 			 ? inet_ntoa(packet->raw->giaddr)
> +@@ -326,9 +360,7 @@ void dhcpdiscover (packet, ms_nulltp)
> + #endif
> + 	snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia
> %s",
> + 		 (packet -> raw -> htype
> +-		  ? print_hw_addr (packet -> raw -> htype,
> +-				   packet -> raw -> hlen,
> +-				   packet -> raw -> chaddr)
> ++		  ? print_hw_addr_or_client_id (packet)
> + 		  : (lease
> + 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
> + 		     : "<no identifier>")),
> +@@ -540,9 +572,7 @@ void dhcprequest (packet, ms_nulltp, ip_
> + 		 "DHCPREQUEST for %s%s from %s %s%s%svia %s",
> + 		 piaddr (cip), smbuf,
> + 		 (packet -> raw -> htype
> +-		  ? print_hw_addr (packet -> raw -> htype,
> +-				   packet -> raw -> hlen,
> +-				   packet -> raw -> chaddr)
> ++		  ? print_hw_addr_or_client_id(packet)
> + 		  : (lease
> + 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
> + 		     : "<no identifier>")),
> +@@ -783,9 +813,7 @@ void dhcprelease (packet, ms_nulltp)
> + 	if ((oc = lookup_option (&dhcp_universe, packet -> options,
> + 				 DHO_DHCP_REQUESTED_ADDRESS))) {
> + 		log_info ("DHCPRELEASE from %s specified requested-
> address.",
> +-		      print_hw_addr (packet -> raw -> htype,
> +-				     packet -> raw -> hlen,
> +-				     packet -> raw -> chaddr));
> ++		      print_hw_addr_or_client_id(packet));
> + 	}
> + 
> + 	oc = lookup_option (&dhcp_universe, packet -> options,
> +@@ -877,9 +905,7 @@ void dhcprelease (packet, ms_nulltp)
> + 		 "DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
> + 		 cstr,
> + 		 (packet -> raw -> htype
> +-		  ? print_hw_addr (packet -> raw -> htype,
> +-				   packet -> raw -> hlen,
> +-				   packet -> raw -> chaddr)
> ++		  ? print_hw_addr_or_client_id(packet)
> + 		  : (lease
> + 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
> + 		     : "<no identifier>")),
> +@@ -984,9 +1010,7 @@ void dhcpdecline (packet, ms_nulltp)
> + 		 "DHCPDECLINE of %s from %s %s%s%svia %s",
> + 		 piaddr (cip),
> + 		 (packet -> raw -> htype
> +-		  ? print_hw_addr (packet -> raw -> htype,
> +-				   packet -> raw -> hlen,
> +-				   packet -> raw -> chaddr)
> ++		  ? print_hw_addr_or_client_id(packet)
> + 		  : (lease
> + 		     ? print_hex_1(lease->uid_len, lease->uid, 60)
> + 		     : "<no identifier>")),
> +@@ -1683,8 +1707,7 @@ void dhcpinform (packet, ms_nulltp)
> + 	/* Report what we're sending. */
> + 	snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via",
> piaddr(cip),
> + 		 (packet->raw->htype && packet->raw->hlen) ?
> +-			print_hw_addr(packet->raw->htype, packet->raw->hlen,
> +-				      packet->raw->chaddr) :
> ++			print_hw_addr_or_client_id(packet) :
> + 			"<no client hardware address>");
> + 	log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
> + 					    packet->interface->name);
> +@@ -1862,9 +1885,7 @@ void nak_lease (packet, cip, network_gro
> + #endif
> + 	log_info ("DHCPNAK on %s to %s via %s",
> + 	      piaddr (*cip),
> +-	      print_hw_addr (packet -> raw -> htype,
> +-			     packet -> raw -> hlen,
> +-			     packet -> raw -> chaddr),
> ++	      print_hw_addr_or_client_id(packet),
> + 	      packet -> raw -> giaddr.s_addr
> + 	      ? inet_ntoa (packet -> raw -> giaddr)
> + 	      : packet -> interface -> name);
> +@@ -3859,7 +3880,7 @@ void dhcp_reply (lease)
> + 		   ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
> + 		   : "BOOTREPLY"),
> + 		  piaddr (lease -> ip_addr),
> +-		  (lease -> hardware_addr.hlen
> ++		  (lease -> hardware_addr.hlen > 1
> + 		   ? print_hw_addr (lease -> hardware_addr.hbuf [0],
> + 				    lease -> hardware_addr.hlen - 1,
> + 				    &lease -> hardware_addr.hbuf [1])
> +@@ -4408,10 +4429,7 @@ int find_lease (struct lease **lp,
> + 			if (uid_lease) {
> + 			    if (uid_lease->binding_state == FTS_ACTIVE) {
> + 				log_error ("client %s has duplicate%s on
> %s",
> +-					   (print_hw_addr
> +-					    (packet -> raw -> htype,
> +-					     packet -> raw -> hlen,
> +-					     packet -> raw -> chaddr)),
> ++					   (print_hw_addr_or_client_id(packe
> t)),
> + 					   " leases",
> + 					   (ip_lease -> subnet ->
> + 					    shared_network -> name));
> +@@ -4578,9 +4596,7 @@ int find_lease (struct lease **lp,
> + 			log_error("uid lease %s for client %s is duplicate "
> + 				  "on %s",
> + 				  piaddr(uid_lease->ip_addr),
> +-				  print_hw_addr(packet->raw->htype,
> +-						packet->raw->hlen,
> +-						packet->raw->chaddr),
> ++				  print_hw_addr_or_client_id(packet),
> + 				  uid_lease->subnet->shared_network->name);
> + 
> + 			if (!packet -> raw -> ciaddr.s_addr &&
> diff --git a/dhcp/patches/dhcp-4.2.4-improved-xid.patch b/dhcp/patches/0022-
> dhcp-improved-xid.patch
> similarity index 71%
> rename from dhcp/patches/dhcp-4.2.4-improved-xid.patch
> rename to dhcp/patches/0022-dhcp-improved-xid.patch
> index f353fb0..69a6975 100644
> --- a/dhcp/patches/dhcp-4.2.4-improved-xid.patch
> +++ b/dhcp/patches/0022-dhcp-improved-xid.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-
> 4.2.4b1/client/dhclient.c
> ---- dhcp-4.2.4b1/client/dhclient.c.improved-xid	2012-04-16
> 17:42:37.444217424 +0200
> -+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:45:32.105770755 +0200
> -@@ -888,6 +888,26 @@ main(int argc, char **argv) {
> +diff -up dhcp-4.3.4/client/dhclient.c.improved-xid dhcp-
> 4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.improved-xid	2016-04-29
> 12:54:55.997102182 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:57:25.123139587 +0200
> +@@ -1045,6 +1045,26 @@ main(int argc, char **argv) {
>   		}
>   	}
>   
> @@ -28,7 +28,7 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-
> 4.2.4b1/client/dhclien
>   	/* At this point, all the interfaces that the script thinks
>   	   are relevant should be running, so now we once again call
>   	   discover_interfaces(), and this time ask it to actually set
> -@@ -902,14 +922,36 @@ main(int argc, char **argv) {
> +@@ -1059,14 +1079,36 @@ main(int argc, char **argv) {
>   	   Not much entropy, but we're booting, so we're not likely to
>   	   find anything better. */
>   	seed = 0;
> @@ -59,80 +59,80 @@ diff -up dhcp-4.2.4b1/client/dhclient.c.improved-xid dhcp-
> 4.2.4b1/client/dhclien
>  +		}
>  +		/* we only use seed and no current time as a broadcast reply
> */
>  +		/* will certainly be used by the hwaddrless interface */
> -+		srandom(seed);
> ++		srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) +
> (unsigned)getpid());
>  +	}
>  +	else
> -+	        srandom(seed + cur_time + (unsigned)getpid());
> ++	        srandom(seed + ((unsigned)(cur_tv.tv_usec * 1000000)) +
> (unsigned)getpid());
>   
>   	/* Setup specific Infiniband options */
>   	for (ip = interfaces; ip; ip = ip->next) {
> -@@ -1447,7 +1489,7 @@ void dhcpack (packet)
> +@@ -1633,7 +1675,7 @@ void dhcpack (packet)
>   		return;
>   	}
>   
>  -	log_info ("DHCPACK from %s", piaddr (packet -> client_addr));
> -+	log_info ("DHCPACK from %s (xid=0x%x)", piaddr (packet ->
> client_addr), client -> xid);
> ++	log_info ("DHCPACK from %s (xid=0x%x)", piaddr (packet ->
> client_addr), ntohl(client -> xid));
>   
>   	lease = packet_to_lease (packet, client);
>   	if (!lease) {
> -@@ -2164,7 +2206,7 @@ void dhcpnak (packet)
> +@@ -2541,7 +2583,7 @@ void dhcpnak (packet)
>   		return;
>   	}
>   
>  -	log_info ("DHCPNAK from %s", piaddr (packet -> client_addr));
> -+	log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet ->
> client_addr), client -> xid);
> ++	log_info ("DHCPNAK from %s (xid=0x%x)", piaddr (packet ->
> client_addr), ntohl(client -> xid));
>   
>   	if (!client -> active) {
>   #if defined (DEBUG)
> -@@ -2290,10 +2332,10 @@ void send_discover (cpp)
> - 		client -> packet.secs = htons (65535);
> - 	client -> secs = client -> packet.secs;
> - 
> +@@ -2674,10 +2716,10 @@ void send_discover (cpp)
> + 			  (long)(client -> interval));
> + 	} else
> + #endif
>  -	log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
>  +	log_info ("DHCPDISCOVER on %s to %s port %d interval %ld
> (xid=0x%x)",
>   	      client -> name ? client -> name : client -> interface -> name,
>   	      inet_ntoa (sockaddr_broadcast.sin_addr),
>  -	      ntohs (sockaddr_broadcast.sin_port), (long)(client ->
> interval));
> -+	      ntohs (sockaddr_broadcast.sin_port), (long)(client ->
> interval), client -> xid);
> ++	      ntohs (sockaddr_broadcast.sin_port), (long)(client ->
> interval), ntohl(client -> xid));
>   
>   	/* Send out a packet. */
> - 	result = send_packet(client->interface, NULL, &client->packet,
> -@@ -2577,10 +2619,10 @@ void send_request (cpp)
> - 			client -> packet.secs = htons (65535);
> - 	}
> - 
> + #if defined(DHCPv6) && defined(DHCP4o6)
> +@@ -2962,10 +3004,10 @@ void send_request (cpp)
> + 		log_info ("DHCPREQUEST");
> + 	} else
> + #endif
>  -	log_info ("DHCPREQUEST on %s to %s port %d",
>  +	log_info ("DHCPREQUEST on %s to %s port %d (xid=0x%x)",
>   	      client -> name ? client -> name : client -> interface -> name,
>   	      inet_ntoa (destination.sin_addr),
>  -	      ntohs (destination.sin_port));
> -+	      ntohs (destination.sin_port), client -> xid);
> - 
> - 	if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
> - 	    fallback_interface) {
> -@@ -2620,10 +2662,10 @@ void send_decline (cpp)
> - 
> - 	int result;
> ++	      ntohs (destination.sin_port), ntohl(client -> xid));
>   
> + #if defined(DHCPv6) && defined(DHCP4o6)
> + 	if (dhcpv4_over_dhcpv6) {
> +@@ -3022,10 +3064,10 @@ void send_decline (cpp)
> + 		log_info ("DHCPDECLINE");
> + 	} else
> + #endif
>  -	log_info ("DHCPDECLINE on %s to %s port %d",
>  +	log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)",
>   	      client->name ? client->name : client->interface->name,
>   	      inet_ntoa(sockaddr_broadcast.sin_addr),
>  -	      ntohs(sockaddr_broadcast.sin_port));
> -+	      ntohs(sockaddr_broadcast.sin_port), client -> xid);
> ++	      ntohs(sockaddr_broadcast.sin_port), ntohl(client -> xid));
>   
>   	/* Send out a packet. */
> - 	result = send_packet(client->interface, NULL, &client->packet,
> -@@ -2666,10 +2708,10 @@ void send_release (cpp)
> - 		return;
> - 	}
> - 
> + #if defined(DHCPv6) && defined(DHCP4o6)
> +@@ -3084,10 +3126,10 @@ void send_release (cpp)
> + 		log_info ("DHCPRELEASE");
> + 	} else
> + #endif
>  -	log_info ("DHCPRELEASE on %s to %s port %d",
>  +	log_info ("DHCPRELEASE on %s to %s port %d (xid=0x%x)",
>   	      client -> name ? client -> name : client -> interface -> name,
>   	      inet_ntoa (destination.sin_addr),
>  -	      ntohs (destination.sin_port));
> -+	      ntohs (destination.sin_port), client -> xid);
> ++	      ntohs (destination.sin_port), ntohl(client -> xid));
>   
> - 	if (fallback_interface) {
> - 		result = send_packet(fallback_interface, NULL, &client-
> >packet,
> + #if defined(DHCPv6) && defined(DHCP4o6)
> + 	if (dhcpv4_over_dhcpv6) {
> diff --git a/dhcp/patches/0023-dhcp-duidv4.patch b/dhcp/patches/0023-dhcp-
> duidv4.patch
> new file mode 100644
> index 0000000..52fde3b
> --- /dev/null
> +++ b/dhcp/patches/0023-dhcp-duidv4.patch
> @@ -0,0 +1,34 @@
> +diff -up dhcp-4.3.1b1/client/dhclient.8.KrJcIv dhcp-4.3.1b1/client/dhclient.8
> +--- dhcp-4.3.1b1/client/dhclient.8.KrJcIv	2014-07-10
> 17:39:25.852763873 +0200
> ++++ dhcp-4.3.1b1/client/dhclient.8	2014-07-10 17:54:26.841012988 +0200
> +@@ -458,6 +458,9 @@ used to construct a RFC4361 style client
> + in the client's messages.  This client id can be overridden by
> + setting a client id in the configuration file.  Overridding the
> + client id in this fashion is discouraged.
> ++This option is turned on by default, if you want to redefine or turn off
> ++sending of client id, use send dhcp-client-identifier = "better identifier"
> ++or send dhcp-client-identifier = "" in /etc/dhcp/dhclient.conf.
> + .TP
> + .BI \-I
> + Use the standard DDNS scheme from RFCs 4701 & 4702.  
> +diff -up dhcp-4.3.1b1/client/dhclient.c.KrJcIv dhcp-4.3.1b1/client/dhclient.c
> +--- dhcp-4.3.1b1/client/dhclient.c.KrJcIv	2014-07-10
> 17:54:26.829013157 +0200
> ++++ dhcp-4.3.1b1/client/dhclient.c	2014-07-10 17:55:50.155835918 +0200
> +@@ -73,7 +73,7 @@ struct sockaddr_in sockaddr_broadcast;
> + struct in_addr giaddr;
> + struct data_string default_duid;
> + int duid_type = 0;
> +-int duid_v4 = 0;
> ++int duid_v4 = 1;
> + int std_dhcid = 0;
> + 
> + /* ASSERT_STATE() does nothing now; it used to be
> +@@ -1301,7 +1301,7 @@ static void setup_ib_interface(struct in
> + 	}
> + 
> + 	/* No client ID specified */
> +-	log_fatal("dhcp-client-identifier must be specified for
> InfiniBand");
> ++	//log_fatal("dhcp-client-identifier must be specified for
> InfiniBand");
> + }
> + 
> + /* Individual States:
> diff --git a/dhcp/patches/0024-dhcp-duid_uuid.patch b/dhcp/patches/0024-dhcp-
> duid_uuid.patch
> new file mode 100644
> index 0000000..f90bc4a
> --- /dev/null
> +++ b/dhcp/patches/0024-dhcp-duid_uuid.patch
> @@ -0,0 +1,111 @@
> +diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.duid_uuid	2016-04-29
> 12:58:14.846150838 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 12:58:14.851150839 +0200
> +@@ -3868,6 +3868,59 @@ write_options(struct client_state *clien
> + 	}
> + }
> + 
> ++int unhexchar(char c) {
> ++
> ++	if (c >= '0' && c <= '9')
> ++		return c - '0';
> ++
> ++	if (c >= 'a' && c <= 'f')
> ++		return c - 'a' + 10;
> ++
> ++	if (c >= 'A' && c <= 'F')
> ++		return c - 'A' + 10;
> ++
> ++	return -1;
> ++}
> ++
> ++isc_result_t
> ++read_uuid(u_int8_t* uuid) {
> ++	const char *id_fname = "/etc/machine-id";
> ++	char id[32];
> ++	size_t nread;
> ++	FILE * file = fopen( id_fname , "r");
> ++	if (!file) {
> ++		log_debug("Cannot open %s", id_fname);
> ++		return ISC_R_IOERROR;
> ++	}
> ++	nread = fread(id, 1, sizeof id, file);
> ++	fclose(file);
> ++
> ++	if (nread < 32) {
> ++		log_debug("Not enough data in %s", id_fname);
> ++		return ISC_R_IOERROR;
> ++	}
> ++
> ++	for (int j = 0; j < 16; j++) {
> ++		int a, b;
> ++
> ++		a = unhexchar(id[j*2]);
> ++		b = unhexchar(id[j*2+1]);
> ++
> ++		if (a < 0 || b < 0) {
> ++			log_debug("Wrong data in %s", id_fname);
> ++                        return ISC_R_IOERROR;
> ++		}
> ++		uuid[j] = a << 4 | b;
> ++	}
> ++
> ++	/* Set UUID version to 4 --- truly random generation */
> ++	uuid[6] = (uuid[6] & 0x0F) | 0x40;
> ++	/* Set the UUID variant to DCE */
> ++	uuid[8] = (uuid[8] & 0x3F) | 0x80;
> ++
> ++	return ISC_R_SUCCESS;
> ++}
> ++
> + /*
> +  * The "best" default DUID, since we cannot predict any information
> +  * about the system (such as whether or not the hardware addresses are
> +@@ -3888,6 +3941,7 @@ form_duid(struct data_string *duid, cons
> + 	struct interface_info *ip;
> + 	int len;
> + 	char *str;
> ++	u_int8_t uuid[16];
> + 
> + 	/* For now, just use the first interface on the list. */
> + 	ip = interfaces;
> +@@ -3908,9 +3962,16 @@ form_duid(struct data_string *duid, cons
> + 	    (ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
> + 		log_fatal("Impossible hardware address length at %s:%d.",
> MDL);
> + 
> +-	if (duid_type == 0)
> +-		duid_type = stateless ? DUID_LL : DUID_LLT;
> +-
> ++	if (duid_type == 0) {
> ++		if (read_uuid(uuid) == ISC_R_SUCCESS)
> ++		    duid_type = DUID_UUID;
> ++		else
> ++		    duid_type = stateless ? DUID_LL : DUID_LLT;
> ++	}
> ++	
> ++	if (duid_type == DUID_UUID)
> ++		len = 2 + sizeof (uuid);
> ++	else {
> + 	/*
> + 	 * 2 bytes for the 'duid type' field.
> + 	 * 2 bytes for the 'htype' field.
> +@@ -3921,13 +3982,18 @@ form_duid(struct data_string *duid, cons
> + 	len = 4 + (ip->hw_address.hlen - 1);
> + 	if (duid_type == DUID_LLT)
> + 		len += 4;
> ++	}
> + 	if (!buffer_allocate(&duid->buffer, len, MDL))
> + 		log_fatal("no memory for default DUID!");
> + 	duid->data = duid->buffer->data;
> + 	duid->len = len;
> + 
> ++	if (duid_type == DUID_UUID) {
> ++		putUShort(duid->buffer->data, DUID_UUID);
> ++		memcpy(duid->buffer->data + 2, uuid, sizeof(uuid));
> ++	}
> + 	/* Basic Link Local Address type of DUID. */
> +-	if (duid_type == DUID_LLT) {
> ++	else if (duid_type == DUID_LLT) {
> + 		putUShort(duid->buffer->data, DUID_LLT);
> + 		putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
> + 		putULong(duid->buffer->data + 4, cur_time -
> DUID_TIME_EPOCH);
> diff --git a/dhcp/patches/dhcp-4.2.4-getifaddrs.patch b/dhcp/patches/0025-
> dhcp-getifaddrs.patch
> similarity index 89%
> rename from dhcp/patches/dhcp-4.2.4-getifaddrs.patch
> rename to dhcp/patches/0025-dhcp-getifaddrs.patch
> index 330a1fc..586c3b0 100644
> --- a/dhcp/patches/dhcp-4.2.4-getifaddrs.patch
> +++ b/dhcp/patches/0025-dhcp-getifaddrs.patch
> @@ -1,19 +1,7 @@
> -From c09dd24a7d63988e0acef7d033bd3e088fc005c0 Mon Sep 17 00:00:00 2001
> -From: Jiri Popelka <jpopelka@redhat.com>
> -Date: Thu, 24 Jan 2013 12:39:50 +0100
> -Subject: [PATCH] Linux interface discovery
> -
> -Use the same discovery code as for *BSD and OS X,
> -i.e. the getifaddrs() function.
> ----
> - common/discover.c | 398 +++-------------------------------------------------
> --
> - 1 file changed, 17 insertions(+), 381 deletions(-)
> -
> -diff --git a/common/discover.c b/common/discover.c
> -index 1d84219..f2a8f6d 100644
> ---- a/common/discover.c
> -+++ b/common/discover.c
> -@@ -379,391 +379,13 @@ end_iface_scan(struct iface_conf_list *ifaces) {
> +diff -up dhcp-4.3.5b1/common/discover.c.getifaddrs dhcp-
> 4.3.5b1/common/discover.c
> +--- dhcp-4.3.5b1/common/discover.c.getifaddrs	2016-09-12
> 17:10:39.585374741 +0200
> ++++ dhcp-4.3.5b1/common/discover.c	2016-09-12 17:15:56.160628636 +0200
> +@@ -373,392 +373,13 @@ end_iface_scan(struct iface_conf_list *i
>   	ifaces->sock = -1;
>   }
>   
> @@ -55,7 +43,7 @@ index 1d84219..f2a8f6d 100644
>  - */
>  -int 
>  -begin_iface_scan(struct iface_conf_list *ifaces) {
> --	char buf[256];
> +-	char buf[IF_LINE_LENGTH];
>  -	int len;
>  -	int i;
>  -
> @@ -128,7 +116,7 @@ index 1d84219..f2a8f6d 100644
>  - */
>  -static int
>  -next_iface4(struct iface_info *info, int *err, struct iface_conf_list
> *ifaces) {
> --	char buf[256];
> +-	char buf[IF_LINE_LENGTH];
>  -	int len;
>  -	char *p;
>  -	char *name;
> @@ -191,7 +179,7 @@ index 1d84219..f2a8f6d 100644
>  -				log_error("Interface name '%s' too long",
> name);
>  -				return 0;
>  -			}
> --			strcpy(info->name, name);
> +-			strncpy(info->name, name, sizeof(info->name) - 1);
>  -
>  -#ifdef ALIAS_NAMED_PERMUTED
>  -			/* interface aliases look like "eth0:1" or "wlan1:3"
> */
> @@ -208,7 +196,7 @@ index 1d84219..f2a8f6d 100644
>  -#endif
>  -
>  -		memset(&tmp, 0, sizeof(tmp));
> --		strcpy(tmp.ifr_name, name);
> +-		strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
>  -		if (ioctl(ifaces->sock, SIOCGIFADDR, &tmp) < 0) {
>  -			if (errno == EADDRNOTAVAIL) {
>  -				continue;
> @@ -221,7 +209,7 @@ index 1d84219..f2a8f6d 100644
>  -		memcpy(&info->addr, &tmp.ifr_addr, sizeof(tmp.ifr_addr));
>  -
>  -		memset(&tmp, 0, sizeof(tmp));
> --		strcpy(tmp.ifr_name, name);
> +-		strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
>  -		if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
>  -			log_error("Error getting interface flags for '%s';
> %m", 
>  -			  	name);
> @@ -252,7 +240,7 @@ index 1d84219..f2a8f6d 100644
>  - */
>  -static int
>  -next_iface6(struct iface_info *info, int *err, struct iface_conf_list
> *ifaces) {
> --	char buf[256];
> +-	char buf[IF_LINE_LENGTH];
>  -	int len;
>  -	char *p;
>  -	char *name;
> @@ -308,7 +296,7 @@ index 1d84219..f2a8f6d 100644
>  -			log_error("IPv6 interface name '%s' too long",
> name);
>  -			return 0;
>  -		}
> --		strcpy(info->name, name);
> +-		strncpy(info->name, name, sizeof(info->name) - 1);
>  -
>  -#ifdef SKIP_DUMMY_INTERFACES
>  -	} while (strncmp(info->name, "dummy", 5) == 0);
> @@ -346,7 +334,7 @@ index 1d84219..f2a8f6d 100644
>  -	 * Get our flags.
>  -	 */
>  -	memset(&tmp, 0, sizeof(tmp));
> --	strcpy(tmp.ifr_name, name);
> +-	strncpy(tmp.ifr_name, name, sizeof(tmp.ifr_name) - 1);
>  -	if (ioctl(ifaces->sock, SIOCGIFFLAGS, &tmp) < 0) {
>  -		log_error("Error getting interface flags for '%s'; %m",
> name);
>  -		*err = 1;
> @@ -367,6 +355,7 @@ index 1d84219..f2a8f6d 100644
>  - */
>  -int
>  -next_iface(struct iface_info *info, int *err, struct iface_conf_list
> *ifaces) {
> +-	memset(info, 0, sizeof(struct iface_info));
>  -	if (next_iface4(info, err, ifaces)) {
>  -		return 1;
>  -	}
> @@ -402,11 +391,11 @@ index 1d84219..f2a8f6d 100644
>    * -----------
>    *
>  - * FreeBSD, NetBSD, OpenBSD, and OS X all have the getifaddrs() 
> -+ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs()
> ++ * FreeBSD, NetBSD, OpenBSD, OS X and Linux all have the getifaddrs() 
>    * function.
>    *
>    * The getifaddrs() man page describes the use.
> -@@ -811,6 +433,8 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
> +@@ -806,6 +427,8 @@ begin_iface_scan(struct iface_conf_list
>    */
>   int
>   next_iface(struct iface_info *info, int *err, struct iface_conf_list
> *ifaces) {
> @@ -415,10 +404,10 @@ index 1d84219..f2a8f6d 100644
>   	if (ifaces->next == NULL) {
>   		*err = 0;
>   		return 0;
> -@@ -822,8 +446,20 @@ next_iface(struct iface_info *info, int *err, struct
> iface_conf_list *ifaces) {
> - 		return 0;
> +@@ -818,8 +441,20 @@ next_iface(struct iface_info *info, int
>   	}
> - 	strcpy(info->name, ifaces->next->ifa_name);
> + 	memset(info, 0, sizeof(struct iface_info));
> + 	strncpy(info->name, ifaces->next->ifa_name, sizeof(info->name) - 1);
>  -	memcpy(&info->addr, ifaces->next->ifa_addr, 
>  -	       ifaces->next->ifa_addr->sa_len);
>  +
> @@ -438,6 +427,3 @@ index 1d84219..f2a8f6d 100644
>   	info->flags = ifaces->next->ifa_flags;
>   	ifaces->next = ifaces->next->ifa_next;
>   	*err = 0;
> --- 
> -1.8.1
> -
> diff --git a/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
> b/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
> new file mode 100644
> index 0000000..7b9f271
> --- /dev/null
> +++ b/dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch
> @@ -0,0 +1,61 @@
> +diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.bind-iface	2016-04-29
> 13:06:50.595257108 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:08:30.237281528 +0200
> +@@ -3023,6 +3023,14 @@ void send_request (cpp)
> + #endif
> + 	if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
> + 	    fallback_interface) {
> ++#if defined(SO_BINDTODEVICE)
> ++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
> ++			       SO_BINDTODEVICE, client->interface->name,
> ++			       strlen(client->interface->name)) < 0) {
> ++			log_error("%s:%d: Failed to bind fallback interface"
> ++				  " to %s: %m", MDL, client->interface-
> >name);
> ++		}
> ++#endif
> + 		result = send_packet(fallback_interface, NULL, &client-
> >packet,
> + 				     client->packet_length, from,
> &destination,
> + 				     NULL);
> +@@ -3032,6 +3040,13 @@ void send_request (cpp)
> + 				  client->packet_length,
> + 				  fallback_interface->name);
> + 		}
> ++#if defined(SO_BINDTODEVICE)
> ++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
> ++			       SO_BINDTODEVICE, NULL, 0) < 0) {
> ++			log_fatal("%s:%d: Failed to unbind fallback
> interface:"
> ++				  " %m", MDL);
> ++		}
> ++#endif
> +         }
> + 	else {
> + 		/* Send out a packet. */
> +@@ -3144,6 +3159,14 @@ void send_release (cpp)
> + 	} else
> + #endif
> + 	if (fallback_interface) {
> ++#if defined(SO_BINDTODEVICE)
> ++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
> ++			       SO_BINDTODEVICE, client->interface->name,
> ++			       strlen(client->interface->name)) < 0) {
> ++			log_error("%s:%d: Failed to bind fallback interface"
> ++				  " to %s: %m", MDL, client->interface-
> >name);
> ++		}
> ++#endif
> + 		result = send_packet(fallback_interface, NULL, &client-
> >packet,
> + 				      client->packet_length, from,
> &destination,
> + 				      NULL);
> +@@ -3153,6 +3176,13 @@ void send_release (cpp)
> + 				  client->packet_length,
> + 				  fallback_interface->name);
> + 		}
> ++#if defined(SO_BINDTODEVICE)
> ++		if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
> ++			       SO_BINDTODEVICE, NULL, 0) < 0) {
> ++			log_fatal("%s:%d: Failed to unbind fallback
> interface:"
> ++				  " %m", MDL);
> ++		}
> ++#endif
> +         } else {
> + 		/* Send out a packet. */
> + 		result = send_packet(client->interface, NULL, &client-
> >packet,
> diff --git a/dhcp/patches/dhcp-4.2.4-P1-interval.patch b/dhcp/patches/0027-
> dhcp-interval.patch
> similarity index 72%
> rename from dhcp/patches/dhcp-4.2.4-P1-interval.patch
> rename to dhcp/patches/0027-dhcp-interval.patch
> index e8e89c1..8fff47c 100644
> --- a/dhcp/patches/dhcp-4.2.4-P1-interval.patch
> +++ b/dhcp/patches/0027-dhcp-interval.patch
> @@ -1,7 +1,7 @@
> -diff -up dhcp-4.2.4/common/dispatch.c.foo dhcp-4.2.4/common/dispatch.c
> ---- dhcp-4.2.4/common/dispatch.c.foo	2012-07-26 21:31:43.875349675
> -0500
> -+++ dhcp-4.2.4/common/dispatch.c	2012-07-26 21:39:14.961710319 -0500
> -@@ -324,7 +324,20 @@ void add_timeout (when, where, what, ref
> +diff -up dhcp-4.3.0a1/common/dispatch.c.interval dhcp-
> 4.3.0a1/common/dispatch.c
> +--- dhcp-4.3.0a1/common/dispatch.c.interval	2013-12-20
> 13:51:14.385260622 +0100
> ++++ dhcp-4.3.0a1/common/dispatch.c	2013-12-20 13:51:14.493259116 +0100
> +@@ -343,7 +343,20 @@ void add_timeout (when, where, what, ref
>   	q->next  = timeouts;
>   	timeouts = q;
>   
> diff --git a/dhcp/patches/0028-dhcp-no-subnet-error2info.patch
> b/dhcp/patches/0028-dhcp-no-subnet-error2info.patch
> new file mode 100644
> index 0000000..975a4d4
> --- /dev/null
> +++ b/dhcp/patches/0028-dhcp-no-subnet-error2info.patch
> @@ -0,0 +1,48 @@
> +diff -up dhcp-4.3.0a1/common/discover.c.error2info dhcp-
> 4.3.0a1/common/discover.c
> +--- dhcp-4.3.0a1/common/discover.c.error2info	2013-12-20
> 13:59:15.148553898 +0100
> ++++ dhcp-4.3.0a1/common/discover.c	2013-12-20 13:59:15.181553438 +0100
> +@@ -779,9 +779,9 @@ discover_interfaces(int state) {
> + 
> + 		/* We must have a subnet declaration for each interface. */
> + 		if (!tmp->shared_network && (state == DISCOVER_SERVER)) {
> +-			log_error("%s", "");
> ++			log_info("%s", "");
> + 			if (local_family == AF_INET) {
> +-				log_error("No subnet declaration for %s
> (%s).",
> ++				log_info("No subnet declaration for %s
> (%s).",
> + 					  tmp->name, 
> + 					  (tmp->addresses == NULL) ?
> + 					   "no IPv4 addresses" :
> +@@ -796,26 +796,26 @@ discover_interfaces(int state) {
> + 				} else {
> + 					strcpy(abuf, "no IPv6 addresses");
> + 				}
> +-				log_error("No subnet6 declaration for %s
> (%s).",
> ++				log_info("No subnet6 declaration for %s
> (%s).",
> + 					  tmp->name,
> + 					  abuf);
> + #endif /* DHCPv6 */
> + 			}
> + 			if (supports_multiple_interfaces(tmp)) {
> +-				log_error ("** Ignoring requests on
> %s.  %s",
> ++				log_info ("** Ignoring requests on %s.  %s",
> + 					   tmp -> name, "If this is not
> what");
> +-				log_error ("   you want, please write %s",
> ++				log_info ("   you want, please write %s",
> + #ifdef DHCPv6
> + 				           (local_family != AF_INET) ?
> + 					   "a subnet6 declaration" :
> + #endif
> + 					   "a subnet declaration");
> +-				log_error ("   in your dhcpd.conf file %s",
> ++				log_info ("   in your dhcpd.conf file %s",
> + 					   "for the network segment");
> +-				log_error ("   to %s %s %s",
> ++				log_info ("   to %s %s %s",
> + 					   "which interface",
> + 					   tmp -> name, "is attached. **");
> +-				log_error ("%s", "");
> ++				log_info ("%s", "");
> + 				goto next;
> + 			} else {
> + 				log_error ("You must write a %s",
> diff --git a/dhcp/patches/0029-dhcp-sd_notify.patch b/dhcp/patches/0029-dhcp-
> sd_notify.patch
> new file mode 100644
> index 0000000..a123923
> --- /dev/null
> +++ b/dhcp/patches/0029-dhcp-sd_notify.patch
> @@ -0,0 +1,79 @@
> +diff -up dhcp-4.3.4/configure.ac.sd_notify dhcp-4.3.4/configure.ac
> +--- dhcp-4.3.4/configure.ac.sd_notify	2016-04-29 13:08:52.813287060
> +0200
> ++++ dhcp-4.3.4/configure.ac	2016-04-29 13:08:52.872287075 +0200
> +@@ -832,6 +832,17 @@ if test x$ldap = xyes || test x$ldapcryp
> +     AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
> + fi
> + 
> ++AC_ARG_WITH(systemd,
> ++        AC_HELP_STRING([--with-systemd],
> ++                       [enable sending status notifications to systemd
> daemon (default is no)]),
> ++        [systemd=$withval],
> ++        [systemd=no])
> ++
> ++if test x$systemd = xyes ; then
> ++   AC_CHECK_LIB(systemd, sd_notifyf, ,
> ++                AC_MSG_FAILURE([*** systemd library not present - do you
> need to install systemd-libs package?]))
> ++fi
> ++
> + # Append selected warning levels to CFLAGS before substitution (but after
> + # AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
> + CFLAGS="$CFLAGS $STD_CWARNINGS"
> +diff -up dhcp-4.3.4/relay/dhcrelay.c.sd_notify dhcp-4.3.4/relay/dhcrelay.c
> +--- dhcp-4.3.4/relay/dhcrelay.c.sd_notify	2016-04-29
> 13:08:52.814287061 +0200
> ++++ dhcp-4.3.4/relay/dhcrelay.c	2016-04-29 13:08:52.872287075 +0200
> +@@ -37,6 +37,10 @@
> +    int keep_capabilities = 0;
> + #endif
> + 
> ++#ifdef HAVE_LIBSYSTEMD
> ++#include <systemd/sd-daemon.h>
> ++#endif
> ++
> + TIME default_lease_time = 43200; /* 12 hours... */
> + TIME max_lease_time = 86400; /* 24 hours... */
> + struct tree_cache *global_options[256];
> +@@ -709,6 +713,14 @@ main(int argc, char **argv) {
> + 	}
> + #endif
> + 
> ++#ifdef HAVE_LIBSYSTEMD
> ++        /* We are ready to process incomming packets. Let's notify systemd
> */
> ++        sd_notifyf(0, "READY=1\n"
> ++                   "STATUS=Dispatching packets...\n"
> ++                   "MAINPID=%lu",
> ++                   (unsigned long) getpid());
> ++#endif
> ++
> + 	/* Start dispatching packets and timeouts... */
> + 	dispatch();
> + 
> +diff -up dhcp-4.3.4/server/dhcpd.c.sd_notify dhcp-4.3.4/server/dhcpd.c
> +--- dhcp-4.3.4/server/dhcpd.c.sd_notify	2016-04-29 13:08:52.873287075
> +0200
> ++++ dhcp-4.3.4/server/dhcpd.c	2016-04-29 13:12:00.655333096 +0200
> +@@ -57,6 +57,10 @@ uid_t set_uid = 0;
> + gid_t set_gid = 0;
> + #endif /* PARANOIA */
> + 
> ++#ifdef HAVE_LIBSYSTEMD
> ++#include <systemd/sd-daemon.h>
> ++#endif
> ++
> + struct iaddr server_identifier;
> + int server_identifier_matched;
> + 
> +@@ -931,6 +935,14 @@ main(int argc, char **argv) {
> + 	/* Log that we are about to start working */
> + 	log_info("Server starting service.");
> + 
> ++#ifdef HAVE_LIBSYSTEMD
> ++        /* We are ready to process incomming packets. Let's notify systemd
> */
> ++        sd_notifyf(0, "READY=1\n"
> ++                   "STATUS=Dispatching packets...\n"
> ++                   "MAINPID=%lu",
> ++                   (unsigned long) getpid());
> ++#endif
> ++
> + 	/*
> + 	 * Receive packets and dispatch them...
> + 	 * dispatch() will never return.
> diff --git a/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
> b/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
> new file mode 100644
> index 0000000..fac2ace
> --- /dev/null
> +++ b/dhcp/patches/0030-dhcp-option97-pxe-client-id.patch
> @@ -0,0 +1,217 @@
> +diff -up dhcp-4.3.5b1/common/options.c.option97 dhcp-4.3.5b1/common/options.c
> +--- dhcp-4.3.5b1/common/options.c.option97	2016-09-12
> 17:17:13.972691041 +0200
> ++++ dhcp-4.3.5b1/common/options.c	2016-09-12 17:19:17.706790276 +0200
> +@@ -4434,13 +4434,26 @@ int validate_packet(struct packet *packe
> + 				"a future version of ISC DHCP will reject
> this");
> + 		}
> + 	} else {
> +-		/*
> +-		 * If hlen is 0 we don't have any identifier, we warn the
> user
> +-		 * but continue processing the packet as we can.
> +-		 */
> +-		if (packet->raw->hlen == 0) {
> +-			log_debug("Received DHCPv4 packet without client-id"
> +-				  " option and empty hlen field.");
> ++		oc = lookup_option (&dhcp_universe, packet->options,
> ++				    DHO_PXE_CLIENT_ID);
> ++		if (oc) {
> ++			/* Let's check if pxe-client-id is sane */
> ++			if ((oc->data.len < 2) ||
> ++			    (oc->data.data[0] == '\0' &&
> ++			     oc->data.len != 17)) {
> ++				log_debug("Dropped DHCPv4 packet with wrong
> "
> ++				    "(len == %d) pxe-client-id", oc-
> >data.len);
> ++				return (0);
> ++			}
> ++		} else {
> ++			/*
> ++			 * If hlen is 0 we don't have any identifier, we
> warn the user
> ++			 * but continue processing the packet as we can.
> ++			 */
> ++			if (packet->raw->hlen == 0) {
> ++				log_debug("Received DHCPv4 packet without
> client-id"
> ++						" option and empty hlen
> field.");
> ++			}
> + 		}
> + 	}
> + 
> +diff -up dhcp-4.3.5b1/common/tables.c.option97 dhcp-4.3.5b1/common/tables.c
> +--- dhcp-4.3.5b1/common/tables.c.option97	2016-09-12
> 17:17:13.927691005 +0200
> ++++ dhcp-4.3.5b1/common/tables.c	2016-09-12 17:17:13.972691041 +0200
> +@@ -196,8 +196,9 @@ static struct option dhcp_options[] = {
> + 	/* Defined by RFC 4578 */
> + 	{ "pxe-system-type", "S",		&dhcp_universe,  93, 1 },
> + 	{ "pxe-interface-id", "BBB",		&dhcp_universe,  94, 1
> },
> +-	{ "pxe-client-id", "BX",		&dhcp_universe,  97, 1 },
> + #endif
> ++	{ "pxe-client-id", "BX",		&dhcp_universe,  97, 1 },
> ++
> + 	{ "uap-servers", "t",			&dhcp_universe,  98, 1
> },
> + #if defined(RFC4776_OPTIONS)
> +         { "geoconf-civic", "X",                 &dhcp_universe, 99, 1 },
> +diff -up dhcp-4.3.5b1/includes/dhcp.h.option97 dhcp-4.3.5b1/includes/dhcp.h
> +--- dhcp-4.3.5b1/includes/dhcp.h.option97	2016-09-12
> 17:17:13.936691013 +0200
> ++++ dhcp-4.3.5b1/includes/dhcp.h	2016-09-12 17:17:13.972691041 +0200
> +@@ -159,6 +159,7 @@ struct dhcp_packet {
> + #define DHO_AUTHENTICATE			90  /* RFC3118, was 210 */
> + #define DHO_CLIENT_LAST_TRANSACTION_TIME	91
> + #define DHO_ASSOCIATED_IP			92
> ++#define DHO_PXE_CLIENT_ID			97  /* RFC4578 */
> + #define DHO_SUBNET_SELECTION			118 /* RFC3011! */
> + #define DHO_DOMAIN_SEARCH			119 /* RFC3397 */
> + #define DHO_CLASSLESS_STATIC_ROUTES		121 /* RFC3442 */
> +diff -up dhcp-4.3.5b1/server/dhcp.c.option97 dhcp-4.3.5b1/server/dhcp.c
> +--- dhcp-4.3.5b1/server/dhcp.c.option97	2016-09-12 17:17:13.947691021
> +0200
> ++++ dhcp-4.3.5b1/server/dhcp.c	2016-09-12 17:17:13.973691042 +0200
> +@@ -221,6 +221,10 @@ dhcp (struct packet *packet) {
> + 			oc = lookup_option (&dhcp_universe, packet ->
> options,
> + 					    DHO_DHCP_CLIENT_IDENTIFIER);
> + 			if (!oc)
> ++				oc = lookup_option (&dhcp_universe,
> ++						    packet -> options,
> ++						    DHO_PXE_CLIENT_ID);
> ++			if (!oc)
> + 				goto nolease;
> + 
> + 			memset (&data, 0, sizeof data);
> +@@ -818,6 +822,9 @@ void dhcprelease (packet, ms_nulltp)
> + 
> + 	oc = lookup_option (&dhcp_universe, packet -> options,
> + 			    DHO_DHCP_CLIENT_IDENTIFIER);
> ++	if (!oc)
> ++		oc = lookup_option (&dhcp_universe, packet -> options,
> ++				    DHO_PXE_CLIENT_ID);
> + 	memset (&data, 0, sizeof data);
> + 	if (oc &&
> + 	    evaluate_option_cache (&data, packet, (struct lease *)0,
> +@@ -1286,6 +1293,9 @@ void dhcpinform (packet, ms_nulltp)
> +          */
> + 	oc = lookup_option(&dhcp_universe, packet->options,
> + 			   DHO_DHCP_CLIENT_IDENTIFIER);
> ++	if (!oc)
> ++		oc = lookup_option (&dhcp_universe, packet -> options,
> ++				    DHO_PXE_CLIENT_ID);
> + 	memset(&d1, 0, sizeof(d1));
> + 	if (oc &&
> + 	    evaluate_option_cache(&d1, packet, NULL, NULL,
> +@@ -2381,6 +2391,9 @@ void ack_lease (packet, lease, offer, wh
> + 		   can be used. */
> + 		oc = lookup_option (&dhcp_universe, packet -> options,
> + 				    DHO_DHCP_CLIENT_IDENTIFIER);
> ++		if (!oc)
> ++			oc = lookup_option (&dhcp_universe, packet ->
> options,
> ++					    DHO_PXE_CLIENT_ID);
> + 		if (oc &&
> + 		    evaluate_option_cache (&d1, packet, lease,
> + 					   (struct client_state *)0,
> +@@ -2962,6 +2975,9 @@ void ack_lease (packet, lease, offer, wh
> + 		/* Record the uid, if given... */
> + 		oc = lookup_option (&dhcp_universe, packet -> options,
> + 				    DHO_DHCP_CLIENT_IDENTIFIER);
> ++		if (!oc)
> ++			oc = lookup_option (&dhcp_universe, packet ->
> options,
> ++					    DHO_PXE_CLIENT_ID);
> + 		if (oc &&
> + 		    evaluate_option_cache(&d1, packet, lease, NULL,
> + 					  packet->options, state->options,
> +@@ -4068,6 +4084,9 @@ int find_lease (struct lease **lp,
> + 	   specified unique client identifier. */
> + 	oc = lookup_option (&dhcp_universe, packet -> options,
> + 			    DHO_DHCP_CLIENT_IDENTIFIER);
> ++	if (!oc)
> ++		oc = lookup_option (&dhcp_universe, packet -> options,
> ++				    DHO_PXE_CLIENT_ID);
> + 	memset (&client_identifier, 0, sizeof client_identifier);
> + 	if (oc &&
> + 	    evaluate_option_cache (&client_identifier,
> +diff -up dhcp-4.3.5b1/server/dhcpd.conf.5.option97 dhcp-
> 4.3.5b1/server/dhcpd.conf.5
> +--- dhcp-4.3.5b1/server/dhcpd.conf.5.option97	2016-09-12
> 17:17:13.885690972 +0200
> ++++ dhcp-4.3.5b1/server/dhcpd.conf.5	2016-09-12 17:17:13.974691043
> +0200
> +@@ -1587,10 +1587,12 @@ should be a name identifying the host.
> + not specified for the host, \fIhostname\fR is used.
> + .PP
> + \fIHost\fR declarations are matched to actual DHCP or BOOTP clients
> +-by matching the \fRdhcp-client-identifier\fR option specified in the
> ++by matching the \fIdhcp-client-identifier\fR or \fIpxe-client-id\fR
> ++options specified in the
> + \fIhost\fR declaration to the one supplied by the client, or, if the
> + \fIhost\fR declaration or the client does not provide a
> +-\fRdhcp-client-identifier\fR option, by matching the \fIhardware\fR
> ++\fIdhcp-client-identifier\fR or \fIpxe-client-id\fR options,
> ++by matching the \fIhardware\fR
> + parameter in the \fIhost\fR declaration to the network hardware
> + address supplied by the client.  BOOTP clients do not normally
> + provide a \fIdhcp-client-identifier\fR, so the hardware address must
> +@@ -1602,7 +1604,8 @@ to identify hosts.
> + .PP
> + Please be aware that
> + .B only
> +-the \fIdhcp-client-identifier\fR option and the hardware address can be
> ++the \fIdhcp-client-identifier\fR and \fIpxe-client-id\fR
> ++options and the hardware address can be
> + used to match a host declaration, or the \fIhost-identifier option\fR
> + parameter for DHCPv6 servers.  For example, it is not possible to
> + match a host declaration to a \fIhost-name\fR option.  This is
> +diff -up dhcp-4.3.5b1/server/dhcpleasequery.c.option97 dhcp-
> 4.3.5b1/server/dhcpleasequery.c
> +--- dhcp-4.3.5b1/server/dhcpleasequery.c.option97	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/server/dhcpleasequery.c	2016-09-12 17:17:13.974691043
> +0200
> +@@ -273,7 +273,7 @@ dhcpleasequery(struct packet *packet, in
> + 		 */
> + 
> + 		memset(&uid, 0, sizeof(uid));
> +-		if (get_option(&uid, 
> ++		i = get_option(&uid,
> + 			       &dhcp_universe,
> + 			       packet,
> + 			       NULL,
> +@@ -283,8 +283,20 @@ dhcpleasequery(struct packet *packet, in
> + 			       packet->options, 
> + 			       &global_scope,
> + 			       DHO_DHCP_CLIENT_IDENTIFIER,
> +-			       MDL)) {
> +-
> ++			       MDL);
> ++		if (!i)
> ++			i = get_option(&uid,
> ++				       &dhcp_universe,
> ++				       packet,
> ++				       NULL,
> ++				       NULL,
> ++				       packet->options,
> ++				       NULL,
> ++				       packet->options,
> ++				       &global_scope,
> ++				       DHO_PXE_CLIENT_ID,
> ++				       MDL);
> ++		if (i) {
> + 			snprintf(dbg_info, 
> + 				 sizeof(dbg_info), 
> + 				 "client-id %s",
> +diff -up dhcp-4.3.5b1/server/failover.c.option97 dhcp-
> 4.3.5b1/server/failover.c
> +--- dhcp-4.3.5b1/server/failover.c.option97	2016-08-26
> 20:19:53.000000000 +0200
> ++++ dhcp-4.3.5b1/server/failover.c	2016-09-12 17:17:13.975691044 +0200
> +@@ -5957,6 +5957,9 @@ int load_balance_mine (struct packet *pa
> + 
> + 	oc = lookup_option(&dhcp_universe, packet->options,
> + 			   DHO_DHCP_CLIENT_IDENTIFIER);
> ++	if (!oc)
> ++		oc = lookup_option(&dhcp_universe, packet -> options,
> ++				    DHO_PXE_CLIENT_ID);
> + 	memset(&ds, 0, sizeof ds);
> + 	if (oc &&
> + 	    evaluate_option_cache(&ds, packet, NULL, NULL,
> +diff -up dhcp-4.3.5b1/server/mdb.c.option97 dhcp-4.3.5b1/server/mdb.c
> +--- dhcp-4.3.5b1/server/mdb.c.option97	2016-08-26 20:19:53.000000000
> +0200
> ++++ dhcp-4.3.5b1/server/mdb.c	2016-09-12 17:17:13.975691044 +0200
> +@@ -129,8 +129,9 @@ static int find_uid_statement (struct ex
> + 	    esp -> data.option &&
> + 	    (esp -> data.option -> option -> universe ==
> + 	     &dhcp_universe) &&
> +-	    (esp -> data.option -> option -> code ==
> +-	     DHO_DHCP_CLIENT_IDENTIFIER)) {
> ++	    ((esp -> data.option -> option -> code ==
> ++						DHO_DHCP_CLIENT_IDENTIFIER)
> ||
> ++	     (esp -> data.option -> option -> code == DHO_PXE_CLIENT_ID))) {
> + 		if (condp) {
> + 			log_error ("dhcp client identifier may not be %s",
> + 				   "specified conditionally.");
> diff --git a/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
> b/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
> new file mode 100644
> index 0000000..72b7b0f
> --- /dev/null
> +++ b/dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch
> @@ -0,0 +1,13 @@
> +diff -up dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT dhcp-
> 4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT	2016-04-29
> 13:13:50.467360008 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:14:53.389375428 +0200
> +@@ -1317,6 +1317,9 @@ void run_stateless(int exit_mode, u_int1
> + 			data_string_forget(&default_duid, MDL);
> + 
> + 		form_duid(&default_duid, MDL);
> ++		if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
> ++		    duid_type == DUID_LLT)
> ++			write_duid(&default_duid);
> + 	}
> + 
> + #ifdef DHCP4o6
> diff --git a/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
> b/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
> new file mode 100644
> index 0000000..0ce1cf8
> --- /dev/null
> +++ b/dhcp/patches/0032-dhcp-dhclient-preinit6s.patch
> @@ -0,0 +1,64 @@
> +diff -up dhcp-4.3.4/client/dhclient.c.preinit6s dhcp-4.3.4/client/dhclient.c
> +--- dhcp-4.3.4/client/dhclient.c.preinit6s	2016-04-29
> 13:15:10.361379493 +0200
> ++++ dhcp-4.3.4/client/dhclient.c	2016-04-29 13:17:43.622415423 +0200
> +@@ -812,6 +812,12 @@ main(int argc, char **argv) {
> + 
> + 	inaddr_any.s_addr = INADDR_ANY;
> + 
> ++	/* Discover all the network interfaces. */
> ++	discover_interfaces(DISCOVER_UNCONFIGURED);
> ++
> ++	/* Parse the dhclient.conf file. */
> ++	read_client_conf();
> ++
> + 	/* Stateless special case. */
> + 	if (stateless) {
> + 		if (release_mode || (wanted_ia_na > 0) ||
> +@@ -828,12 +834,6 @@ main(int argc, char **argv) {
> + 		return 0;
> + 	}
> + 
> +-	/* Discover all the network interfaces. */
> +-	discover_interfaces(DISCOVER_UNCONFIGURED);
> +-
> +-	/* Parse the dhclient.conf file. */
> +-	read_client_conf();
> +-
> + 	/* Parse any extra command line configuration arguments: */
> + 	if ((dhcp_client_identifier_arg != NULL) &&
> (*dhcp_client_identifier_arg != '\0')) {
> + 		arg_conf_len = asprintf(&arg_conf, "send dhcp-client-
> identifier \"%s\";", dhcp_client_identifier_arg);
> +@@ -1288,20 +1288,30 @@ void run_stateless(int exit_mode, u_int1
> + 	IGNORE_UNUSED(port);
> + #endif
> + 
> +-	/* Discover the network interface. */
> +-	discover_interfaces(DISCOVER_REQUESTED);
> ++	struct interface_info *ip;
> + 
> + 	if (!interfaces)
> + 		usage("No interfaces available for stateless command: %s",
> "-S");
> + 
> +-	/* Parse the dhclient.conf file. */
> + #ifdef DHCP4o6
> + 	if (dhcpv4_over_dhcpv6) {
> + 		/* Mark we want to request IRT too! */
> + 		dhcpv4_over_dhcpv6++;
> + 	}
> + #endif
> +-	read_client_conf();
> ++
> ++	for (ip = interfaces; ip; ip = ip->next) {
> ++		if ((interfaces_requested > 0) &&
> ++		    ((ip->flags & (INTERFACE_REQUESTED |
> ++				   INTERFACE_AUTOMATIC)) !=
> ++		     INTERFACE_REQUESTED))
> ++			continue;
> ++		script_init(ip->client, "PREINIT6", NULL);
> ++		script_go(ip->client);
> ++	}
> ++
> ++	/* Discover the network interface. */
> ++	discover_interfaces(DISCOVER_REQUESTED);
> + 
> + 	/* Parse the lease database. */
> + 	read_client_leases();
> diff --git a/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
> b/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
> deleted file mode 100644
> index 4784d5a..0000000
> --- a/dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -diff -up dhcp-4.2.0/common/dispatch.c.dracut dhcp-4.2.0/common/dispatch.c
> ---- dhcp-4.2.0/common/dispatch.c.dracut	2010-06-01 19:29:59.000000000
> +0200
> -+++ dhcp-4.2.0/common/dispatch.c	2010-07-21 16:10:09.000000000 +0200
> -@@ -189,6 +189,10 @@ void add_timeout (when, where, what, ref
> - 	isc_interval_t interval;
> - 	isc_time_t expires;
> - 
> -+	if (when == NULL) {
> -+		return;
> -+	}
> -+
> - 	/* See if this timeout supersedes an existing timeout. */
> - 	t = (struct timeout *)0;
> - 	for (q = timeouts; q; q = q->next) {
> diff --git a/dhcp/patches/dhcp-4.2.0-errwarn-message.patch
> b/dhcp/patches/dhcp-4.2.0-errwarn-message.patch
> deleted file mode 100644
> index a0f70cd..0000000
> --- a/dhcp/patches/dhcp-4.2.0-errwarn-message.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -diff -up dhcp-4.2.0/omapip/errwarn.c.errwarn dhcp-4.2.0/omapip/errwarn.c
> ---- dhcp-4.2.0/omapip/errwarn.c.errwarn	2009-07-23 20:52:21.000000000
> +0200
> -+++ dhcp-4.2.0/omapip/errwarn.c	2010-07-21 13:23:47.000000000 +0200
> -@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... )
> - 
> - #if !defined (NOMINUM)
> -   log_error ("%s", "");
> --  log_error ("If you did not get this software from ftp.isc.org, please");
> --  log_error ("get the latest from ftp.isc.org and install that before");
> --  log_error ("requesting help.");
> -+  log_error ("This version of ISC DHCP is based on the release available");
> -+  log_error ("on ftp.isc.org.  Features have been added and other changes");
> -+  log_error ("have been made to the base software release in order to
> make");
> -+  log_error ("it work better with this distribution.");
> -   log_error ("%s", "");
> --  log_error ("If you did get this software from ftp.isc.org and have not");
> --  log_error ("yet read the README, please read it before requesting help.");
> --  log_error ("If you intend to request help from the dhcp-server@isc.org");
> --  log_error ("mailing list, please read the section on the README about");
> --  log_error ("submitting bug reports and requests for help.");
> --  log_error ("%s", "");
> --  log_error ("Please do not under any circumstances send requests for");
> --  log_error ("help directly to the authors of this software - please");
> --  log_error ("send them to the appropriate mailing list as described in");
> --  log_error ("the README file.");
> -+  log_error ("Please report for this software via the Red Hat Bugzilla
> site:");
> -+  log_error ("    http://bugzilla.redhat.com");
> -   log_error ("%s", "");
> -   log_error ("exiting.");
> - #endif
> diff --git a/dhcp/patches/dhcp-4.2.0-garbage-chars.patch b/dhcp/patches/dhcp-
> 4.2.0-garbage-chars.patch
> deleted file mode 100644
> index 118ff3f..0000000
> --- a/dhcp/patches/dhcp-4.2.0-garbage-chars.patch
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -diff -up dhcp-4.2.0/common/tables.c.garbage dhcp-4.2.0/common/tables.c
> ---- dhcp-4.2.0/common/tables.c.garbage	2009-11-20 02:49:01.000000000
> +0100
> -+++ dhcp-4.2.0/common/tables.c	2010-07-21 14:40:56.000000000 +0200
> -@@ -207,7 +207,7 @@ static struct option dhcp_options[] = {
> - 	{ "netinfo-server-tag", "t",		&dhcp_universe, 113, 1
> },
> - 	{ "default-url", "t",			&dhcp_universe, 114, 1
> },
> - 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
> --	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
> -+	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
> - 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1
> },
> - 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1
> },
> - #if 0
> diff --git a/dhcp/patches/dhcp-4.2.0-logpid.patch b/dhcp/patches/dhcp-4.2.0-
> logpid.patch
> deleted file mode 100644
> index c24adb1..0000000
> --- a/dhcp/patches/dhcp-4.2.0-logpid.patch
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -diff -up dhcp-4.2.0/client/dhclient.c.logpid dhcp-4.2.0/client/dhclient.c
> ---- dhcp-4.2.0/client/dhclient.c.logpid	2010-07-21 16:13:52.000000000
> +0200
> -+++ dhcp-4.2.0/client/dhclient.c	2010-07-21 16:16:51.000000000 +0200
> -@@ -154,7 +154,7 @@ main(int argc, char **argv) {
> - 	else if (fd != -1)
> - 		close(fd);
> - 
> --	openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
> -+	openlog("dhclient", LOG_NDELAY | LOG_PID, LOG_DAEMON);
> - 
> - #if !(defined(DEBUG) || defined(__CYGWIN32__))
> - 	setlogmask(LOG_UPTO(LOG_INFO));
> diff --git a/dhcp/patches/dhcp-4.2.1-retransmission.patch b/dhcp/patches/dhcp-
> 4.2.1-retransmission.patch
> deleted file mode 100644
> index 18e447f..0000000
> --- a/dhcp/patches/dhcp-4.2.1-retransmission.patch
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -diff -up dhcp-4.2.1b1/client/dhc6.c.retransmission dhcp-4.2.1b1/client/dhc6.c
> ---- dhcp-4.2.1b1/client/dhc6.c.retransmission	2011-01-28
> 08:40:56.000000000 +0100
> -+++ dhcp-4.2.1b1/client/dhc6.c	2011-01-28 08:39:22.000000000 +0100
> -@@ -361,7 +361,7 @@ dhc6_retrans_init(struct client_state *c
> - static void
> - dhc6_retrans_advance(struct client_state *client)
> - {
> --	struct timeval elapsed;
> -+	struct timeval elapsed, elapsed_after_RT;
> - 
> - 	/* elapsed = cur - start */
> - 	elapsed.tv_sec = cur_tv.tv_sec - client->start_time.tv_sec;
> -@@ -378,6 +378,8 @@ dhc6_retrans_advance(struct client_state
> - 		elapsed.tv_sec += 1;
> - 		elapsed.tv_usec -= 1000000;
> - 	}
> -+	elapsed_after_RT.tv_sec = elapsed.tv_sec;
> -+	elapsed_after_RT.tv_usec = elapsed.tv_usec;
> - 
> - 	/*
> - 	 * RT for each subsequent message transmission is based on the
> previous
> -@@ -415,13 +417,10 @@ dhc6_retrans_advance(struct client_state
> - 		elapsed.tv_usec -= 1000000;
> - 	}
> - 	if (elapsed.tv_sec >= client->MRD) {
> --		/*
> --		 * wake at RT + cur = start + MRD
> --		 */
> --		client->RT = client->MRD +
> --			(client->start_time.tv_sec - cur_tv.tv_sec);
> --		client->RT = client->RT * 100 +
> --			(client->start_time.tv_usec - cur_tv.tv_usec) /
> 10000;
> -+		client->RT = client->MRD - elapsed_after_RT.tv_sec;
> -+		client->RT = client->RT * 100 - elapsed_after_RT.tv_usec /
> 10000;
> -+		if (client->RT < 0)
> -+			client->RT = 0;
> - 	}
> - 	client->txcount++;
> - }
> -@@ -1497,7 +1496,7 @@ check_timing6 (struct client_state *clie
> - 	}
> - 
> - 	/* Check if finished (-1 argument). */
> --	if ((client->MRD != 0) && (elapsed.tv_sec > client->MRD)) {
> -+	if ((client->MRD != 0) && (elapsed.tv_sec >= client->MRD)) {
> - 		log_info("Max retransmission duration exceeded.");
> - 		return(CHK_TIM_MRD_EXCEEDED);
> - 	}
> diff --git a/dhcp/patches/dhcp-4.2.2-gpxe-cid.patch b/dhcp/patches/dhcp-4.2.2-
> gpxe-cid.patch
> deleted file mode 100644
> index fd73b2c..0000000
> --- a/dhcp/patches/dhcp-4.2.2-gpxe-cid.patch
> +++ /dev/null
> @@ -1,83 +0,0 @@
> -diff -up dhcp-4.2.2/client/dhclient.c.gpxe-cid dhcp-4.2.2/client/dhclient.c
> ---- dhcp-4.2.2/client/dhclient.c.gpxe-cid	2011-09-16
> 18:23:20.190453902 +0200
> -+++ dhcp-4.2.2/client/dhclient.c	2011-09-16 18:27:15.568463599 +0200
> -@@ -58,6 +58,13 @@ const char *path_dhclient_pid = NULL;
> - static char path_dhclient_script_array[] = _PATH_DHCLIENT_SCRIPT;
> - char *path_dhclient_script = path_dhclient_script_array;
> - 
> -+/* Default Prefix */
> -+static unsigned char default_prefix[12] = {
> -+	0xff, 0x00, 0x00, 0x00,
> -+	0x00, 0x00, 0x02, 0x00,
> -+	0x00, 0x02, 0xc9, 0x00
> -+};
> -+
> - /* False (default) => we write and use a pid file */
> - isc_boolean_t no_pid_file = ISC_FALSE;
> - 
> -@@ -1250,6 +1257,12 @@ int find_subnet (struct subnet **sp,
> - static void setup_ib_interface(struct interface_info *ip)
> - {
> - 	struct group *g;
> -+	struct hardware *hw = &ip->hw_address;
> -+	char client_id[64];
> -+	char *arg_conf = NULL;
> -+	int arg_conf_len = 0;
> -+	isc_result_t status;
> -+	struct parse *cfile = (struct parse *)0;
> - 
> - 	/* Set the broadcast flag */
> - 	ip->client->config->bootp_broadcast_always = 1;
> -@@ -1266,8 +1279,39 @@ static void setup_ib_interface(struct in
> - 		}
> - 	}
> - 
> --	/* No client ID specified */
> --	log_fatal("dhcp-client-identifier must be specified for
> InfiniBand");
> -+	/*
> -+	 * No client ID specified, make up one based on a default
> -+	 * "prefix" and the port GUID.
> -+	 *
> -+	 * NOTE: This is compatible with what gpxe does.
> -+	 */
> -+	sprintf(client_id,
> "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.
> 2x:%.2x:%.2x:%.2x:%.2x",
> -+		default_prefix[0], default_prefix[1], default_prefix[2],
> -+		default_prefix[3], default_prefix[4], default_prefix[5],
> -+		default_prefix[6], default_prefix[7], default_prefix[8],
> -+		default_prefix[9], default_prefix[10], default_prefix[11],
> -+		hw->hbuf[1], hw->hbuf[2], hw->hbuf[3], hw->hbuf[4],
> -+		hw->hbuf[5], hw->hbuf[6], hw->hbuf[7], hw->hbuf[8]);
> -+
> -+	arg_conf_len = asprintf(&arg_conf,
> -+				"send dhcp-client-identifier %s;",
> -+				client_id);
> -+
> -+	if ((arg_conf == 0) || (arg_conf_len <= 0))
> -+		log_fatal("Unable to send option dhcp-client-identifier");
> -+
> -+	status = new_parse(&cfile, -1, arg_conf, arg_conf_len,
> -+			   "Automatic Infiniband client identifier", 0);
> -+
> -+	if ((status != ISC_R_SUCCESS) || (cfile->warnings_occurred))
> -+		log_fatal("Failed to parse Infiniband client identifier");
> -+
> -+	parse_client_statement(cfile, NULL, ip->client->config);
> -+
> -+	if (cfile->warnings_occurred)
> -+		log_fatal("Failed to parse Infiniband client identifier");
> -+
> -+	end_parse(&cfile);
> - }
> - 
> - /* Individual States:
> -diff -up dhcp-4.2.2/common/lpf.c.gpxe-cid dhcp-4.2.2/common/lpf.c
> ---- dhcp-4.2.2/common/lpf.c.gpxe-cid	2011-09-16 18:23:20.183453996
> +0200
> -+++ dhcp-4.2.2/common/lpf.c	2011-09-16 18:25:28.235804421 +0200
> -@@ -698,6 +698,7 @@ get_hw_addr(struct interface_info *info)
> - 
> - 			hw->hlen = 1;
> - 			hw->hbuf[0] = HTYPE_INFINIBAND;
> -+			memcpy(&hw->hbuf[1], &sll->sll_addr[sll->sll_halen -
> 8], 8);
> - 			break;
> - #if defined(ARPHRD_PPP)
> - 		case ARPHRD_PPP:
> diff --git a/dhcp/patches/dhcp-4.2.2-xen-checksum.patch b/dhcp/patches/dhcp-
> 4.2.2-xen-checksum.patch
> deleted file mode 100644
> index 038d346..0000000
> --- a/dhcp/patches/dhcp-4.2.2-xen-checksum.patch
> +++ /dev/null
> @@ -1,249 +0,0 @@
> -diff -up dhcp-4.2.2b1/common/bpf.c.xen dhcp-4.2.2b1/common/bpf.c
> ---- dhcp-4.2.2b1/common/bpf.c.xen	2009-11-20 02:48:59.000000000 +0100
> -+++ dhcp-4.2.2b1/common/bpf.c	2011-07-01 14:00:16.936959001 +0200
> -@@ -485,7 +485,7 @@ ssize_t receive_packet (interface, buf, 
> - 		offset = decode_udp_ip_header (interface,
> - 					       interface -> rbuf,
> - 					       interface -> rbuf_offset,
> --  					       from, hdr.bh_caplen,
> &paylen);
> -+  					       from, hdr.bh_caplen,
> &paylen, 0);
> - 
> - 		/* If the IP or UDP checksum was bad, skip the packet... */
> - 		if (offset < 0) {
> -diff -up dhcp-4.2.2b1/common/dlpi.c.xen dhcp-4.2.2b1/common/dlpi.c
> ---- dhcp-4.2.2b1/common/dlpi.c.xen	2011-05-11 16:20:59.000000000 +0200
> -+++ dhcp-4.2.2b1/common/dlpi.c	2011-07-01 14:00:16.937958997 +0200
> -@@ -693,7 +693,7 @@ ssize_t receive_packet (interface, buf, 
> - 	length -= offset;
> - #endif
> - 	offset = decode_udp_ip_header (interface, dbuf, bufix,
> --				       from, length, &paylen);
> -+				       from, length, &paylen, 0);
> - 
> - 	/*
> - 	 * If the IP or UDP checksum was bad, skip the packet...
> -diff -up dhcp-4.2.2b1/common/lpf.c.xen dhcp-4.2.2b1/common/lpf.c
> ---- dhcp-4.2.2b1/common/lpf.c.xen	2011-05-10 16:38:58.000000000 +0200
> -+++ dhcp-4.2.2b1/common/lpf.c	2011-07-01 14:11:24.725748028 +0200
> -@@ -29,19 +29,33 @@
> - #include "dhcpd.h"
> - #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
> - #include <sys/ioctl.h>
> -+#include <sys/socket.h>
> - #include <sys/uio.h>
> - #include <errno.h>
> - 
> - #include <asm/types.h>
> - #include <linux/filter.h>
> - #include <linux/if_ether.h>
> -+#include <linux/if_packet.h>
> - #include <netinet/in_systm.h>
> --#include <net/if_packet.h>
> - #include "includes/netinet/ip.h"
> - #include "includes/netinet/udp.h"
> - #include "includes/netinet/if_ether.h"
> - #include <net/if.h>
> - 
> -+#ifndef PACKET_AUXDATA
> -+#define PACKET_AUXDATA 8
> -+
> -+struct tpacket_auxdata
> -+{
> -+	__u32		tp_status;
> -+	__u32		tp_len;
> -+	__u32		tp_snaplen;
> -+	__u16		tp_mac;
> -+	__u16		tp_net;
> -+};
> -+#endif
> -+
> - /* Reinitializes the specified interface after an address change.   This
> -    is not required for packet-filter APIs. */
> - 
> -@@ -67,10 +81,14 @@ int if_register_lpf (info)
> - 	struct interface_info *info;
> - {
> - 	int sock;
> --	struct sockaddr sa;
> -+	union {
> -+		struct sockaddr_ll ll;
> -+		struct sockaddr common;
> -+	} sa;
> -+	struct ifreq ifr;
> - 
> - 	/* Make an LPF socket. */
> --	if ((sock = socket(PF_PACKET, SOCK_PACKET,
> -+	if ((sock = socket(PF_PACKET, SOCK_RAW,
> - 			   htons((short)ETH_P_ALL))) < 0) {
> - 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
> - 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
> -@@ -85,11 +103,17 @@ int if_register_lpf (info)
> - 		log_fatal ("Open a socket for LPF: %m");
> - 	}
> - 
> -+	memset (&ifr, 0, sizeof ifr);
> -+	strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof
> ifr.ifr_name);
> -+	ifr.ifr_name[IFNAMSIZ-1] = '\0';
> -+	if (ioctl (sock, SIOCGIFINDEX, &ifr))
> -+		log_fatal ("Failed to get interface index: %m");
> -+
> - 	/* Bind to the interface name */
> - 	memset (&sa, 0, sizeof sa);
> --	sa.sa_family = AF_PACKET;
> --	strncpy (sa.sa_data, (const char *)info -> ifp, sizeof sa.sa_data);
> --	if (bind (sock, &sa, sizeof sa)) {
> -+	sa.ll.sll_family = AF_PACKET;
> -+	sa.ll.sll_ifindex = ifr.ifr_ifindex;
> -+	if (bind (sock, &sa.common, sizeof sa)) {
> - 		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
> - 		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
> - 		    errno == EAFNOSUPPORT || errno == EINVAL) {
> -@@ -171,9 +195,18 @@ static void lpf_gen_filter_setup (struct
> - void if_register_receive (info)
> - 	struct interface_info *info;
> - {
> -+	int val;
> -+
> - 	/* Open a LPF device and hang it on this interface... */
> - 	info -> rfdesc = if_register_lpf (info);
> - 
> -+	val = 1;
> -+	if (setsockopt (info -> rfdesc, SOL_PACKET, PACKET_AUXDATA, &val,
> -+			sizeof val) < 0) {
> -+		if (errno != ENOPROTOOPT)
> -+			log_fatal ("Failed to set auxiliary packet data:
> %m");
> -+	}
> -+
> - #if defined (HAVE_TR_SUPPORT)
> - 	if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
> - 		lpf_tr_filter_setup (info);
> -@@ -295,7 +328,6 @@ ssize_t send_packet (interface, packet, 
> - 	double hh [16];
> - 	double ih [1536 / sizeof (double)];
> - 	unsigned char *buf = (unsigned char *)ih;
> --	struct sockaddr_pkt sa;
> - 	int result;
> - 	int fudge;
> - 
> -@@ -316,17 +348,7 @@ ssize_t send_packet (interface, packet, 
> - 				(unsigned char *)raw, len);
> - 	memcpy (buf + ibufp, raw, len);
> - 
> --	/* For some reason, SOCK_PACKET sockets can't be connected,
> --	   so we have to do a sentdo every time. */
> --	memset (&sa, 0, sizeof sa);
> --	sa.spkt_family = AF_PACKET;
> --	strncpy ((char *)sa.spkt_device,
> --		 (const char *)interface -> ifp, sizeof sa.spkt_device);
> --	sa.spkt_protocol = htons(ETH_P_IP);
> --
> --	result = sendto (interface -> wfdesc,
> --			 buf + fudge, ibufp + len - fudge, 0, 
> --			 (const struct sockaddr *)&sa, sizeof sa);
> -+	result = write (interface -> wfdesc, buf + fudge, ibufp + len -
> fudge);
> - 	if (result < 0)
> - 		log_error ("send_packet: %m");
> - 	return result;
> -@@ -343,14 +365,35 @@ ssize_t receive_packet (interface, buf, 
> - {
> - 	int length = 0;
> - 	int offset = 0;
> -+	int nocsum = 0;
> - 	unsigned char ibuf [1536];
> - 	unsigned bufix = 0;
> - 	unsigned paylen;
> -+	unsigned char cmsgbuf[CMSG_LEN(sizeof(struct tpacket_auxdata))];
> -+	struct iovec iov = {
> -+		.iov_base = ibuf,
> -+		.iov_len = sizeof ibuf,
> -+	};
> -+	struct msghdr msg = {
> -+		.msg_iov = &iov,
> -+		.msg_iovlen = 1,
> -+		.msg_control = cmsgbuf,
> -+		.msg_controllen = sizeof(cmsgbuf),
> -+	};
> -+	struct cmsghdr *cmsg;
> - 
> --	length = read (interface -> rfdesc, ibuf, sizeof ibuf);
> -+	length = recvmsg (interface -> rfdesc, &msg, 0);
> - 	if (length <= 0)
> - 		return length;
> - 
> -+	for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg,
> cmsg)) {
> -+		if (cmsg->cmsg_level == SOL_PACKET &&
> -+		    cmsg->cmsg_type == PACKET_AUXDATA) {
> -+			struct tpacket_auxdata *aux = (void
> *)CMSG_DATA(cmsg);
> -+			nocsum = aux->tp_status & TP_STATUS_CSUMNOTREADY;
> -+		}
> -+	}
> -+
> - 	bufix = 0;
> - 	/* Decode the physical header... */
> - 	offset = decode_hw_header (interface, ibuf, bufix, hfrom);
> -@@ -367,7 +410,7 @@ ssize_t receive_packet (interface, buf, 
> - 
> - 	/* Decode the IP and UDP headers... */
> - 	offset = decode_udp_ip_header (interface, ibuf, bufix, from,
> --				       (unsigned)length, &paylen);
> -+				       (unsigned)length, &paylen, nocsum);
> - 
> - 	/* If the IP or UDP checksum was bad, skip the packet... */
> - 	if (offset < 0)
> -diff -up dhcp-4.2.2b1/common/nit.c.xen dhcp-4.2.2b1/common/nit.c
> ---- dhcp-4.2.2b1/common/nit.c.xen	2009-11-20 02:49:01.000000000 +0100
> -+++ dhcp-4.2.2b1/common/nit.c	2011-07-01 14:00:16.939958989 +0200
> -@@ -369,7 +369,7 @@ ssize_t receive_packet (interface, buf, 
> - 
> - 	/* Decode the IP and UDP headers... */
> - 	offset = decode_udp_ip_header (interface, ibuf, bufix,
> --				       from, length, &paylen);
> -+				       from, length, &paylen, 0);
> - 
> - 	/* If the IP or UDP checksum was bad, skip the packet... */
> - 	if (offset < 0)
> -diff -up dhcp-4.2.2b1/common/packet.c.xen dhcp-4.2.2b1/common/packet.c
> ---- dhcp-4.2.2b1/common/packet.c.xen	2009-07-23 20:52:20.000000000
> +0200
> -+++ dhcp-4.2.2b1/common/packet.c	2011-07-01 14:00:16.939958989 +0200
> -@@ -211,7 +211,7 @@ ssize_t
> - decode_udp_ip_header(struct interface_info *interface,
> - 		     unsigned char *buf, unsigned bufix,
> - 		     struct sockaddr_in *from, unsigned buflen,
> --		     unsigned *rbuflen)
> -+		     unsigned *rbuflen, int nocsum)
> - {
> -   unsigned char *data;
> -   struct ip ip;
> -@@ -322,7 +322,7 @@ decode_udp_ip_header(struct interface_in
> - 					   8, IPPROTO_UDP + ulen))));
> - 
> -   udp_packets_seen++;
> --  if (usum && usum != sum) {
> -+  if (!nocsum && usum && usum != sum) {
> - 	  udp_packets_bad_checksum++;
> - 	  if (udp_packets_seen > 4 &&
> - 	      (udp_packets_seen / udp_packets_bad_checksum) < 2) {
> -diff -up dhcp-4.2.2b1/common/upf.c.xen dhcp-4.2.2b1/common/upf.c
> ---- dhcp-4.2.2b1/common/upf.c.xen	2009-11-20 02:49:01.000000000 +0100
> -+++ dhcp-4.2.2b1/common/upf.c	2011-07-01 14:00:16.940958986 +0200
> -@@ -320,7 +320,7 @@ ssize_t receive_packet (interface, buf, 
> - 
> - 	/* Decode the IP and UDP headers... */
> - 	offset = decode_udp_ip_header (interface, ibuf, bufix,
> --				       from, length, &paylen);
> -+				       from, length, &paylen, 0);
> - 
> - 	/* If the IP or UDP checksum was bad, skip the packet... */
> - 	if (offset < 0)
> -diff -up dhcp-4.2.2b1/includes/dhcpd.h.xen dhcp-4.2.2b1/includes/dhcpd.h
> ---- dhcp-4.2.2b1/includes/dhcpd.h.xen	2011-07-01 14:00:16.000000000
> +0200
> -+++ dhcp-4.2.2b1/includes/dhcpd.h	2011-07-01 14:12:18.069642470 +0200
> -@@ -2796,7 +2796,7 @@ ssize_t decode_hw_header (struct interfa
> - 			  unsigned, struct hardware *);
> - ssize_t decode_udp_ip_header (struct interface_info *, unsigned char *,
> - 			      unsigned, struct sockaddr_in *,
> --			      unsigned, unsigned *);
> -+			      unsigned, unsigned *, int);
> - 
> - /* ethernet.c */
> - void assemble_ethernet_header (struct interface_info *, unsigned char *,
> diff --git a/dhcp/patches/dhcp-4.2.3-P2-log_perror.patch b/dhcp/patches/dhcp-
> 4.2.3-P2-log_perror.patch
> deleted file mode 100644
> index 124c8c5..0000000
> --- a/dhcp/patches/dhcp-4.2.3-P2-log_perror.patch
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -diff -up dhcp-4.2.3-P2/server/dhcpd.c.log_perror dhcp-4.2.3-P2/server/dhcpd.c
> ---- dhcp-4.2.3-P2/server/dhcpd.c.log_perror	2012-02-22
> 14:24:57.000000000 +0100
> -+++ dhcp-4.2.3-P2/server/dhcpd.c	2012-02-22 14:29:09.964576687 +0100
> -@@ -315,6 +315,7 @@ main(int argc, char **argv) {
> - #ifndef DEBUG
> - 			daemon = 0;
> - #endif
> -+			log_perror = 0;
> - 		} else if (!strcmp (argv [i], "-d")) {
> - #ifndef DEBUG
> - 			daemon = 0;
> diff --git a/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
> b/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
> deleted file mode 100644
> index af3314d..0000000
> --- a/dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -diff -up dhcp-4.2.3/client/dhclient.c.decline-onetry dhcp-
> 4.2.3/client/dhclient.c
> ---- dhcp-4.2.3/client/dhclient.c.decline-onetry	2011-11-24
> 14:21:50.000000000 +0100
> -+++ dhcp-4.2.3/client/dhclient.c	2011-11-24 14:23:44.472893215 +0100
> -@@ -1704,11 +1704,18 @@ void bind_lease (client)
> - 	if (script_go (client)) {
> - 		make_decline (client, client -> new);
> - 		send_decline (client);
> --		destroy_client_lease (client -> new);
> --		client -> new = (struct client_lease *)0;
> --		client -> state = S_DECLINED;
> --		state_init (client);
> --		return;
> -+		if (onetry) {
> -+			if (!quiet)
> -+			  log_info ("Unable to obtain a lease on first
> try.%s",
> -+					"  Exiting.");
> -+			exit (2);
> -+		} else {
> -+			destroy_client_lease (client -> new);
> -+			client -> new = (struct client_lease *)0;
> -+			client -> state = S_DECLINED;
> -+			state_init (client);
> -+			return;
> -+		}
> - 	}
> - 
> - 	/* Write out the new lease if it has been long enough. */
> diff --git a/dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch b/dhcp/patches/dhcp-
> 4.2.4-P1-remove-dst.patch
> deleted file mode 100644
> index 6b8dbb0..0000000
> --- a/dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -diff -up dhcp-4.2.4-P1/configure.ac.remove-dst dhcp-4.2.4-P1/configure.ac
> ---- dhcp-4.2.4-P1/configure.ac.remove-dst	2012-08-17
> 15:24:29.066454140 +0200
> -+++ dhcp-4.2.4-P1/configure.ac	2012-08-17 15:24:29.071454073 +0200
> -@@ -608,7 +608,6 @@ AC_OUTPUT([
> -   common/Makefile
> -   common/tests/Makefile
> -   dhcpctl/Makefile
> --  dst/Makefile
> -   includes/Makefile
> -   omapip/Makefile
> -   relay/Makefile
> -diff -up dhcp-4.2.4-P1/includes/Makefile.am.remove-dst dhcp-4.2.4-
> P1/includes/Makefile.am
> ---- dhcp-4.2.4-P1/includes/Makefile.am.remove-dst	2012-07-13
> 08:17:54.000000000 +0200
> -+++ dhcp-4.2.4-P1/includes/Makefile.am	2012-08-17 15:25:08.253922458
> +0200
> -@@ -1,7 +1,6 @@
> - nobase_include_HEADERS = omapip/alloc.h omapip/buffer.h omapip/convert.h \
> - 			 omapip/hash.h omapip/isclib.h omapip/omapip.h \
> --			 omapip/omapip_p.h omapip/result.h omapip/trace.h \
> --			 isc-dhcp/dst.h
> -+			 omapip/omapip_p.h omapip/result.h omapip/trace.h
> - 
> - EXTRA_DIST = cdefs.h ctrace.h dhcp.h dhcp6.h dhcpd.h dhctoken.h failover.h \
> - 	     heap.h inet.h minires.h osdep.h site.h statement.h tree.h \
> -diff -up dhcp-4.2.4-P1/Makefile.am.remove-dst dhcp-4.2.4-P1/Makefile.am
> ---- dhcp-4.2.4-P1/Makefile.am.remove-dst	2012-08-17 15:24:29.067454126
> +0200
> -+++ dhcp-4.2.4-P1/Makefile.am	2012-08-17 15:24:29.071454073 +0200
> -@@ -27,7 +27,7 @@ else
> - SUBDIRS = 
> - endif
> - 
> --SUBDIRS += includes tests common dst omapip client dhcpctl relay server
> -+SUBDIRS += includes tests common omapip client dhcpctl relay server
> - 
> - nobase_include_HEADERS = dhcpctl/dhcpctl.h
> - 
> -diff -up dhcp-4.2.4-P1/server/ddns.c.remove-dst dhcp-4.2.4-P1/server/ddns.c
> ---- dhcp-4.2.4-P1/server/ddns.c.remove-dst	2012-07-13
> 08:18:05.000000000 +0200
> -+++ dhcp-4.2.4-P1/server/ddns.c	2012-08-17 15:24:29.072454060 +0200
> -@@ -34,7 +34,6 @@
> -  */
> - 
> - #include "dhcpd.h"
> --#include "dst/md5.h"
> - #include <dns/result.h>
> - 
> - #ifdef NSUPDATE
> diff --git a/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
> b/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
> deleted file mode 100644
> index 679fdd3..0000000
> --- a/dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -diff -up dhcp-4.2.4-P2/common/conflex.c.orig dhcp-4.2.4-P2/common/conflex.c
> ---- dhcp-4.2.4-P2/common/conflex.c.orig	2012-08-28 04:13:03.000000000
> +0200
> -+++ dhcp-4.2.4-P2/common/conflex.c	2012-10-09 14:01:29.922104149 +0200
> -@@ -889,7 +889,7 @@ intern(char *atom, enum dhcp_token dfv)
> - 			if (!strcasecmp(atom + 7, "list"))
> - 				return DOMAIN_LIST;
> - 		}
> --		if (!strcasecmp (atom + 1, "o-forward-update"))
> -+		if (!strcasecmp (atom + 1, "o-forward-updates"))
> - 			return DO_FORWARD_UPDATE;
> - 		if (!strcasecmp (atom + 1, "ebug"))
> - 			return TOKEN_DEBUG;
> diff --git a/dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch b/dhcp/patches/dhcp-
> 4.2.4-P2-dupl-key.patch
> deleted file mode 100644
> index 85c7473..0000000
> --- a/dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -diff -up dhcp-4.2.4-P2/common/parse.c.dupl-key dhcp-4.2.4-P2/common/parse.c
> ---- dhcp-4.2.4-P2/common/parse.c.dupl-key	2012-11-16
> 15:31:30.568561745 +0100
> -+++ dhcp-4.2.4-P2/common/parse.c	2012-11-16 15:31:30.577561619 +0100
> -@@ -2893,6 +2893,9 @@ int parse_zone (struct dns_zone *zone, s
> - 			    }
> - 			    val = key_name;
> - 		    }
> -+		    if (zone->key)
> -+			log_fatal("Multiple key definition for zone %s.",
> -+				  zone->name);
> - 		    if (omapi_auth_key_lookup_name (&zone -> key, val) !=
> - 			ISC_R_SUCCESS)
> - 			    parse_warn (cfile, "unknown key %s", val);
> diff --git a/dhcp/patches/dhcp-4.2.4-UseMulticast.patch b/dhcp/patches/dhcp-
> 4.2.4-UseMulticast.patch
> deleted file mode 100644
> index d0c5dfe..0000000
> --- a/dhcp/patches/dhcp-4.2.4-UseMulticast.patch
> +++ /dev/null
> @@ -1,239 +0,0 @@
> -diff -up dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast dhcp-
> 4.2.4b1/server/dhcpv6.c
> ---- dhcp-4.2.4b1/server/dhcpv6.c.UseMulticast	2012-04-11
> 00:14:04.000000000 +0200
> -+++ dhcp-4.2.4b1/server/dhcpv6.c	2012-04-16 19:21:43.575923732 +0200
> -@@ -346,6 +346,48 @@ generate_new_server_duid(void) {
> - }
> - 
> - /*
> -+ * Is the D6O_UNICAST option defined in dhcpd.conf ?
> -+ */
> -+static isc_boolean_t unicast_option_defined;
> -+
> -+/*
> -+ * Did we already search dhcpd.conf for D6O_UNICAST option ?
> -+ * We need to store it here to not parse dhcpd.conf repeatedly.
> -+ */
> -+static isc_boolean_t unicast_option_parsed = ISC_FALSE;
> -+
> -+
> -+/*
> -+ * Is the D6O_UNICAST option defined in dhcpd.conf ?
> -+ */
> -+isc_boolean_t
> -+is_unicast_option_defined(void) {
> -+	struct option_state *opt_state;
> -+	struct option_cache *oc;
> -+
> -+	/*
> -+	 * If we are looking for the unicast option for the first time
> -+	 */
> -+	if (unicast_option_parsed == ISC_FALSE) {
> -+		unicast_option_parsed = ISC_TRUE;
> -+		opt_state = NULL;
> -+		if (!option_state_allocate(&opt_state, MDL)) {
> -+			log_fatal("No memory for option state.");
> -+		}
> -+
> -+		execute_statements_in_scope(NULL, NULL, NULL, NULL, NULL,
> -+				opt_state, &global_scope, root_group, NULL);
> -+
> -+		oc = lookup_option(&dhcpv6_universe, opt_state,
> D6O_UNICAST);
> -+		unicast_option_defined = (oc != NULL);
> -+
> -+		option_state_dereference(&opt_state, MDL);
> -+	}
> -+
> -+	return (unicast_option_defined);
> -+}
> -+
> -+/*
> -  * Get the client identifier from the packet.
> -  */
> - isc_result_t
> -@@ -1404,6 +1446,56 @@ lease_to_client(struct data_string *repl
> - 						    reply.shared->group);
> - 	}
> - 
> -+	/* reject unicast message, unless we set unicast option */
> -+	if ((packet->unicast == ISC_TRUE) && !is_unicast_option_defined())
> -+	/*
> -+	 * RFC3315 section 18.2.1 (Request):
> -+	 *
> -+	 * When the server receives a Request message via unicast from a
> client
> -+	 * to which the server has not sent a unicast option, the server
> -+	 * discards the Request message and responds with a Reply message
> -+	 * containing a Status Code option with the value UseMulticast, a
> Server
> -+	 * Identifier option containing the server's DUID, the Client
> Identifier
> -+	 * option from the client message, and no other options.
> -+	 *
> -+	 * Section 18.2.3 (Renew):
> -+	 *
> -+	 * When the server receives a Renew message via unicast from a
> client to
> -+	 * which the server has not sent a unicast option, the server
> discards
> -+	 * the Renew message and responds with a Reply message containing a
> -+	 * Status Code option with the value UseMulticast, a Server
> Identifier
> -+	 * option containing the server's DUID, the Client Identifier option
> -+	 * from the client message, and no other options.
> -+	 */
> -+	{
> -+		/* Set the UseMulticast status code. */
> -+		if (!set_status_code(STATUS_UseMulticast,
> -+					"Unicast not allowed by server.",
> -+					reply.opt_state)) {
> -+			log_error("lease_to_client: Unable to set "
> -+					"UseMulticast status code.");
> -+			goto exit;
> -+		}
> -+
> -+		/* Rewind the cursor to the start. */
> -+		reply.cursor = REPLY_OPTIONS_INDEX;
> -+
> -+		/*
> -+		 * Produce an reply that includes only:
> -+		 *
> -+		 * Status code.
> -+		 * Server DUID.
> -+		 * Client DUID.
> -+		 */
> -+		reply.cursor += store_options6((char *)reply.buf.data +
> -+					reply.cursor,
> -+					sizeof(reply.buf) -
> -+					reply.cursor,
> -+					reply.opt_state, reply.packet,
> -+					required_opts_NAA,
> -+					NULL);
> -+	}
> -+
> - 	/*
> - 	 * RFC3315 section 17.2.2 (Solicit):
> - 	 *
> -@@ -1429,8 +1521,8 @@ lease_to_client(struct data_string *repl
> - 	 * Sends a Renew/Rebind if the IA is not in the Reply message.
> - 	 */
> - #if defined (RFC3315_PRE_ERRATA_2010_08)
> --	if (no_resources_avail && (reply.ia_count != 0) &&
> --	    (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT))
> -+	else if (no_resources_avail && (reply.ia_count != 0) &&
> -+		 (reply.packet->dhcpv6_msg_type == DHCPV6_SOLICIT))
> - 	{
> - 		/* Set the NoAddrsAvail status code. */
> - 		if (!set_status_code(STATUS_NoAddrsAvail,
> -@@ -1477,6 +1569,7 @@ lease_to_client(struct data_string *repl
> - 	 * Having stored the client's IA's, store any options that
> - 	 * will fit in the remaining space.
> - 	 */
> -+	else 
> - 	reply.cursor += store_options6((char *)reply.buf.data +
> reply.cursor,
> - 				       sizeof(reply.buf) - reply.cursor,
> - 				       reply.opt_state, reply.packet,
> -@@ -4126,7 +4219,6 @@ dhcpv6_solicit(struct data_string *reply
> -  * Very similar to Solicit handling, except the server DUID is required.
> -  */
> - 
> --/* TODO: reject unicast messages, unless we set unicast option */
> - static void
> - dhcpv6_request(struct data_string *reply_ret, struct packet *packet) {
> - 	struct data_string client_id;
> -@@ -4456,7 +4548,6 @@ exit:
> -  * except for the error code of when addresses don't match.
> -  */
> - 
> --/* TODO: reject unicast messages, unless we set unicast option */
> - static void
> - dhcpv6_renew(struct data_string *reply, struct packet *packet) {
> - 	struct data_string client_id;
> -@@ -4700,18 +4791,60 @@ iterate_over_ia_na(struct data_string *r
> - 		goto exit;
> - 	}
> - 
> --	snprintf(status_msg, sizeof(status_msg), "%s received.",
> packet_type);
> --	if (!set_status_code(STATUS_Success, status_msg, opt_state)) {
> --		goto exit;
> --	}
> -+	/* reject unicast message, unless we set unicast option */
> -+	if ((packet->unicast == ISC_TRUE) && !is_unicast_option_defined()) {
> -+		/*
> -+		 * RFC3315 section 18.2.6 (Release):
> -+		 *
> -+		 * When the server receives a Release message via unicast
> from a client
> -+		 * to which the server has not sent a unicast option, the
> server
> -+		 * discards the Release message and responds with a Reply
> message
> -+		 * containing a Status Code option with value UseMulticast,
> a Server
> -+		 * Identifier option containing the server's DUID, the
> Client Identifier
> -+		 * option from the client message, and no other options.
> -+		 *
> -+		 * Section 18.2.7 (Decline):
> -+		 *
> -+		 * When the server receives a Decline message via unicast
> from a client
> -+		 * to which the server has not sent a unicast option, the
> server
> -+		 * discards the Decline message and responds with a Reply
> message
> -+		 * containing a Status Code option with the value
> UseMulticast, a Server
> -+		 * Identifier option containing the server's DUID, the
> Client Identifier
> -+		 * option from the client message, and no other options.
> -+		 */
> -+		snprintf(status_msg, sizeof(status_msg),
> -+				 "%s received unicast.", packet_type);
> -+		if (!set_status_code(STATUS_UseMulticast, status_msg,
> opt_state)) {
> -+			goto exit;
> -+		}
> - 
> --	/* 
> --	 * Add our options that are not associated with any IA_NA or IA_TA. 
> --	 */
> --	reply_ofs += store_options6(reply_data+reply_ofs,
> --				    sizeof(reply_data)-reply_ofs, 
> -+		/*
> -+		 * Produce an reply that includes only:
> -+		 *
> -+		 * Status code.
> -+		 * Server DUID.
> -+		 * Client DUID.
> -+		 */
> -+		reply_ofs += store_options6(reply_data+reply_ofs,
> -+				    sizeof(reply_data)-reply_ofs,
> - 				    opt_state, packet,
> --				    required_opts, NULL);
> -+				    required_opts_NAA, NULL);
> -+
> -+		goto return_reply;
> -+	} else {
> -+		snprintf(status_msg, sizeof(status_msg), "%s received.",
> packet_type);
> -+		if (!set_status_code(STATUS_Success, status_msg, opt_state))
> {
> -+			goto exit;
> -+		}
> -+
> -+		/*
> -+		 * Add our options that are not associated with any IA_NA or
> IA_TA.
> -+		 */
> -+		reply_ofs += store_options6(reply_data+reply_ofs,
> -+					    sizeof(reply_data)-reply_ofs,
> -+					    opt_state, packet,
> -+					    required_opts, NULL);
> -+	}
> - 
> - 	/*
> - 	 * Loop through the IA_NA reported by the client, and deal with
> -@@ -4849,6 +4982,7 @@ iterate_over_ia_na(struct data_string *r
> - 	/* 
> - 	 * Return our reply to the caller.
> - 	 */
> -+return_reply:
> - 	reply_ret->len = reply_ofs;
> - 	reply_ret->buffer = NULL;
> - 	if (!buffer_allocate(&reply_ret->buffer, reply_ofs, MDL)) {
> -@@ -4894,7 +5028,6 @@ exit:
> -  * we still need to be aware of this possibility.
> -  */
> - 
> --/* TODO: reject unicast messages, unless we set unicast option */
> - /* TODO: IA_TA */
> - static void
> - dhcpv6_decline(struct data_string *reply, struct packet *packet) {
> -@@ -5364,7 +5497,6 @@ exit:
> -  * Release means a client is done with the leases.
> -  */
> - 
> --/* TODO: reject unicast messages, unless we set unicast option */
> - static void
> - dhcpv6_release(struct data_string *reply, struct packet *packet) {
> - 	struct data_string client_id;
> diff --git a/dhcp/patches/dhcp-4.2.4-failOverPeer.patch b/dhcp/patches/dhcp-
> 4.2.4-failOverPeer.patch
> deleted file mode 100644
> index 1b0da7e..0000000
> --- a/dhcp/patches/dhcp-4.2.4-failOverPeer.patch
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -diff -up dhcp-4.2.4/server/ldap.c.failOverPeer dhcp-4.2.4/server/ldap.c
> ---- dhcp-4.2.4/server/ldap.c.failOverPeer	2012-07-23
> 12:53:26.815262322 +0200
> -+++ dhcp-4.2.4/server/ldap.c	2012-07-23 12:54:31.002119299 +0200
> -@@ -893,7 +893,7 @@ ldap_start (void)
> - static void
> - parse_external_dns (LDAPMessage * ent)
> - {
> --  char *search[] = {"dhcpOptionsDN", "dhcpSharedNetworkDN", "dhcpSubnetDN",
> -+  char *search[] = {"dhcpFailOverPeerDN", "dhcpOptionsDN",
> "dhcpSharedNetworkDN", "dhcpSubnetDN",
> -                     "dhcpGroupDN", "dhcpHostDN", "dhcpClassesDN",
> -                     "dhcpPoolDN", NULL};
> -   LDAPMessage * newres, * newent;
> diff --git a/dhcp/patches/dhcp-4.2.4-send_release.patch b/dhcp/patches/dhcp-
> 4.2.4-send_release.patch
> deleted file mode 100644
> index 3e0a618..0000000
> --- a/dhcp/patches/dhcp-4.2.4-send_release.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -diff -up dhcp-4.2.4b1/client/dhclient.c.send_release dhcp-
> 4.2.4b1/client/dhclient.c
> ---- dhcp-4.2.4b1/client/dhclient.c.send_release	2012-04-16
> 17:48:52.000000000 +0200
> -+++ dhcp-4.2.4b1/client/dhclient.c	2012-04-16 17:50:44.357396720 +0200
> -@@ -2764,8 +2764,8 @@ void send_release (cpp)
> - 	      inet_ntoa (destination.sin_addr),
> - 	      ntohs (destination.sin_port), client -> xid);
> - 
> --	if (fallback_interface) {
> --		result = send_packet(fallback_interface, NULL, &client-
> >packet,
> -+	if (client -> interface) {
> -+		result = send_packet(client -> interface, NULL, &client-
> >packet,
> - 				      client->packet_length, from,
> &destination,
> - 				      NULL);
> - 		if (result < 0) {
> -@@ -2776,7 +2776,7 @@ void send_release (cpp)
> - 		}
> -         } else {
> - 		/* Send out a packet. */
> --		result = send_packet(client->interface, NULL, &client-
> >packet,
> -+		result = send_packet(fallback_interface, NULL, &client-
> >packet,
> - 				      client->packet_length, from,
> &destination,
> - 				      NULL);
> - 		if (result < 0) {
> diff --git a/dhcp/patches/dhcp-4.2.5-next-server.patch b/dhcp/patches/dhcp-
> 4.2.5-next-server.patch
> deleted file mode 100644
> index c903bd1..0000000
> --- a/dhcp/patches/dhcp-4.2.5-next-server.patch
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -From f113ad7822fcd691e72f61cab7412595951222db Mon Sep 17 00:00:00 2001
> -From: Tomas Hozza <thozza@redhat.com>
> -Date: Wed, 3 Apr 2013 10:20:18 +0200
> -Subject: [PATCH] Expose next-server DHCPv4 option to dhclient script
> -
> -Currently dhclient does not exposes next-server option
> -to the dhclient script. this patch fixes this.
> -
> -Signed-off-by: Tomas Hozza <thozza@redhat.com>
> ----
> - client/dhclient.c | 14 +++++++++++---
> - includes/dhcpd.h  |  2 +-
> - 2 files changed, 12 insertions(+), 4 deletions(-)
> -
> -diff --git a/client/dhclient.c b/client/dhclient.c
> -index 551ccbf..e8df320 100644
> ---- a/client/dhclient.c
> -+++ b/client/dhclient.c
> -@@ -993,7 +993,7 @@ void state_selecting (cpp)
> - 		client -> state = S_REQUESTING;
> - 
> - 		/* Bind to the address we received. */
> --		bind_lease (client);
> -+		bind_lease (client, NULL);
> - 		return;
> - 	}
> - 
> -@@ -1183,11 +1183,12 @@ void dhcpack (packet)
> - 	if (client -> new -> rebind < cur_time)
> - 		client -> new -> rebind = TIME_MAX;
> - 
> --	bind_lease (client);
> -+	bind_lease (client, &packet -> raw -> siaddr);
> - }
> - 
> --void bind_lease (client)
> -+void bind_lease (client, siaddr)
> - 	struct client_state *client;
> -+	struct in_addr *siaddr;
> - {
> - 	struct timeval tv;
> - 
> -@@ -1209,6 +1210,13 @@ void bind_lease (client)
> - 	if (client -> alias)
> - 		script_write_params (client, "alias_", client -> alias);
> - 
> -+	if (siaddr) {
> -+		char buf[INET_ADDRSTRLEN];
> -+
> -+		if (inet_ntop (AF_INET, (void *) siaddr, buf, sizeof (buf)))
> -+			client_envadd (client, "new_", "next_server", "%s",
> buf);
> -+	}
> -+
> - 	/* If the BOUND/RENEW code detects another machine using the
> - 	   offered address, it exits nonzero.  We need to send a
> - 	   DHCPDECLINE and toss the lease. */
> -diff --git a/includes/dhcpd.h b/includes/dhcpd.h
> -index 12ed2ba..4e93e68 100644
> ---- a/includes/dhcpd.h
> -+++ b/includes/dhcpd.h
> -@@ -2712,7 +2712,7 @@ void state_bound (void *);
> - void state_stop (void *);
> - void state_panic (void *);
> - 
> --void bind_lease (struct client_state *);
> -+void bind_lease (struct client_state *, struct in_addr *);
> - 
> - void make_client_options (struct client_state *,
> - 			  struct client_lease *, u_int8_t *,
> --- 
> -1.8.1.4
> -
> diff --git a/dhcp/patches/dhcp-4.2.5-paranoia.patch b/dhcp/patches/dhcp-4.2.5-
> paranoia.patch
> deleted file mode 100644
> index 05affdd..0000000
> --- a/dhcp/patches/dhcp-4.2.5-paranoia.patch
> +++ /dev/null
> @@ -1,202 +0,0 @@
> -diff -up dhcp-4.2.5/client/dhclient.c.paranoia dhcp-4.2.5/client/dhclient.c
> ---- dhcp-4.2.5/client/dhclient.c.paranoia	2013-03-26
> 13:14:50.574542083 +0100
> -+++ dhcp-4.2.5/client/dhclient.c	2013-03-26 13:14:50.584541964 +0100
> -@@ -1698,11 +1698,6 @@ int write_host (host)
> - 	return 0;
> - }
> - 
> --void db_startup (testp)
> --	int testp;
> --{
> --}
> --
> - void bootp (packet)
> - 	struct packet *packet;
> - {
> -diff -up dhcp-4.2.5/includes/dhcpd.h.paranoia dhcp-4.2.5/includes/dhcpd.h
> ---- dhcp-4.2.5/includes/dhcpd.h.paranoia	2013-03-26 13:14:50.576542059
> +0100
> -+++ dhcp-4.2.5/includes/dhcpd.h	2013-03-26 13:14:50.585541952 +0100
> -@@ -2798,7 +2798,11 @@ void commit_leases_timeout (void *);
> - void commit_leases_readerdry(void *);
> - int commit_leases (void);
> - int commit_leases_timed (void);
> -+#if defined (PARANOIA)
> -+void db_startup (int, uid_t, gid_t);
> -+#else
> - void db_startup (int);
> -+#endif /* PARANOIA */
> - int new_lease_file (void);
> - int group_writer (struct group_object *);
> - int write_ia(const struct ia_xx *);
> -diff -up dhcp-4.2.5/server/confpars.c.paranoia dhcp-4.2.5/server/confpars.c
> ---- dhcp-4.2.5/server/confpars.c.paranoia	2013-03-26
> 13:14:50.522542705 +0100
> -+++ dhcp-4.2.5/server/confpars.c	2013-03-26 13:14:50.587541928 +0100
> -@@ -224,7 +224,11 @@ void trace_conf_input (trace_type_t *tty
> - 	}
> - 
> - 	if (!leaseconf_initialized && ttype == trace_readleases_type) {
> -+#if defined (PARANOIA)
> -+		db_startup (0, 0, 0);
> -+#else
> - 		db_startup (0);
> -+#endif /* PARANOIA */
> - 		leaseconf_initialized = 1;
> - 		postdb_startup ();
> - 	}
> -diff -up dhcp-4.2.5/server/db.c.paranoia dhcp-4.2.5/server/db.c
> ---- dhcp-4.2.5/server/db.c.paranoia	2013-03-26 13:14:50.522542705
> +0100
> -+++ dhcp-4.2.5/server/db.c	2013-03-26 13:14:50.588541916 +0100
> -@@ -47,6 +47,10 @@ static int counting = 0;
> - static int count = 0;
> - TIME write_time;
> - int lease_file_is_corrupt = 0;
> -+#if defined (PARANOIA)
> -+uid_t global_set_uid = 0;
> -+gid_t global_set_gid = 0;
> -+#endif /* PARANOIA */
> - 
> - /* Write a single binding scope value in parsable format.
> -  */
> -@@ -1026,8 +1030,11 @@ int commit_leases_timed()
> - 	return (1);
> - }
> - 
> --void db_startup (testp)
> --	int testp;
> -+#if defined (PARANOIA)
> -+void db_startup (int testp, uid_t set_uid, gid_t set_gid)
> -+#else
> -+void db_startup (int testp)
> -+#endif /* PARANOIA */
> - {
> - 	isc_result_t status;
> - 
> -@@ -1046,6 +1053,11 @@ void db_startup (testp)
> - 	}
> - #endif
> - 
> -+#if defined (PARANOIA)
> -+	global_set_uid = set_uid;
> -+	global_set_gid = set_gid;
> -+#endif /* PARANOIA */
> -+
> - #if defined (TRACING)
> - 	/* If we're playing back, there is no lease file, so we can't
> - 	   append it, so we create one immediately (maybe this isn't
> -@@ -1108,6 +1120,17 @@ int new_lease_file ()
> - 		log_error ("Can't create new lease file: %m");
> - 		return 0;
> - 	}
> -+
> -+#if defined (PARANOIA)
> -+	if (global_set_uid && !geteuid() &&
> -+	    global_set_gid && !getegid())
> -+		if (fchown(db_fd, global_set_uid, global_set_gid)) {
> -+			log_fatal ("Can't chown new lease file: %m");
> -+			close(db_fd);
> -+			goto fdfail;
> -+	}
> -+#endif /* PARANOIA */
> -+
> - 	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
> - 		log_error("Can't fdopen new lease file: %m");
> - 		close(db_fd);
> -diff -up dhcp-4.2.5/server/dhcpd.8.paranoia dhcp-4.2.5/server/dhcpd.8
> ---- dhcp-4.2.5/server/dhcpd.8.paranoia	2013-01-03 01:02:25.000000000
> +0100
> -+++ dhcp-4.2.5/server/dhcpd.8	2013-03-26 13:28:16.576604471 +0100
> -@@ -82,6 +82,18 @@ dhcpd - Dynamic Host Configuration Proto
> - .I trace-output-file
> - ]
> - [
> -+.B -user
> -+.I user
> -+]
> -+[
> -+.B -group
> -+.I group
> -+]
> -+[
> -+.B -chroot
> -+.I dir
> -+]
> -+[
> - .B -play
> - .I trace-playback-file
> - ]
> -@@ -269,6 +281,15 @@ lease file.
> - .TP
> - .BI --version
> - Print version number and exit.
> -+.TP
> -+.BI \-user \ user
> -+Setuid to user after completing privileged operations, such as creating
> sockets that listen on privileged ports.
> -+.TP
> -+.BI \-group \ group
> -+Setgid to group after completing privileged operations, such as creating
> sockets that listen on privileged ports.
> -+.TP
> -+.BI \-chroot \ dir
> -+Chroot to directory after processing the command line arguments, but before
> reading the configuration file.
> - .PP
> - .I Modifying default file locations:
> - The following options can be used to modify the locations 
> -diff -up dhcp-4.2.5/server/dhcpd.c.paranoia dhcp-4.2.5/server/dhcpd.c
> ---- dhcp-4.2.5/server/dhcpd.c.paranoia	2013-03-26 13:14:50.523542693
> +0100
> -+++ dhcp-4.2.5/server/dhcpd.c	2013-03-26 13:14:50.589541904 +0100
> -@@ -702,7 +702,11 @@ main(int argc, char **argv) {
> - 	group_write_hook = group_writer;
> - 
> - 	/* Start up the database... */
> -+#if defined (PARANOIA)
> -+	db_startup (lftest, set_uid, set_gid);
> -+#else
> - 	db_startup (lftest);
> -+#endif /* PARANOIA */
> - 
> - 	if (lftest)
> - 		exit (0);
> -@@ -773,22 +777,6 @@ main(int argc, char **argv) {
> - 			exit (0);
> - 	}
> -  
> --#if defined (PARANOIA)
> --	/* change uid to the specified one */
> --
> --	if (set_gid) {
> --		if (setgroups (0, (void *)0))
> --			log_fatal ("setgroups: %m");
> --		if (setgid (set_gid))
> --			log_fatal ("setgid(%d): %m", (int) set_gid);
> --	}	
> --
> --	if (set_uid) {
> --		if (setuid (set_uid))
> --			log_fatal ("setuid(%d): %m", (int) set_uid);
> --	}
> --#endif /* PARANOIA */
> --
> - 	/*
> - 	 * Deal with pid files.  If the user told us
> - 	 * not to write a file we don't read one either
> -@@ -825,6 +813,22 @@ main(int argc, char **argv) {
> - 		}
> - 	}
> - 
> -+#if defined (PARANOIA)
> -+	/* change uid to the specified one */
> -+
> -+	if (set_gid) {
> -+		if (setgroups (0, (void *)0))
> -+			log_fatal ("setgroups: %m");
> -+		if (setgid (set_gid))
> -+			log_fatal ("setgid(%d): %m", (int) set_gid);
> -+	}	
> -+
> -+	if (set_uid) {
> -+		if (setuid (set_uid))
> -+			log_fatal ("setuid(%d): %m", (int) set_uid);
> -+	}
> -+#endif /* PARANOIA */
> -+
> - 	/* If we were requested to log to stdout on the command line,
> - 	   keep doing so; otherwise, stop. */
> - 	if (log_perror == -1)
> diff --git a/dhcp/patches/dhcp-4.2.5-range6.patch b/dhcp/patches/dhcp-4.2.5-
> range6.patch
> deleted file mode 100644
> index 754d899..0000000
> --- a/dhcp/patches/dhcp-4.2.5-range6.patch
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -diff --git a/server/confpars.c b/server/confpars.c
> -index 12ab0e6..4454be9 100644
> ---- a/server/confpars.c
> -+++ b/server/confpars.c
> -@@ -3756,6 +3756,19 @@ add_ipv6_pool_to_subnet(struct subnet *subnet,
> u_int16_t type,
> - 	share->ipv6_pools[num_pools+1] = NULL;
> - }
> - 
> -+static void
> -+check_addr_in_subnet(struct subnet *subnet, struct iaddr *addr) {
> -+	char lowbuf [INET6_ADDRSTRLEN], netbuf [INET6_ADDRSTRLEN];
> -+
> -+	if (!addr_eq(subnet->net, subnet_number(*addr, subnet->netmask))) {
> -+		strcpy(lowbuf, piaddr(*addr));
> -+		strcpy(netbuf, piaddr(subnet->net));
> -+		log_fatal("bad range6, address %s not in subnet6 %s/%d",
> -+			lowbuf, netbuf, subnet->prefix_len);
> -+	}
> -+
> -+}
> -+
> - /* address-range6-declaration :== ip-address6 ip-address6 SEMI
> - 			       | ip-address6 SLASH number SEMI
> - 			       | ip-address6 [SLASH number] TEMPORARY SEMI
> */
> -@@ -3788,6 +3801,8 @@ parse_address_range6(struct parse *cfile, struct group
> *group) {
> - 		return;
> - 	}
> - 
> -+	check_addr_in_subnet(group->subnet, &lo);
> -+
> - 	/* 
> - 	 * See if we we're using range or CIDR notation or TEMPORARY
> - 	 */
> -@@ -3855,6 +3870,8 @@ parse_address_range6(struct parse *cfile, struct group
> *group) {
> - 			return;
> - 		}
> - 
> -+		check_addr_in_subnet(group->subnet, &hi);
> -+
> - 		/*
> - 		 * Convert our range to a set of CIDR networks.
> - 		 */
> diff --git a/dhcp/patches/dhcp-4.2.5-remove-bind.patch b/dhcp/patches/dhcp-
> 4.2.5-remove-bind.patch
> deleted file mode 100644
> index d3ef6b7..0000000
> --- a/dhcp/patches/dhcp-4.2.5-remove-bind.patch
> +++ /dev/null
> @@ -1,164 +0,0 @@
> -diff -up dhcp-4.2.5b1/client/Makefile.am.remove-bind dhcp-
> 4.2.5b1/client/Makefile.am
> ---- dhcp-4.2.5b1/client/Makefile.am.remove-bind	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/client/Makefile.am	2012-12-17 16:20:58.692538252
> +0100
> -@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c
> - 		   scripts/netbsd scripts/nextstep scripts/openbsd \
> - 		   scripts/solaris scripts/openwrt
> - dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --		 ../bind/lib/libdns.a ../bind/lib/libisc.a
> -+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
> - man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
> - EXTRA_DIST = $(man_MANS)
> - 
> -diff -up dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind dhcp-
> 4.2.5b1/common/tests/Makefile.am
> ---- dhcp-4.2.5b1/common/tests/Makefile.am.remove-bind	2012-12-05
> 02:17:38.000000000 +0100
> -+++ dhcp-4.2.5b1/common/tests/Makefile.am	2012-12-17
> 16:20:58.693538239 +0100
> -@@ -13,8 +13,8 @@ ATF_TESTS += alloc_unittest
> - alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
> - alloc_unittest_LDADD = $(ATF_LDFLAGS)
> - alloc_unittest_LDADD += ../libdhcp.a  \
> --	../../omapip/libomapi.a ../../bind/lib/libdns.a \
> --        ../../bind/lib/libisc.a
> -+	../../omapip/libomapi.a \
> -+	 $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> - check: $(ATF_TESTS)
> - 	atf-run | atf-report
> -diff -up dhcp-4.2.5b1/configure.ac.remove-bind dhcp-4.2.5b1/configure.ac
> ---- dhcp-4.2.5b1/configure.ac.remove-bind	2012-12-05
> 02:18:44.000000000 +0100
> -+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:20:58.693538239 +0100
> -@@ -581,20 +581,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
> - libbind=
> - AC_ARG_WITH(libbind,
> - 	AC_HELP_STRING([--with-libbind=PATH],
> --		       [bind includes and libraries are in PATH 
> --		        (default is ./bind)]),
> -+		       [bind includes are in PATH 
> -+		        (default is ./bind/includes)]),
> - 	use_libbind="$withval", use_libbind="no")
> - case "$use_libbind" in 
> -+yes|no)
> -+	libbind="\${top_srcdir}/bind/include"
> -+	;;
> -+*)
> -+	libbind="$use_libbind"
> -+	;;
> -+esac
> -+
> -+BIND9_LIBDIR='-L$(top_builddir)/bind/lib'
> -+AC_ARG_WITH(libbind-libs,
> -+	AC_HELP_STRING([--with-libbind-libs=PATH],
> -+		       [bind9 export libraries are in PATH]),
> -+		       [libbind_libs="$withval"], [libbind_libs='no'])
> -+case "$libbind_libs" in
> - yes)
> --	libbind="\${top_srcdir}/bind"
> -+	AC_MSG_ERROR([Specify path to bind9 libraries])
> - 	;;
> - no)
> --	libbind="\${top_srcdir}/bind"
> -+	BUNDLED_BIND=yes
> - 	;;
> - *)
> --	libbind="$use_libbind"
> -+	BIND9_LIBDIR="-L$libbind_libs"
> -+	BUNDLED_BIND=no
> - 	;;
> - esac
> -+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
> -+AC_SUBST([BIND9_LIBDIR])
> - 
> - # OpenLDAP support.
> - AC_ARG_WITH(ldap,
> -@@ -631,7 +648,7 @@ fi
> - CFLAGS="$CFLAGS $STD_CWARNINGS"
> - 
> - # Try to add the bind include directory
> --CFLAGS="$CFLAGS -I$libbind/include"
> -+CFLAGS="$CFLAGS -I$libbind"
> - 
> - AC_C_FLEXIBLE_ARRAY_MEMBER
> - 
> -diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind dhcp-
> 4.2.5b1/dhcpctl/Makefile.am
> ---- dhcp-4.2.5b1/dhcpctl/Makefile.am.remove-bind	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/dhcpctl/Makefile.am	2012-12-17 16:20:58.693538239
> +0100
> -@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
> - 
> - omshell_SOURCES = omshell.c
> - omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> --	        ../bind/lib/libdns.a ../bind/lib/libisc.a
> -+	        $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> - libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
> - 
> - cltest_SOURCES = cltest.c
> - cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> --	       ../bind/lib/libdns.a ../bind/lib/libisc.a
> -\ No newline at end of file
> -+	       $(BIND9_LIBDIR) -ldns-export -lisc-export
> -diff -up dhcp-4.2.5b1/Makefile.am.remove-bind dhcp-4.2.5b1/Makefile.am
> ---- dhcp-4.2.5b1/Makefile.am.remove-bind	2012-12-05 02:17:38.000000000
> +0100
> -+++ dhcp-4.2.5b1/Makefile.am	2012-12-17 16:20:58.693538239 +0100
> -@@ -22,7 +22,13 @@ EXTRA_DIST = RELNOTES LICENSE \
> - 	     bind/Makefile bind/bind.tar.gz bind/version.tmp \
> - 	     common/tests/Atffile server/tests/Atffile
> - 
> --SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
> -+if BUNDLED_BIND
> -+SUBDIRS = bind
> -+else
> -+SUBDIRS = 
> -+endif
> -+
> -+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
> - 
> - nobase_include_HEADERS = dhcpctl/dhcpctl.h
> - 
> -diff -up dhcp-4.2.5b1/omapip/Makefile.am.remove-bind dhcp-
> 4.2.5b1/omapip/Makefile.am
> ---- dhcp-4.2.5b1/omapip/Makefile.am.remove-bind	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/omapip/Makefile.am	2012-12-17 16:20:58.693538239
> +0100
> -@@ -10,5 +10,5 @@ man_MANS = omapi.3
> - EXTRA_DIST = $(man_MANS)
> - 
> - svtest_SOURCES = test.c
> --svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
> -+svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> -diff -up dhcp-4.2.5b1/relay/Makefile.am.remove-bind dhcp-
> 4.2.5b1/relay/Makefile.am
> ---- dhcp-4.2.5b1/relay/Makefile.am.remove-bind	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/relay/Makefile.am	2012-12-17 16:20:58.694538225 +0100
> -@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
> - sbin_PROGRAMS = dhcrelay
> - dhcrelay_SOURCES = dhcrelay.c
> - dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --		 ../bind/lib/libdns.a ../bind/lib/libisc.a
> -+		 $(BIND9_LIBDIR) -ldns-export -lisc-export
> - man_MANS = dhcrelay.8
> - EXTRA_DIST = $(man_MANS)
> - 
> -diff -up dhcp-4.2.5b1/server/Makefile.am.remove-bind dhcp-
> 4.2.5b1/server/Makefile.am
> ---- dhcp-4.2.5b1/server/Makefile.am.remove-bind	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:20:58.694538225
> +0100
> -@@ -14,8 +14,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
> - 
> - dhcpd_CFLAGS = $(LDAP_CFLAGS)
> - dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --	      ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
> --	      ../bind/lib/libisc.a
> -+	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-
> export
> - 
> - man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
> - EXTRA_DIST = $(man_MANS)
> -diff -up dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind dhcp-
> 4.2.5b1/server/tests/Makefile.am
> ---- dhcp-4.2.5b1/server/tests/Makefile.am.remove-bind	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17
> 16:26:01.093346768 +0100
> -@@ -18,8 +18,7 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
> -           ../ldap.c ../ldap_casa.c ../dhcpd.c
> - 
> - DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.a    \
> --          $(top_builddir)/dhcpctl/libdhcpctl.a
> $(top_builddir)/bind/lib/libdns.a \
> --          $(top_builddir)/bind/lib/libisc.a
> -+          $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export
> -lisc-export
> - 
> - ATF_TESTS =
> - TESTS = 
> diff --git a/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-
> boot.patch b/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-
> boot.patch
> deleted file mode 100644
> index 3b844e0..0000000
> --- a/dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch
> +++ /dev/null
> @@ -1,89 +0,0 @@
> -diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc5970 dhcp-4.2.5b1/common/dhcp-
> options.5
> ---- dhcp-4.2.5b1/common/dhcp-options.5.rfc5970	2012-12-17
> 13:43:44.000000000 +0100
> -+++ dhcp-4.2.5b1/common/dhcp-options.5	2012-12-17 13:45:18.777638579
> +0100
> -@@ -1771,7 +1771,48 @@ The \fBlq-relay-data\fR option is used i
> - The \fBlq-client-link\fR option is used internally by for lease query.
> - .RE
> - .PP
> -+
> -+.B option
> -+.B dhcp6.bootfile-url
> -+.I string 
> -+.B ;
> -+.RS 0.25i
> -+.PP
> -+The server sends this option to inform the client about a URL to a
> -+boot file.  Used primarily for UEFI network booting, it contains an RFC3986
> -+compliant URI which the client may use to boot an operating system.  This
> option
> -+is defined in RFC5970
> - .RE
> -+.PP
> -+
> -+.B option
> -+.B dhcp6.arch-type
> -+.I arch-id \fR[\fB,\fR arch-id\fR...] 
> -+.B ;
> -+.RS 0.25i
> -+.PP
> -+A client will send this option to a server so that the server may make
> decisions
> -+on what options and addresses to offer the requesting client.  The option
> -+consists of a list of 16 bit unsigned values that represent the architecture
> of
> -+the requesting client.  These values corespond to the values available to
> the
> -+dhcpv4 option architecture-type, as defined in RFC4578, section 2.1.
> -+This option is defined in RFC5970
> -+ .RE
> -+.PP
> -+
> -+.B option
> -+.B dhcp6.net-id
> -+.I uint8 uint8 uint8 
> -+.B ;
> -+.RS 0.25i
> -+.PP
> -+A client will send this option to a server to inform it about the clients
> level
> -+of UNDI support.  The option consists of 3 octets (a type, major and minor
> -+value).  Specific meanings of these values are doumented in section 2.2 of
> -+RFC4578.
> -+This option is defined in RFC5970
> -+.RE
> -+.PP
> - .SH DEFINING NEW OPTIONS
> - The Internet Systems Consortium DHCP client and server provide the
> - capability to define new options.  Each DHCP option has a name, a
> -diff -up dhcp-4.2.5b1/common/tables.c.rfc5970 dhcp-4.2.5b1/common/tables.c
> ---- dhcp-4.2.5b1/common/tables.c.rfc5970	2012-12-17 13:43:44.204939024
> +0100
> -+++ dhcp-4.2.5b1/common/tables.c	2012-12-17 13:43:44.286937948 +0100
> -@@ -463,6 +463,18 @@ static struct option dhcpv6_options[] =
> - 	{ "lq-relay-data", "6X",		&dhcpv6_universe, 47, 1 },
> - 	{ "lq-client-link", "6A",		&dhcpv6_universe, 48, 1 },
> - 
> -+			/* RFC5970 OPTIONS */
> -+
> -+	{ "bootfile-url", "t",			&dhcpv6_universe, 59,
> 1},
> -+#if 0
> -+	/* Can't implement this until arrays of strings with length "StA"
> -+	 * are implemented
> -+	 */
> -+	{ "bootfile-param", "StA",		&dhcpv6_universe, 60, 1},
> -+#endif
> -+	{ "arch-type", "Sa",			&dhcpv6_universe, 61,
> 1},
> -+	{ "net-id", "BBB",			&dhcpv6_universe, 62, 1},
> -+
> - 	{ NULL, NULL, NULL, 0, 0 }
> - };
> - 
> -diff -up dhcp-4.2.5b1/includes/dhcp6.h.rfc5970 dhcp-4.2.5b1/includes/dhcp6.h
> ---- dhcp-4.2.5b1/includes/dhcp6.h.rfc5970	2012-12-04
> 20:45:42.000000000 +0100
> -+++ dhcp-4.2.5b1/includes/dhcp6.h	2012-12-17 13:43:44.286937948 +0100
> -@@ -75,6 +75,11 @@
> - #define D6O_CLT_TIME				46 /* RFC5007 */
> - #define D6O_LQ_RELAY_DATA			47 /* RFC5007 */
> - #define D6O_LQ_CLIENT_LINK			48 /* RFC5007 */
> -+/* 49-58 Not yet assigned */
> -+#define D60_BOOT_URL				59 /* RFC5970 */
> -+#define D60_BOOT_PARAMS				60 /* RFC5970 */
> -+#define D60_CLIENT_ARCH				61 /* RFC5970 */
> -+#define D60_CLIENT_NII				62 /* RFC5970 */
> - 
> - /* 
> -  * Status Codes, from RFC 3315 section 24.4, and RFC 3633, 5007.
> diff --git a/dhcp/patches/dhcp-4.2.5-sharedlib.patch b/dhcp/patches/dhcp-
> 4.2.5-sharedlib.patch
> deleted file mode 100644
> index d543ab7..0000000
> --- a/dhcp/patches/dhcp-4.2.5-sharedlib.patch
> +++ /dev/null
> @@ -1,120 +0,0 @@
> -diff -up dhcp-4.2.5b1/client/Makefile.am.sharedlib dhcp-
> 4.2.5b1/client/Makefile.am
> ---- dhcp-4.2.5b1/client/Makefile.am.sharedlib	2012-12-17
> 16:26:53.350623790 +0100
> -+++ dhcp-4.2.5b1/client/Makefile.am	2012-12-17 16:26:53.384623342
> +0100
> -@@ -4,7 +4,7 @@ dhclient_SOURCES = clparse.c dhclient.c
> - 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos
> \
> - 		   scripts/netbsd scripts/nextstep scripts/openbsd \
> - 		   scripts/solaris scripts/openwrt
> --dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> -+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> - 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
> - man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
> - EXTRA_DIST = $(man_MANS)
> -diff -up dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib dhcp-
> 4.2.5b1/common/tests/Makefile.am
> ---- dhcp-4.2.5b1/common/tests/Makefile.am.sharedlib	2012-12-17
> 16:26:53.271624835 +0100
> -+++ dhcp-4.2.5b1/common/tests/Makefile.am	2012-12-17
> 16:26:53.384623342 +0100
> -@@ -13,7 +13,7 @@ ATF_TESTS += alloc_unittest
> - alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
> - alloc_unittest_LDADD = $(ATF_LDFLAGS)
> - alloc_unittest_LDADD += ../libdhcp.a  \
> --	../../omapip/libomapi.a \
> -+	../../omapip/libomapi.la \
> - 	 $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> - check: $(ATF_TESTS)
> -diff -up dhcp-4.2.5b1/configure.ac.sharedlib dhcp-4.2.5b1/configure.ac
> ---- dhcp-4.2.5b1/configure.ac.sharedlib	2012-12-17 16:26:53.350623790
> +0100
> -+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:26:53.384623342 +0100
> -@@ -37,7 +37,8 @@ fi
> - # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
> - AC_USE_SYSTEM_EXTENSIONS
> - 
> --AC_PROG_RANLIB
> -+# Use libtool to simplify building of shared libraries
> -+AC_PROG_LIBTOOL
> - AC_CONFIG_HEADERS([includes/config.h])
> - 
> - # we sometimes need to know byte order for building packets
> -diff -up dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib dhcp-
> 4.2.5b1/dhcpctl/Makefile.am
> ---- dhcp-4.2.5b1/dhcpctl/Makefile.am.sharedlib	2012-12-17
> 16:26:53.271624835 +0100
> -+++ dhcp-4.2.5b1/dhcpctl/Makefile.am	2012-12-17 16:26:53.385623329
> +0100
> -@@ -1,15 +1,15 @@
> - bin_PROGRAMS = omshell
> --lib_LIBRARIES = libdhcpctl.a
> -+lib_LTLIBRARIES = libdhcpctl.la
> - noinst_PROGRAMS = cltest
> - man_MANS = omshell.1 dhcpctl.3
> - EXTRA_DIST = $(man_MANS)
> - 
> - omshell_SOURCES = omshell.c
> --omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> -+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
> - 	        $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> --libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
> -+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
> - 
> - cltest_SOURCES = cltest.c
> --cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
> -+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
> - 	       $(BIND9_LIBDIR) -ldns-export -lisc-export
> -diff -up dhcp-4.2.5b1/omapip/Makefile.am.sharedlib dhcp-
> 4.2.5b1/omapip/Makefile.am
> ---- dhcp-4.2.5b1/omapip/Makefile.am.sharedlib	2012-12-17
> 16:26:53.272624822 +0100
> -+++ dhcp-4.2.5b1/omapip/Makefile.am	2012-12-17 16:26:53.385623329
> +0100
> -@@ -1,7 +1,7 @@
> --lib_LIBRARIES = libomapi.a
> -+lib_LTLIBRARIES = libomapi.la
> - noinst_PROGRAMS = svtest
> - 
> --libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
> -+libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \
> - 		     errwarn.c listener.c dispatch.c generic.c support.c \
> - 		     handle.c message.c convert.c hash.c auth.c inet_addr.c
> \
> - 		     array.c trace.c toisc.c iscprint.c isclib.c
> -@@ -10,5 +10,5 @@ man_MANS = omapi.3
> - EXTRA_DIST = $(man_MANS)
> - 
> - svtest_SOURCES = test.c
> --svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
> -+svtest_LDADD = libomapi.la $(BIND9_LIBDIR) -ldns-export -lisc-export
> - 
> -diff -up dhcp-4.2.5b1/relay/Makefile.am.sharedlib dhcp-
> 4.2.5b1/relay/Makefile.am
> ---- dhcp-4.2.5b1/relay/Makefile.am.sharedlib	2012-12-17
> 16:26:53.351623777 +0100
> -+++ dhcp-4.2.5b1/relay/Makefile.am	2012-12-17 16:26:53.385623329 +0100
> -@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
> - 
> - sbin_PROGRAMS = dhcrelay
> - dhcrelay_SOURCES = dhcrelay.c
> --dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> -+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> - 		 $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
> - man_MANS = dhcrelay.8
> - EXTRA_DIST = $(man_MANS)
> -diff -up dhcp-4.2.5b1/server/Makefile.am.sharedlib dhcp-
> 4.2.5b1/server/Makefile.am
> ---- dhcp-4.2.5b1/server/Makefile.am.sharedlib	2012-12-17
> 16:26:53.272624822 +0100
> -+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:26:53.385623329
> +0100
> -@@ -13,8 +13,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
> - 		dhcpv6.c mdb6.c ldap.c ldap_casa.c
> - 
> - dhcpd_CFLAGS = $(LDAP_CFLAGS)
> --dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
> --	      ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-
> export
> -+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> -+	      ../dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export -lisc-
> export
> - 
> - man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
> - EXTRA_DIST = $(man_MANS)
> -diff -up dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib dhcp-
> 4.2.5b1/server/tests/Makefile.am
> ---- dhcp-4.2.5b1/server/tests/Makefile.am.sharedlib	2012-12-17
> 16:26:53.000000000 +0100
> -+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17
> 16:28:25.898349545 +0100
> -@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
> -           ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c        \
> -           ../ldap.c ../ldap_casa.c ../dhcpd.c
> - 
> --DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.a    \
> --          $(top_builddir)/dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export
> -lisc-export
> -+DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.la    \
> -+          $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export 
> -lisc-export
> - 
> - ATF_TESTS =
> - TESTS = 
> diff --git a/dhcp/patches/dhcp-4.2.5-systemtap.patch b/dhcp/patches/dhcp-
> 4.2.5-systemtap.patch
> deleted file mode 100644
> index ad774ad..0000000
> --- a/dhcp/patches/dhcp-4.2.5-systemtap.patch
> +++ /dev/null
> @@ -1,822 +0,0 @@
> -diff -up dhcp-4.2.5b1/configure.ac.systemtap dhcp-4.2.5b1/configure.ac
> ---- dhcp-4.2.5b1/configure.ac.systemtap	2012-12-17 16:56:40.563881316
> +0100
> -+++ dhcp-4.2.5b1/configure.ac	2012-12-17 16:56:40.597880870 +0100
> -@@ -554,6 +554,35 @@ else
> -     AC_MSG_RESULT(no)
> - fi
> - 
> -+AC_MSG_CHECKING([whether to include systemtap tracing support])
> -+AC_ARG_ENABLE([systemtap],
> -+              [AS_HELP_STRING([--enable-systemtap],
> -+                              [Enable inclusion of systemtap trace
> support])],
> -+              [ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no'])
> -+AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes])
> -+AC_MSG_RESULT(${ENABLE_SYSTEMTAP})
> -+
> -+if test "x${ENABLE_SYSTEMTAP}" = xyes; then
> -+  # Additional configuration for --enable-systemtap is HERE
> -+  AC_CHECK_PROGS(DTRACE, dtrace)
> -+  if test -z "$DTRACE"; then
> -+    AC_MSG_ERROR([dtrace not found])
> -+  fi
> -+  AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
> -+                [SDT_H_FOUND='no';
> -+                   AC_MSG_ERROR([systemtap support needs sys/sdt.h
> header])])
> -+  AC_DEFINE([HAVE_SYSTEMTAP], [1], [Define to 1 if using SystemTap probes.])
> -+  AC_ARG_WITH([tapset-install-dir],
> -+	      [AS_HELP_STRING([--with-tapset-install-dir], 
> -+	         [The absolute path where the tapset dir will be
> installed])],
> -+	      [if test "x${withval}" = x; then
> -+		 ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"
> -+	       else
> -+		 ABS_TAPSET_DIR="${withval}"
> -+	       fi], [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"])
> -+  AC_SUBST(ABS_TAPSET_DIR)
> -+fi
> -+
> - # Solaris needs some libraries for functions
> - AC_SEARCH_LIBS(socket, [socket])
> - AC_SEARCH_LIBS(inet_ntoa, [nsl])
> -@@ -701,6 +730,7 @@ AC_OUTPUT([
> -   tests/Makefile
> -   server/tests/Makefile
> -   doc/devel/doxyfile
> -+  tapset/Makefile
> - ])
> - 
> - sh util/bindvar.sh
> -diff -up dhcp-4.2.5b1/Makefile.am.systemtap dhcp-4.2.5b1/Makefile.am
> ---- dhcp-4.2.5b1/Makefile.am.systemtap	2012-12-17 16:56:40.461882654
> +0100
> -+++ dhcp-4.2.5b1/Makefile.am	2012-12-17 16:56:40.597880870 +0100
> -@@ -30,5 +30,8 @@ endif
> - 
> - SUBDIRS += includes tests common omapip client dhcpctl relay server
> - 
> -+SUBDIRS += tapset
> -+#DIST_SUBDIRS = $(SUBDIRS)
> -+
> - nobase_include_HEADERS = dhcpctl/dhcpctl.h
> - 
> -diff -up dhcp-4.2.5b1/server/dhcp.c.systemtap dhcp-4.2.5b1/server/dhcp.c
> ---- dhcp-4.2.5b1/server/dhcp.c.systemtap	2012-12-17 16:56:40.483882364
> +0100
> -+++ dhcp-4.2.5b1/server/dhcp.c	2012-12-17 16:56:40.599880842 +0100
> -@@ -36,7 +36,7 @@
> - #include <errno.h>
> - #include <limits.h>
> - #include <sys/time.h>
> --
> -+#include "trace.h"
> - static void commit_leases_ackout(void *foo);
> - static void maybe_return_agent_options(struct packet *packet,
> - 				       struct option_state *options);
> -@@ -275,6 +275,8 @@ void dhcpdiscover (packet, ms_nulltp)
> - 	dhcp_failover_state_t *peer;
> - #endif
> - 
> -+	TRACE(DHCPD_DISCOVER_START());
> -+
> - 	find_lease (&lease, packet, packet -> shared_network,
> - 		    0, &peer_has_leases, (struct lease *)0, MDL);
> - 
> -@@ -399,6 +401,8 @@ void dhcpdiscover (packet, ms_nulltp)
> -       out:
> - 	if (lease)
> - 		lease_dereference (&lease, MDL);
> -+
> -+	TRACE(DHCPD_DISCOVER_DONE());
> - }
> - 
> - void dhcprequest (packet, ms_nulltp, ip_lease)
> -@@ -421,6 +425,8 @@ void dhcprequest (packet, ms_nulltp, ip_
> - #endif
> - 	int have_requested_addr = 0;
> - 
> -+	TRACE(DHCPD_REQUEST_START());
> -+
> - 	oc = lookup_option (&dhcp_universe, packet -> options,
> - 			    DHO_DHCP_REQUESTED_ADDRESS);
> - 	memset (&data, 0, sizeof data);
> -@@ -700,6 +706,9 @@ void dhcprequest (packet, ms_nulltp, ip_
> - 		log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
> - 
> -       out:
> -+
> -+	TRACE(DHCPD_REQUEST_DONE());
> -+
> - 	if (subnet)
> - 		subnet_dereference (&subnet, MDL);
> - 	if (lease)
> -@@ -718,6 +727,7 @@ void dhcprelease (packet, ms_nulltp)
> - 	const char *s;
> - 	char msgbuf [1024], cstr[16]; /* XXX */
> - 
> -+	TRACE(DHCPD_RELEASE_START());
> - 
> - 	/* DHCPRELEASE must not specify address in requested-address
> - 	   option, but old protocol specs weren't explicit about this,
> -@@ -842,6 +852,8 @@ void dhcprelease (packet, ms_nulltp)
> - #endif
> - 	if (lease)
> - 		lease_dereference (&lease, MDL);
> -+
> -+	TRACE(DHCPD_RELEASE_DONE());
> - }
> - 
> - void dhcpdecline (packet, ms_nulltp)
> -@@ -859,6 +871,8 @@ void dhcpdecline (packet, ms_nulltp)
> - 	struct option_cache *oc;
> - 	struct data_string data;
> - 
> -+	TRACE(DHCPD_DECLINE_START());
> -+
> - 	/* DHCPDECLINE must specify address. */
> - 	if (!(oc = lookup_option (&dhcp_universe, packet -> options,
> - 				  DHO_DHCP_REQUESTED_ADDRESS)))
> -@@ -970,6 +984,8 @@ void dhcpdecline (packet, ms_nulltp)
> - 		option_state_dereference (&options, MDL);
> - 	if (lease)
> - 		lease_dereference (&lease, MDL);
> -+
> -+	TRACE(DHCPD_DECLINE_DONE());
> - }
> - 
> - void dhcpinform (packet, ms_nulltp)
> -@@ -993,6 +1009,8 @@ void dhcpinform (packet, ms_nulltp)
> - 	struct interface_info *interface;
> - 	int result;
> - 
> -+	TRACE(DHCPD_INFORM_START());
> -+
> - 	/* The client should set ciaddr to its IP address, but apparently
> - 	   it's common for clients not to do this, so we'll use their IP
> - 	   source address if they didn't set ciaddr. */
> -@@ -1350,6 +1368,8 @@ void dhcpinform (packet, ms_nulltp)
> - 
> - 	if (subnet)
> - 		subnet_dereference (&subnet, MDL);
> -+
> -+	TRACE(DHCPD_INFORM_DONE());
> - }
> - 
> - void nak_lease (packet, cip)
> -@@ -1366,6 +1386,8 @@ void nak_lease (packet, cip)
> - 	struct option_state *options = (struct option_state *)0;
> - 	struct option_cache *oc = (struct option_cache *)0;
> - 
> -+	TRACE(DHCPD_NAK_LEASE_START());
> -+
> - 	option_state_allocate (&options, MDL);
> - 	memset (&outgoing, 0, sizeof outgoing);
> - 	memset (&raw, 0, sizeof raw);
> -@@ -1532,6 +1554,7 @@ void nak_lease (packet, cip)
> -                            packet->interface->name);
> -         }
> - 
> -+	TRACE(DHCPD_NAK_LEASE_DONE());
> - }
> - 
> - void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
> -@@ -1573,6 +1596,8 @@ void ack_lease (packet, lease, offer, wh
> - 	if (lease -> state)
> - 		return;
> - 
> -+	TRACE(DHCPD_ACK_LEASE_START());
> -+
> - 	/* Save original cltt for comparison later. */
> - 	lease_cltt = lease->cltt;
> - 
> -@@ -2936,6 +2961,8 @@ void ack_lease (packet, lease, offer, wh
> - #endif
> - 			dhcp_reply(lease);
> - 	}
> -+
> -+	TRACE(DHCPD_ACK_LEASE_DONE());
> - }
> - 
> - /*
> -@@ -3088,6 +3115,8 @@ void dhcp_reply (lease)
> - 	if (!state)
> - 		log_fatal ("dhcp_reply was supplied lease with no state!");
> - 
> -+	TRACE(DHCPD_REPLY_START());
> -+
> - 	/* Compose a response for the client... */
> - 	memset (&raw, 0, sizeof raw);
> - 	memset (&d1, 0, sizeof d1);
> -@@ -3309,6 +3338,8 @@ void dhcp_reply (lease)
> - 
> - 	free_lease_state (state, MDL);
> - 	lease -> state = (struct lease_state *)0;
> -+
> -+	TRACE(DHCPD_REPLY_DONE());
> - }
> - 
> - int find_lease (struct lease **lp,
> -@@ -3331,6 +3362,8 @@ int find_lease (struct lease **lp,
> - 	struct data_string client_identifier;
> - 	struct hardware h;
> - 
> -+	TRACE(DHCPD_FIND_LEASE_START());
> -+
> - #if defined(FAILOVER_PROTOCOL)
> - 	/* Quick check to see if the peer has leases. */
> - 	if (peer_has_leases) {
> -@@ -4058,6 +4091,9 @@ int find_lease (struct lease **lp,
> - #if defined (DEBUG_FIND_LEASE)
> - 	log_info ("Not returning a lease.");
> - #endif
> -+
> -+	TRACE(DHCPD_FIND_LEASE_DONE());
> -+
> - 	return 0;
> - }
> - 
> -diff -up dhcp-4.2.5b1/server/dhcpd.c.systemtap dhcp-4.2.5b1/server/dhcpd.c
> ---- dhcp-4.2.5b1/server/dhcpd.c.systemtap	2012-12-17
> 16:56:40.578881119 +0100
> -+++ dhcp-4.2.5b1/server/dhcpd.c	2012-12-17 16:56:40.599880842 +0100
> -@@ -58,6 +58,8 @@ static const char url [] =
> - #  undef group
> - #endif /* PARANOIA */
> - 
> -+#include "trace.h"
> -+
> - #ifndef UNIT_TEST
> - static void usage(void);
> - #endif
> -@@ -865,6 +867,7 @@ main(int argc, char **argv) {
> - 	omapi_set_int_value ((omapi_object_t *)dhcp_control_object,
> - 			     (omapi_object_t *)0, "state", server_running);
> - 
> -+        TRACE(DHCPD_MAIN());
> - 	/* Receive packets and dispatch them... */
> - 	dispatch ();
> - 
> -diff -up dhcp-4.2.5b1/server/dhcpv6.c.systemtap dhcp-4.2.5b1/server/dhcpv6.c
> ---- dhcp-4.2.5b1/server/dhcpv6.c.systemtap	2012-12-17
> 16:56:40.571881210 +0100
> -+++ dhcp-4.2.5b1/server/dhcpv6.c	2012-12-17 16:56:40.601880816 +0100
> -@@ -15,6 +15,7 @@
> -  */
> - 
> - #include "dhcpd.h"
> -+#include "trace.h"
> - 
> - #ifdef DHCPv6
> - 
> -@@ -4212,6 +4213,8 @@ static void
> - dhcpv6_solicit(struct data_string *reply_ret, struct packet *packet) {
> - 	struct data_string client_id;
> - 
> -+	TRACE(DHCPD_6_SOLICIT_START());
> -+
> - 	/* 
> - 	 * Validate our input.
> - 	 */
> -@@ -4225,6 +4228,8 @@ dhcpv6_solicit(struct data_string *reply
> - 	 * Clean up.
> - 	 */
> - 	data_string_forget(&client_id, MDL);
> -+
> -+	TRACE(DHCPD_6_SOLICIT_DONE());
> - }
> - 
> - /*
> -@@ -4238,6 +4243,8 @@ dhcpv6_request(struct data_string *reply
> - 	struct data_string client_id;
> - 	struct data_string server_id;
> - 
> -+	TRACE(DHCPD_6_REQUEST_START());
> -+
> - 	/*
> - 	 * Validate our input.
> - 	 */
> -@@ -4255,6 +4262,8 @@ dhcpv6_request(struct data_string *reply
> - 	 */
> - 	data_string_forget(&client_id, MDL);
> - 	data_string_forget(&server_id, MDL);
> -+
> -+	TRACE(DHCPD_6_REQUEST_DONE());
> - }
> - 
> - /* Find a DHCPv6 packet's shared network from hints in the packet.
> -@@ -4367,6 +4376,8 @@ dhcpv6_confirm(struct data_string *reply
> - 	struct dhcpv6_packet *reply = (struct dhcpv6_packet *)reply_data;
> - 	int reply_ofs = (int)(offsetof(struct dhcpv6_packet, options));
> - 
> -+	TRACE(DHCPD_6_CONFIRM_START());
> -+
> - 	/* 
> - 	 * Basic client message validation.
> - 	 */
> -@@ -4553,6 +4564,8 @@ exit:
> - 		option_state_dereference(&cli_enc_opt_state, MDL);
> - 	if (opt_state != NULL)
> - 		option_state_dereference(&opt_state, MDL);
> -+
> -+	TRACE(DHCPD_6_CONFIRM_DONE());
> - }
> - 
> - /*
> -@@ -4567,6 +4580,8 @@ dhcpv6_renew(struct data_string *reply,
> - 	struct data_string client_id;
> - 	struct data_string server_id;
> - 
> -+	TRACE(DHCPD_6_RENEW_START());
> -+
> - 	/* 
> - 	 * Validate the request.
> - 	 */
> -@@ -4584,6 +4599,8 @@ dhcpv6_renew(struct data_string *reply,
> - 	 */
> - 	data_string_forget(&server_id, MDL);
> - 	data_string_forget(&client_id, MDL);
> -+
> -+	TRACE(DHCPD_6_RENEW_DONE());
> - }
> - 
> - /*
> -@@ -4597,6 +4614,8 @@ static void
> - dhcpv6_rebind(struct data_string *reply, struct packet *packet) {
> - 	struct data_string client_id;
> - 
> -+	TRACE(DHCPD_6_REBIND_START());
> -+
> - 	if (!valid_client_msg(packet, &client_id)) {
> - 		return;
> - 	}
> -@@ -4604,6 +4623,8 @@ dhcpv6_rebind(struct data_string *reply,
> - 	lease_to_client(reply, packet, &client_id, NULL);
> - 
> - 	data_string_forget(&client_id, MDL);
> -+
> -+	TRACE(DHCPD_6_REBIND_DONE());
> - }
> - 
> - static void
> -@@ -5048,6 +5069,8 @@ dhcpv6_decline(struct data_string *reply
> - 	struct data_string client_id;
> - 	struct data_string server_id;
> - 
> -+	TRACE(DHCPD_6_DECLINE_START());
> -+
> - 	/* 
> - 	 * Validate our input.
> - 	 */
> -@@ -5068,6 +5091,8 @@ dhcpv6_decline(struct data_string *reply
> - 
> - 	data_string_forget(&server_id, MDL);
> - 	data_string_forget(&client_id, MDL);
> -+
> -+	TRACE(DHCPD_6_DECLINE_DONE());
> - }
> - 
> - static void
> -@@ -5516,6 +5541,8 @@ dhcpv6_release(struct data_string *reply
> - 	struct data_string client_id;
> - 	struct data_string server_id;
> - 
> -+	TRACE(DHCPD_6_RELEASE_START());
> -+
> - 	/* 
> - 	 * Validate our input.
> - 	 */
> -@@ -5537,6 +5564,8 @@ dhcpv6_release(struct data_string *reply
> - 
> - 	data_string_forget(&server_id, MDL);
> - 	data_string_forget(&client_id, MDL);
> -+
> -+	TRACE(DHCPD_6_RELEASE_DONE());
> - }
> - 
> - /*
> -@@ -5549,6 +5578,8 @@ dhcpv6_information_request(struct data_s
> - 	struct data_string client_id;
> - 	struct data_string server_id;
> - 
> -+	TRACE(DHCPD_6_INFORMATION_REQUEST_START());
> -+
> - 	/*
> - 	 * Validate our input.
> - 	 */
> -@@ -5580,6 +5611,8 @@ dhcpv6_information_request(struct data_s
> - 		data_string_forget(&client_id, MDL);
> - 	}
> - 	data_string_forget(&server_id, MDL);
> -+
> -+	TRACE(DHCPD_6_INFORMATION_REQUEST_DONE());
> - }
> - 
> - /* 
> -@@ -5608,6 +5641,8 @@ dhcpv6_relay_forw(struct data_string *re
> - 	struct dhcpv6_relay_packet *reply;
> - 	int reply_ofs;
> - 
> -+	TRACE(DHCPD_6_RELAY_FORW_START());
> -+
> - 	/* 
> - 	 * Initialize variables for early exit.
> - 	 */
> -@@ -5867,6 +5902,8 @@ exit:
> - 	if (enc_packet != NULL) {
> - 		packet_dereference(&enc_packet, MDL);
> - 	}
> -+
> -+	TRACE(DHCPD_6_RELAY_FORW_DONE());
> - }
> - 
> - static void
> -diff -up dhcp-4.2.5b1/server/failover.c.systemtap dhcp-
> 4.2.5b1/server/failover.c
> ---- dhcp-4.2.5b1/server/failover.c.systemtap	2012-12-05
> 02:17:39.000000000 +0100
> -+++ dhcp-4.2.5b1/server/failover.c	2012-12-17 16:56:40.603880790 +0100
> -@@ -36,6 +36,8 @@
> - #include "dhcpd.h"
> - #include <omapip/omapip_p.h>
> - 
> -+#include "trace.h"
> -+
> - #if defined (FAILOVER_PROTOCOL)
> - dhcp_failover_state_t *failover_states;
> - static isc_result_t do_a_failover_option (omapi_object_t *,
> -@@ -1712,6 +1714,8 @@ isc_result_t dhcp_failover_set_state (dh
> -     struct lease *l;
> -     struct timeval tv;
> - 
> -+    TRACE(DHCPD_FAILOVER_SET_STATE_START(state->me.state, new_state));
> -+
> -     /* If we're in certain states where we're sending updates, and the peer
> -      * state changes, we need to re-schedule any pending updates just to
> -      * be on the safe side.  This results in retransmission.
> -@@ -1939,6 +1943,8 @@ isc_result_t dhcp_failover_set_state (dh
> - 	    break;
> -     }
> - 
> -+    TRACE(DHCPD_FAILOVER_SET_STATE_DONE());
> -+
> -     return ISC_R_SUCCESS;
> - }
> - 
> -@@ -2422,6 +2428,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
> - 	if (state -> me.state != normal)
> - 		return 0;
> - 
> -+	TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_START());
> -+
> - 	state->last_balance = cur_time;
> - 
> - 	for (s = shared_networks ; s ; s = s->next) {
> -@@ -2582,6 +2590,8 @@ dhcp_failover_pool_dobalance(dhcp_failov
> - 	if (leases_queued)
> - 		commit_leases();
> - 
> -+	TRACE(DHCPD_FAILOVER_POOL_DOBALANCE_DONE());
> -+
> - 	return leases_queued;
> - }
> - 
> -diff -up dhcp-4.2.5b1/server/Makefile.am.systemtap dhcp-
> 4.2.5b1/server/Makefile.am
> ---- dhcp-4.2.5b1/server/Makefile.am.systemtap	2012-12-17
> 16:56:40.563881316 +0100
> -+++ dhcp-4.2.5b1/server/Makefile.am	2012-12-17 16:56:40.603880790
> +0100
> -@@ -10,7 +10,7 @@ dist_sysconf_DATA = dhcpd.conf.example
> - sbin_PROGRAMS = dhcpd
> - dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
> - 		omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
> --		dhcpv6.c mdb6.c ldap.c ldap_casa.c
> -+		dhcpv6.c mdb6.c ldap.c ldap_casa.c probes.d trace.h
> - 
> - dhcpd_CFLAGS = $(LDAP_CFLAGS)
> - dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
> -@@ -19,3 +19,13 @@ dhcpd_LDADD = ../common/libdhcp.a ../oma
> - man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
> - EXTRA_DIST = $(man_MANS)
> - 
> -+if ENABLE_SYSTEMTAP
> -+BUILT_SOURCES = probes.h
> -+probes.h: probes.d
> -+	$(DTRACE) -C -h -s $< -o $@
> -+
> -+probes.o: probes.d
> -+	$(DTRACE) -C -G -s $< -o $@
> -+
> -+dhcpd_LDADD += probes.o
> -+endif
> -diff -up dhcp-4.2.5b1/server/probes.d.systemtap dhcp-4.2.5b1/server/probes.d
> ---- dhcp-4.2.5b1/server/probes.d.systemtap	2012-12-17
> 16:56:40.603880790 +0100
> -+++ dhcp-4.2.5b1/server/probes.d	2012-12-17 16:56:40.603880790 +0100
> -@@ -0,0 +1,43 @@
> -+provider dhcpd {
> -+	 probe main();
> -+	 probe discover_start()
> -+	 probe discover_done()
> -+	 probe request_start()
> -+	 probe request_done()
> -+	 probe release_start()
> -+	 probe release_done()
> -+	 probe decline_start()
> -+	 probe decline_done()
> -+	 probe inform_start()
> -+	 probe inform_done()
> -+	 probe nak_lease_start()
> -+	 probe nak_lease_done()
> -+	 probe ack_lease_start()
> -+	 probe ack_lease_done()
> -+	 probe reply_start()
> -+	 probe reply_done()
> -+	 probe find_lease_start()
> -+	 probe find_lease_done()
> -+	 probe 6_solicit_start()
> -+	 probe 6_solicit_done()
> -+	 probe 6_request_start()
> -+	 probe 6_request_done()
> -+	 probe 6_confirm_start()
> -+	 probe 6_confirm_done()
> -+	 probe 6_renew_start()
> -+	 probe 6_renew_done()
> -+	 probe 6_rebind_start()
> -+	 probe 6_rebind_done()
> -+	 probe 6_decline_start()
> -+	 probe 6_decline_done()
> -+	 probe 6_release_start()
> -+	 probe 6_release_done()
> -+	 probe 6_information_request_start()
> -+	 probe 6_information_request_done()
> -+	 probe 6_relay_forw_start()
> -+	 probe 6_relay_forw_done()
> -+	 probe failover_pool_dobalance_start()
> -+	 probe failover_pool_dobalance_done()
> -+	 probe failover_set_state_start(int, int) /* state, new_state */
> -+	 probe failover_set_state_done()
> -+};
> -diff -up dhcp-4.2.5b1/server/tests/Makefile.am.systemtap dhcp-
> 4.2.5b1/server/tests/Makefile.am
> ---- dhcp-4.2.5b1/server/tests/Makefile.am.systemtap	2012-12-17
> 16:56:40.564881302 +0100
> -+++ dhcp-4.2.5b1/server/tests/Makefile.am	2012-12-17
> 16:56:57.505650518 +0100
> -@@ -20,6 +20,10 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
> - DHCPLIBS = $(top_builddir)/common/libdhcp.a
> $(top_builddir)/omapip/libomapi.la    \
> -           $(top_builddir)/dhcpctl/libdhcpctl.la $(BIND9_LIBDIR) -ldns-export 
> -lisc-export
> - 
> -+if ENABLE_SYSTEMTAP
> -+DHCPLIBS += ../probes.o
> -+endif
> -+
> - ATF_TESTS =
> - TESTS = 
> - if HAVE_ATF
> -diff -up dhcp-4.2.5b1/server/trace.h.systemtap dhcp-4.2.5b1/server/trace.h
> ---- dhcp-4.2.5b1/server/trace.h.systemtap	2012-12-17
> 16:56:40.604880777 +0100
> -+++ dhcp-4.2.5b1/server/trace.h	2012-12-17 16:56:40.604880777 +0100
> -@@ -0,0 +1,11 @@
> -+// trace.h
> -+
> -+#include "config.h"
> -+#ifdef HAVE_SYSTEMTAP
> -+// include the generated probes header and put markers in code
> -+#include "probes.h"
> -+#define TRACE(probe) probe
> -+#else
> -+// Wrap the probe to allow it to be removed when no systemtap available
> -+#define TRACE(probe)
> -+#endif
> -diff -up dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap dhcp-
> 4.2.5b1/tapset/dhcpd.stp
> ---- dhcp-4.2.5b1/tapset/dhcpd.stp.systemtap	2012-12-17
> 16:56:40.604880777 +0100
> -+++ dhcp-4.2.5b1/tapset/dhcpd.stp	2012-12-17 16:56:40.604880777 +0100
> -@@ -0,0 +1,212 @@
> -+/* dhcpd tapset
> -+   Copyright (C) 2011, Red Hat Inc.
> -+ */
> -+
> -+probe dhcpd_main = process("dhcpd").mark("main")
> -+{
> -+  probestr = sprintf("%s(locals: %s)", $$name, $$locals);
> -+  
> -+}
> -+
> -+probe dhcpd_discover_start = process("dhcpd").mark("discover_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_discover_done = process("dhcpd").mark("discover_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_request_start = process("dhcpd").mark("request_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_request_done = process("dhcpd").mark("request_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_release_start = process("dhcpd").mark("release_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_release_done = process("dhcpd").mark("release_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_decline_start = process("dhcpd").mark("decline_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_decline_done = process("dhcpd").mark("decline_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_inform_start = process("dhcpd").mark("inform_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_inform_done = process("dhcpd").mark("inform_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_nak_lease_start = process("dhcpd").mark("nak_lease_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_nak_lease_done = process("dhcpd").mark("nak_lease_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_ack_lease_start = process("dhcpd").mark("ack_lease_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_ack_lease_done = process("dhcpd").mark("ack_lease_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_reply_start = process("dhcpd").mark("reply_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_reply_done = process("dhcpd").mark("reply_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_find_lease_start = process("dhcpd").mark("find_lease_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_find_lease_done = process("dhcpd").mark("find_lease_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_solicit_start = process("dhcpd").mark("6_solicit_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_solicit_done = process("dhcpd").mark("6_solicit_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_request_start = process("dhcpd").mark("6_request_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_request_done = process("dhcpd").mark("6_request_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_confirm_start = process("dhcpd").mark("6_confirm_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_confirm_done = process("dhcpd").mark("6_confirm_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_renew_start = process("dhcpd").mark("6_renew_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_renew_done = process("dhcpd").mark("6_renew_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_rebind_start = process("dhcpd").mark("6_rebind_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_rebind_done = process("dhcpd").mark("6_rebind_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_decline_start = process("dhcpd").mark("6_decline_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_decline_done = process("dhcpd").mark("6_decline_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_release_start = process("dhcpd").mark("6_release_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_release_done = process("dhcpd").mark("6_release_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_information_request_start =
> process("dhcpd").mark("6_information_request_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_information_request_done =
> process("dhcpd").mark("6_information_request_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_relay_forw_start = process("dhcpd").mark("6_relay_forw_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_6_relay_forw_done = process("dhcpd").mark("6_relay_forw_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_failover_pool_dobalance_start =
> process("dhcpd").mark("failover_pool_dobalance_start")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+probe dhcpd_failover_pool_dobalance_done =
> process("dhcpd").mark("failover_pool_dobalance_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -+
> -+
> -+probe dhcpd_failover_set_state_start =
> process("dhcpd").mark("failover_set_state_start")
> -+{
> -+  state = $arg1;
> -+  new_state = $arg2;
> -+  probestr = sprintf("%s(state=%d, new_state=%d)", $$name, state,
> new_state);
> -+}
> -+
> -+probe dhcpd_failover_set_state_done =
> process("dhcpd").mark("failover_set_state_done")
> -+{
> -+  probestr = sprintf("%s", $$name);
> -+}
> -diff -up dhcp-4.2.5b1/tapset/Makefile.am.systemtap dhcp-
> 4.2.5b1/tapset/Makefile.am
> ---- dhcp-4.2.5b1/tapset/Makefile.am.systemtap	2012-12-17
> 16:56:40.604880777 +0100
> -+++ dhcp-4.2.5b1/tapset/Makefile.am	2012-12-17 16:56:40.604880777
> +0100
> -@@ -0,0 +1,26 @@
> -+# Makefile.am for dhcp/tapset
> -+# Jiri Popelka
> -+
> -+.PHONY: clean-local install-data-hook uninstall-local
> -+
> -+#
> -+EXTRA_DIST = dhcpd.stp
> -+TAPSET_FILES = $(EXTRA_DIST)
> -+TAPSET_INSTALL_DIR = $(DESTDIR)@ABS_TAPSET_DIR@
> -+
> -+if ENABLE_SYSTEMTAP
> -+all-local: $(TAPSET_FILES)
> -+
> -+clean-local:
> -+
> -+install-data-hook:
> -+	$(MKDIR_P) $(TAPSET_INSTALL_DIR)
> -+	$(INSTALL_DATA) $(TAPSET_FILES) $(TAPSET_INSTALL_DIR)
> -+
> -+uninstall-local:
> -+	@list='$(TAPSET_FILES)'; for p in $$list; do \
> -+	  echo " rm -f '$(TAPSET_INSTALL_DIR)/$$p'"; \
> -+	  rm -f "$(TAPSET_INSTALL_DIR)/$$p"; \
> -+	done
> -+endif
> -+
> diff --git a/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
> b/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
> deleted file mode 100644
> index 73f1f55..0000000
> --- a/dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -diff -up dhcp-4.2.5b1/configure.ac.pkgconfig dhcp-4.2.5b1/configure.ac
> ---- dhcp-4.2.5b1/configure.ac.pkgconfig	2012-12-05 02:18:44.000000000
> +0100
> -+++ dhcp-4.2.5b1/configure.ac	2012-12-17 15:45:33.769128387 +0100
> -@@ -194,6 +194,9 @@ if test "$atf_path" != "no" ; then
> -         if test -f $atf_path/lib/pkgconfig/atf-c.pc ; then
> -             atf_pcp=$atf_path/lib/pkgconfig
> -         fi
> -+        if test -f $atf_path/lib64/pkgconfig/atf-c.pc ; then
> -+            atf_pcp=$atf_path/lib64/pkgconfig
> -+        fi
> -     else
> -         # Not specified, try some common paths
> -         atf_dirs="/usr /usr/local /usr/pkg /opt /opt/local"
> -@@ -202,6 +205,9 @@ if test "$atf_path" != "no" ; then
> -             if test -f $d/lib/pkgconfig/atf-c.pc ; then
> -                 atf_pcp=$d/lib/pkgconfig
> -             fi
> -+            if test -f $d/lib64/pkgconfig/atf-c.pc ; then
> -+                atf_pcp=$d/lib64/pkgconfig
> -+            fi
> -         done
> -     fi
> -     if test "$atf_pcp" = "" ; then