PSARC 2016/201 Upgrade to ISC DHCP 4.3.3-P1
authorBen Chang <Benjamin.Chang@Oracle.COM>
Fri, 01 Apr 2016 16:02:33 -0700
changeset 5709 42ebc732084b
parent 5708 49b43e37ce26
child 5710 b67d827041c5
PSARC 2016/201 Upgrade to ISC DHCP 4.3.3-P1 20430438 upgrade isc-dhcp to better support IPv6 for WAN Boot
components/isc-dhcp/Makefile
components/isc-dhcp/dhcp.p5m
components/isc-dhcp/isc-dhcp.license
components/isc-dhcp/llib-ldst
components/isc-dhcp/patches/001-dhcp-dynamiclibraries.patch
components/isc-dhcp/patches/002-dhcp_broadcast_offer_bug.patch
components/isc-dhcp/patches/002-ignore-client-uids.patch
components/isc-dhcp/patches/003-CVE-2015-8605.patch
components/isc-dhcp/patches/004-dhcp_broadcast_offer_bug.patch
--- a/components/isc-dhcp/Makefile	Fri Apr 01 15:20:17 2016 -0700
+++ b/components/isc-dhcp/Makefile	Fri Apr 01 16:02:33 2016 -0700
@@ -26,24 +26,25 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		isc-dhcp
-COMPONENT_VERSION=	4.1-ESV-R7
-HUMAN_VERSION=		$(COMPONENT_VERSION)-P1
-IPS_COMPONENT_VERSION=	4.1.0.7.1
+COMPONENT_VERSION=	4.3.3-P1
+HUMAN_VERSION=		$(COMPONENT_VERSION)
+IPS_COMPONENT_VERSION=	4.3.3.1
 COMPONENT_SRC_NAME=	dhcp
 COMPONENT_PROJECT_URL=	http://www.isc.org/software/dhcp/
 COMPONENT_ARCHIVE_URL=  \
     http://ftp.isc.org/isc/dhcp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_ARCHIVE_HASH= \
-    sha256:25d579291a13ccce39c5dbb0e2f2ce8e974c82015bc4e3ee653cf95a4ed15ca4
+    sha256:c11e896dffa1bfbc49462965d3f6dec45534e34068603546d9a236f2aa669921
 COMPONENT_BUGDB=	service/dhcp-server
 
-TPNO=			10383
+TPNO=			27530
 
 INSTALL_TARGET=
 include $(WS_MAKE_RULES)/common.mk
 
 LINT_FLAGS +=   -I$(BUILD_DIR_32)/includes \
-	-I$(BUILD_DIR_64)/includes -I$(SOURCE_DIR)/includes -I.
+	-I$(BUILD_DIR_64)/includes -I$(BUILD_DIR_32)/bind/include \
+	-I$(BUILD_DIR_64)/bind/include -I$(SOURCE_DIR)/includes -I.
 
 COMPONENT_PRE_CONFIGURE_ACTION = \
 	($(CLONEY) $(SOURCE_DIR) $(@D))
@@ -57,10 +58,7 @@
 CONFIGURE_OPTIONS  +=	--enable-use-sockets
 CONFIGURE_OPTIONS  +=	--enable-ipv4-pktinfo
 CONFIGURE_OPTIONS  +=	--with-pic
-
-
-# Disable message in omapip/errwarn.c.
-CPPFLAGS  +=	        -DNOMINUM
+CONFIGURE_OPTIONS +=	--srcdir=$(BUILD_DIR_$(BITS))
 
 CFLAGS += -g -fPIC
 
@@ -71,7 +69,8 @@
 $(PROTO_DIR)/dhcpd.leases:	$(INSTALL_32_and_64)
 	$(TOUCH) $@
 
-
+# Package dependencies
+# Created by 'gmake REQUIRED_PACKAGES', manually verified.
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
 REQUIRED_PACKAGES += system/network
--- a/components/isc-dhcp/dhcp.p5m	Fri Apr 01 15:20:17 2016 -0700
+++ b/components/isc-dhcp/dhcp.p5m	Fri Apr 01 16:02:33 2016 -0700
@@ -18,6 +18,7 @@
 #
 # CDDL HEADER END
 #
+#
 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -32,9 +33,10 @@
 set name=info.classification value=org.opensolaris.category.2008:System/Services
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid value=PSARC/2011/043 value=PSARC/2015/160
+set name=org.opensolaris.arc-caseid value=PSARC/2011/043 value=PSARC/2015/160 \
+    value=PSARC/2016/201
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-file server/dhcpd.conf path=etc/inet/dhcpd.conf.example group=sys
+file path=etc/inet/dhcpd.conf.example group=sys
 file dhcp_auths path=etc/security/auth_attr.d/service%2Fnetwork%2Fisc-dhcp
 file isc-dhcp-relay.xml path=lib/svc/manifest/network/dhcp/isc-dhcp-relay.xml \
     group=sys mode=0444
@@ -42,33 +44,20 @@
     path=lib/svc/manifest/network/dhcp/isc-dhcp-server.xml group=sys mode=0444
 file isc-dhcp path=lib/svc/method/isc-dhcp mode=0555
 file path=usr/include/dhcpctl/dhcpctl.h
-file path=usr/include/isc-dhcp/boolean.h
-file path=usr/include/isc-dhcp/commandline.h
-file path=usr/include/isc-dhcp/dst.h
-file path=usr/include/isc-dhcp/formatcheck.h
-file path=usr/include/isc-dhcp/int.h
-file path=usr/include/isc-dhcp/lang.h
-file path=usr/include/isc-dhcp/list.h
-file path=usr/include/isc-dhcp/mem.h
-file path=usr/include/isc-dhcp/print.h
-file path=usr/include/isc-dhcp/result.h
-file path=usr/include/isc-dhcp/string.h
-file path=usr/include/isc-dhcp/types.h
 file path=usr/include/omapip/alloc.h
 file path=usr/include/omapip/buffer.h
 file path=usr/include/omapip/convert.h
 file path=usr/include/omapip/hash.h
+file path=usr/include/omapip/isclib.h
 file path=usr/include/omapip/omapip.h
 file path=usr/include/omapip/omapip_p.h
+file path=usr/include/omapip/result.h
 file path=usr/include/omapip/trace.h
 link path=usr/lib/$(MACH64)/libdhcpctl.so target=libdhcpctl.so.1
 file path=usr/lib/$(MACH64)/libdhcpctl.so.1
-link path=usr/lib/$(MACH64)/libdst.so target=libdst.so.1
-file path=usr/lib/$(MACH64)/libdst.so.1
 link path=usr/lib/$(MACH64)/libomapi.so target=libomapi.so.1
 file path=usr/lib/$(MACH64)/libomapi.so.1
 file path=usr/lib/$(MACH64)/llib-ldhcpctl.ln
-file path=usr/lib/$(MACH64)/llib-ldst.ln
 file path=usr/lib/$(MACH64)/llib-lomapi.ln
 file SmfDHCPStates.html path=usr/lib/help/auths/locale/SmfDHCPStates.html
 file SmfValueDHCP.html path=usr/lib/help/auths/locale/SmfValueDHCP.html
@@ -76,18 +65,15 @@
 file path=usr/lib/inet/dhcrelay
 link path=usr/lib/libdhcpctl.so target=libdhcpctl.so.1
 file path=usr/lib/libdhcpctl.so.1
-link path=usr/lib/libdst.so target=libdst.so.1
-file path=usr/lib/libdst.so.1
 link path=usr/lib/libomapi.so target=libomapi.so.1
 file path=usr/lib/libomapi.so.1
 file path=usr/lib/llib-ldhcpctl
 file path=usr/lib/llib-ldhcpctl.ln
-file path=usr/lib/llib-ldst
-file path=usr/lib/llib-ldst.ln
 file path=usr/lib/llib-lomapi
 file path=usr/lib/llib-lomapi.ln
 file path=usr/sbin/omshell
 file path=usr/share/man/man1/omshell.1
+file path=usr/share/man/man3/dhcpctl.3
 file path=usr/share/man/man3/omapi.3
 file path=usr/share/man/man5/dhcp-eval.5
 file path=usr/share/man/man5/dhcp-options.5
@@ -104,12 +90,8 @@
 dir  path=var/db/isc-dhcp owner=dhcpserv group=netadm mode=0755
 file dhcpd.leases path=var/db/isc-dhcp/dhcpd4.leases owner=dhcpserv \
     group=netadm mode=0644 preserve=true
-file dhcpd.leases path=var/db/isc-dhcp/dhcpd4.leases~ owner=dhcpserv \
-    group=netadm mode=0644 preserve=true
 file dhcpd.leases path=var/db/isc-dhcp/dhcpd6.leases owner=dhcpserv \
     group=netadm mode=0644 preserve=true
-file dhcpd.leases path=var/db/isc-dhcp/dhcpd6.leases~ owner=dhcpserv \
-    group=netadm mode=0644 preserve=true
 user username=dhcpserv ftpuser=false gcos-field="DHCP Configuration Admin" \
     group=netadm uid=18
 license isc-dhcp.license license="ISC BSD"
--- a/components/isc-dhcp/isc-dhcp.license	Fri Apr 01 15:20:17 2016 -0700
+++ b/components/isc-dhcp/isc-dhcp.license	Fri Apr 01 16:02:33 2016 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2004-2012 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 2004-2016 by Internet Systems Consortium, Inc. ("ISC")
 # Copyright (c) 1995-2003 by Internet Software Consortium
 #
 # Permission to use, copy, modify, and distribute this software for any
--- a/components/isc-dhcp/llib-ldst	Fri Apr 01 15:20:17 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- */
-
-/* LINTLIBRARY */
-/* PROTOLIB1 */
-
-#include <stdlib.h>
-#include <config.h>
-#include <isc-dhcp/dst.h>
--- a/components/isc-dhcp/patches/001-dhcp-dynamiclibraries.patch	Fri Apr 01 15:20:17 2016 -0700
+++ b/components/isc-dhcp/patches/001-dhcp-dynamiclibraries.patch	Fri Apr 01 16:02:33 2016 -0700
@@ -1,45 +1,105 @@
-# HG changeset patch
-# User Praveen Kumar Muthuswamy <[email protected]>
-# Date 1428520414 25200
-#      Wed Apr 08 12:13:34 2015 -0700
-# Node ID 045f212982ea4578a9dafb925ad62cf366802dc6
-# Parent  6470d3cc3ce1677a8283cdf15257c2b8c0ab43c9
-/*
- * This patch file (dhcp-dynamiclibraries.patch) was developed in-house to
- * allow isc-dhcp to build and package shared objects for libomapi, libdhcpctl,
- * and libdst. Upstream (ISC) has been made aware of this requirement and the
- * the patch through a service ticket and they are actively working on
- * developing the patch.
- */
+This patch file was developed in-house to allow isc-dhcp to build and package
+shared objects for libomapi and libdhcpctl. Upstream (ISC) has been made aware of
+this requirement and the the patch through a service ticket and they are actively
+working on developing a patch.
 
-diff --git a/client/Makefile.am b/client/Makefile.am
---- a/client/Makefile.am
-+++ b/client/Makefile.am
-@@ -5,7 +5,7 @@
+--- old/bind/Makefile.in	Fri Mar 11 11:59:19 2016
++++ new/bind/Makefile.in	Fri Mar 11 11:59:19 2016
+@@ -24,6 +24,17 @@
+ # GMAKE=
+ include ./bindvar.tmp
+ 
++
++CC = @CC@
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++
++ENV = /usr/bin/env
++CONFIG_SHELL =  /bin/bash
++CONFIGURE_ENV = CONFIG_SHELL="$(CONFIG_SHELL)"
++CONFIGURE_ENV += CC="$(CC)"
++
++
+ bindsrcdir=bind-${version}
+ 
+ bindconfig = --disable-kqueue --disable-epoll --disable-devpoll \
+@@ -30,7 +41,8 @@
+ 	--without-openssl --without-libxml2 --enable-exportlib \
+ 	--with-gssapi=no --enable-threads=no @BINDCONFIG@ \
+ 	--with-export-includedir=${binddir}/include \
+-	--with-export-libdir=${binddir}/lib
++	--with-export-libdir=${binddir}/lib --with-libtool \
++	CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)"
+ 
+ @BIND_ATF_FALSE@cleandirs = ./lib ./include
+ @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
+@@ -64,6 +76,7 @@
+ 		echo Configuring BIND Export libraries for DHCP. ;      \
+ 		rm -rf ${cleandirs} ${cleanfiles} ;                     \
+ 		(cd ${bindsrcdir} &&                                    \
++		$(ENV) $(CONFIGURE_ENV) $(CONFIG_SHELL)			\
+                  ./configure ${bindconfig} > ${binddir}/configure.log); \
+ 	fi
+ 
+--- old/client/Makefile.am	Fri Mar 11 11:59:19 2016
++++ new/client/Makefile.am	Fri Mar 11 11:59:19 2016
+@@ -10,7 +10,7 @@
+ 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
  		   scripts/netbsd scripts/nextstep scripts/openbsd \
  		   scripts/solaris scripts/openwrt
- dhclient_LDADD = ../common/libdhcp.a ../minires/libres.a \
--		 ../omapip/libomapi.a ../dst/libdst.a
-+		 ../omapip/libomapi.la ../dst/libdst.la
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../bind/lib/libirs.a \
+ 		 ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
  man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
  EXTRA_DIST = $(man_MANS)
+--- old/client/tests/Makefile.am	Fri Mar 11 11:59:20 2016
++++ new/client/tests/Makefile.am	Fri Mar 11 11:59:19 2016
+@@ -15,8 +15,8 @@
  
-diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
---- a/common/tests/Makefile.am
-+++ b/common/tests/Makefile.am
-@@ -13,7 +13,7 @@
+ DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c
+ 
+-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a    \
+-          $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
++DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la    \
++          $(top_builddir)/dhcpctl/libdhcpctl.la $(top_builddir)/bind/lib/libirs.a \
+ 	  $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
+ 	  $(top_builddir)/bind/lib/libisc.a
+ 
+--- old/common/tests/Makefile.am	Fri Mar 11 11:59:19 2016
++++ new/common/tests/Makefile.am	Fri Mar 11 11:59:19 2016
+@@ -13,25 +13,25 @@
  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 ../../dst/libdst.a ../../minires/libres.a
-+	../../omapip/libomapi.la ../../dst/libdst.la ../../minires/libres.a
+-	../../omapip/libomapi.a ../../bind/lib/libirs.a \
++	../../omapip/libomapi.la ../../bind/lib/libirs.a \
+ 	../../bind/lib/libdns.a ../../bind/lib/libisccfg.a  ../../bind/lib/libisc.a
+ 
+ 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 ../../bind/lib/libirs.a \
++	../../omapip/libomapi.la ../../bind/lib/libirs.a \
+ 	../../bind/lib/libdns.a ../../bind/lib/libisccfg.a  ../../bind/lib/libisc.a
+ 
+ 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 ../../bind/lib/libirs.a \
++	../../omapip/libomapi.la ../../bind/lib/libirs.a \
+ 	../../bind/lib/libdns.a ../../bind/lib/libisccfg.a  ../../bind/lib/libisc.a
+ 
+ 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 ../../bind/lib/libirs.a \
++	../../omapip/libomapi.la ../../bind/lib/libirs.a \
+ 	../../bind/lib/libdns.a ../../bind/lib/libisccfg.a  ../../bind/lib/libisc.a
  
  check: $(ATF_TESTS)
- 	atf-run | atf-report
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -37,7 +37,7 @@
+--- old/./configure.ac	Fri Mar 11 11:59:19 2016
++++ new/./configure.ac	Fri Mar 11 11:59:19 2016
+@@ -43,7 +43,7 @@
  # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
  AC_USE_SYSTEM_EXTENSIONS
  
@@ -48,10 +108,9 @@
  AC_CONFIG_HEADERS([includes/config.h])
  
  # we sometimes need to know byte order for building packets
-diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
---- a/dhcpctl/Makefile.am
-+++ b/dhcpctl/Makefile.am
-@@ -1,15 +1,16 @@
+--- old/dhcpctl/Makefile.am	Fri Mar 11 11:59:19 2016
++++ new/dhcpctl/Makefile.am	Fri Mar 11 11:59:19 2016
+@@ -1,17 +1,18 @@
  bin_PROGRAMS = omshell
 -lib_LIBRARIES = libdhcpctl.a
 +lib_LTLIBRARIES = libdhcpctl.la
@@ -61,37 +120,31 @@
  EXTRA_DIST = $(man_MANS)
  
  omshell_SOURCES = omshell.c
--omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../minires/libres.a \
--                ../omapip/libomapi.a ../dst/libdst.a
-+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../minires/libres.a \
-+                ../omapip/libomapi.la ../dst/libdst.la
+-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
++omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
+ 	        ../bind/lib/libirs.a ../bind/lib/libdns.a \
+ 	        ../bind/lib/libisccfg.a ../bind/lib/libisc.a
  
 -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 ../minires/libres.a \
--               ../omapip/libomapi.a ../dst/libdst.a
-+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../minires/libres.a \
-+               ../omapip/libomapi.la ../dst/libdst.la
-diff --git a/dst/Makefile.am b/dst/Makefile.am
---- a/dst/Makefile.am
-+++ b/dst/Makefile.am
-@@ -1,8 +1,9 @@
- AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
+-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
++cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
+ 	       ../bind/lib/libirs.a ../bind/lib/libdns.a \
+                ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+--- old/includes/omapip/omapip.h	Fri Mar 11 11:59:20 2016
++++ new/includes/omapip/omapip.h	Fri Mar 11 11:59:19 2016
+@@ -29,6 +29,7 @@
  
--lib_LIBRARIES = libdst.a
-+lib_LTLIBRARIES = libdst.la
-+libdst_la_LDFLAGS = -version-info 1
+ #ifndef _OMAPIP_H_
+ #define _OMAPIP_H_
++#include "config.h"
+ #include "result.h"
+ #include <stdarg.h>
  
--libdst_a_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
-+libdst_la_SOURCES = dst_support.c dst_api.c hmac_link.c md5_dgst.c \
- 		   base64.c prandom.c
- 
- EXTRA_DIST = dst_internal.h md5.h md5_locl.h
-diff --git a/omapip/Makefile.am b/omapip/Makefile.am
---- a/omapip/Makefile.am
-+++ b/omapip/Makefile.am
+--- old/omapip/Makefile.am	Fri Mar 11 11:59:19 2016
++++ new/omapip/Makefile.am	Fri Mar 11 11:59:19 2016
 @@ -1,7 +1,8 @@
 -lib_LIBRARIES = libomapi.a
 +lib_LTLIBRARIES = libomapi.la
@@ -102,53 +155,52 @@
 +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 mrtrace.c toisc.c iscprint.c
-@@ -9,5 +10,5 @@
+ 		     array.c trace.c toisc.c iscprint.c isclib.c
+@@ -10,6 +11,6 @@
  EXTRA_DIST = $(man_MANS)
  
  svtest_SOURCES = test.c
--svtest_LDADD = libomapi.a ../dst/libdst.a
-+svtest_LDADD = libomapi.la ../dst/libdst.la
+-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
++svtest_LDADD = libomapi.la ../bind/lib/libirs.a ../bind/lib/libdns.a \
+ 		../bind/lib/libisccfg.a ../bind/lib/libisc.a
  
-diff --git a/relay/Makefile.am b/relay/Makefile.am
---- a/relay/Makefile.am
-+++ b/relay/Makefile.am
+--- old/relay/Makefile.am	Fri Mar 11 11:59:20 2016
++++ new/relay/Makefile.am	Fri Mar 11 11:59:19 2016
 @@ -2,7 +2,7 @@
  
  sbin_PROGRAMS = dhcrelay
  dhcrelay_SOURCES = dhcrelay.c
--dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dst/libdst.a ../minires/libres.a
-+dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dst/libdst.la ../minires/libres.a
+-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
+ 		 ../bind/lib/libirs.a ../bind/lib/libdns.a \
+ 		 ../bind/lib/libisccfg.a ../bind/lib/libisc.a
  man_MANS = dhcrelay.8
- EXTRA_DIST = $(man_MANS)
+--- old/server/Makefile.am	Fri Mar 11 11:59:20 2016
++++ new/server/Makefile.am	Fri Mar 11 11:59:19 2016
+@@ -13,10 +13,10 @@
+ 		dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
  
-diff --git a/server/Makefile.am b/server/Makefile.am
---- a/server/Makefile.am
-+++ b/server/Makefile.am
-@@ -13,9 +13,9 @@
- 		dhcpv6.c mdb6.c
- 
- # libomapi.a this is here twice to handle circular library dependencies :(
--dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dst/libdst.a \
--	      ../dhcpctl/libdhcpctl.a ../minires/libres.a \
--	      ../omapip/libomapi.a
-+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dst/libdst.la \
-+	      ../dhcpctl/libdhcpctl.la ../minires/libres.a \
-+	      ../omapip/libomapi.la
+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
+-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+-	      ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
++	      ../dhcpctl/libdhcpctl.la ../bind/lib/libirs.a \
+ 	      ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
+-	      $(LDAP_LIBS)		
++	      $(LDAP_LIBS)
  
  man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
  EXTRA_DIST = $(man_MANS)
-diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
---- a/server/tests/Makefile.am
-+++ b/server/tests/Makefile.am
+--- old/server/tests/Makefile.am	Fri Mar 11 11:59:19 2016
++++ new/server/tests/Makefile.am	Fri Mar 11 11:59:19 2016
 @@ -17,8 +17,8 @@
            ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c        \
-           ../dhcpd.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 $(top_builddir)/dst/libdst.a \
+-          $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
 +DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la    \
-+          $(top_builddir)/dhcpctl/libdhcpctl.la $(top_builddir)/dst/libdst.la \
-           $(top_builddir)/minires/libres.a
++          $(top_builddir)/dhcpctl/libdhcpctl.la $(top_builddir)/bind/lib/libirs.a \
+ 	  $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
+ 	  $(top_builddir)/bind/lib/libisc.a
  
- ATF_TESTS =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/isc-dhcp/patches/002-dhcp_broadcast_offer_bug.patch	Fri Apr 01 16:02:33 2016 -0700
@@ -0,0 +1,174 @@
+This patch file was developed in-house to fix a Solaris specific bug. We are
+working with upstream, but it is unclear at this point whether or not they are
+going to accept it. This is a highly visible bug which many customers have
+encountered.
+
+--- old/common/socket.c	Tue Mar  1 19:45:19 2016
++++ new/common/socket.c	Tue Mar  1 19:45:18 2016
+@@ -39,6 +39,9 @@
+ #include <sys/ioctl.h>
+ #include <sys/uio.h>
+ #include <sys/uio.h>
++#if defined (sun)
++#include <sys/ethernet.h>
++#endif
+ 
+ #if defined(sun) && defined(USE_V4_PKTINFO)
+ #include <sys/sysmacros.h>
+@@ -87,6 +90,33 @@
+ static int once = 0;
+ #endif /* !defined(SO_BINDTODEVICE) && !defined(USE_FALLBACK) */
+ 
++#if defined (sun)
++int
++setup_arp(struct interface_info *interface, struct in_addr ip_addr,
++	unsigned char *macaddr)
++{
++        struct xarpreq ar;
++        struct sockaddr_in *sin;
++
++	(void) memset(&ar, 0, sizeof (ar));
++        sin = (struct sockaddr_in *)&ar.xarp_pa;
++        sin->sin_family = AF_INET;
++	sin->sin_addr.s_addr = ip_addr.s_addr;
++
++	ar.xarp_ha.sdl_alen = ETHERADDRL;
++	(void) memcpy(LLADDR(&ar.xarp_ha), macaddr, ar.xarp_ha.sdl_alen); 
++	ar.xarp_ha.sdl_family = AF_LINK; 
++	if (ioctl(interface->set_arp_socket, SIOCSXARP, (caddr_t)&ar) < 0) {
++		log_error("setup_arp: ioctl error for IP %s MAC %s",
++		   inet_ntoa(ip_addr), ether_ntoa((const struct ether_addr *)
++		    macaddr));
++		return (1);
++	}
++        return (0);
++}
++#endif
++
++
+ /* Reinitializes the specified interface after an address change.   This
+    is not required for packet-filter APIs. */
+ 
+@@ -337,6 +367,9 @@
+ #else
+ 	info->wfdesc = info->rfdesc;
+ #endif
++#if defined(sun)
++	info->set_arp_socket = socket(AF_INET, SOCK_DGRAM, 0);
++#endif
+ 	if (!quiet_interface_discovery)
+ 		log_info ("Sending on   Socket/%s%s%s",
+ 		      info->name,
+@@ -353,6 +386,9 @@
+ 	close (info -> wfdesc);
+ #endif
+ 	info -> wfdesc = -1;
++#if defined (sun)
++	close (info -> set_arp_socket);
++#endif
+ 
+ 	if (!quiet_interface_discovery)
+ 		log_info ("Disabling output on Socket/%s%s%s",
+@@ -1088,7 +1124,11 @@
+ int can_unicast_without_arp (ip)
+ 	struct interface_info *ip;
+ {
++#if defined (sun)
++	return 1;
++#else
+ 	return 0;
++#endif
+ }
+ 
+ int can_receive_unicast_unconfigured (ip)
+--- old/includes/dhcpd.h	Tue Mar  1 19:45:19 2016
++++ new/includes/dhcpd.h	Tue Mar  1 19:45:18 2016
+@@ -1354,6 +1354,9 @@
+ 	int configured;			/* If set to 1, interface has at least
+ 					 * one valid IP address.
+ 					 */
++#if defined (sun)
++	int set_arp_socket;		/* IOCTL socket to set entry in cache */
++#endif
+ 	u_int32_t flags;		/* Control flags... */
+ #define INTERFACE_REQUESTED 1
+ #define INTERFACE_AUTOMATIC 2
+@@ -2563,6 +2566,10 @@
+ 		       struct sockaddr_in6 *, struct hardware *);
+ #endif
+ 
++#if defined (sun)
++int setup_arp(struct interface_info *, struct in_addr, unsigned char *);
++#endif
++
+ #ifdef USE_SOCKET_SEND
+ void if_reinitialize_send (struct interface_info *);
+ void if_register_send (struct interface_info *);
+--- old/relay/dhcrelay.c	Tue Mar  1 19:45:19 2016
++++ new/relay/dhcrelay.c	Tue Mar  1 19:45:18 2016
+@@ -653,6 +653,13 @@
+ 			to.sin_addr = packet->yiaddr;
+ 			to.sin_port = remote_port;
+ 
++#if defined (sun)
++			if (setup_arp(out, packet->yiaddr, packet->chaddr)) {
++				log_error("do_relay4 : Set arp entry failed");
++				return;
++			}
++#endif	
++
+ 			/* and hardware address is not broadcast */
+ 			htop = &hto;
+ 		} else {
+--- old/server/bootp.c	Tue Mar  1 19:45:19 2016
++++ new/server/bootp.c	Tue Mar  1 19:45:18 2016
+@@ -410,7 +410,12 @@
+ 		   can_unicast_without_arp (packet -> interface)) {
+ 		to.sin_addr = raw.yiaddr;
+ 		to.sin_port = remote_port;
+-
++#if defined (__sun)
++                if (setup_arp(packet->interface, raw.yiaddr, raw.chaddr)) {
++                        log_error("bootp : Set arp entry failed");
++                        goto out;
++                }
++#endif
+ 	/* Otherwise, broadcast it on the local network. */
+ 	} else {
+ 		to.sin_addr = limited_broadcast;
+--- old/server/dhcp.c	Tue Mar  1 19:45:19 2016
++++ new/server/dhcp.c	Tue Mar  1 19:45:18 2016
+@@ -30,6 +30,8 @@
+ #include <errno.h>
+ #include <limits.h>
+ #include <sys/time.h>
++#include <sys/sockio.h>
++#include <sys/ioccom.h>
+ 
+ static void maybe_return_agent_options(struct packet *packet,
+ 				       struct option_state *options);
+@@ -3745,7 +3747,12 @@
+ 		   can_unicast_without_arp (state -> ip)) {
+ 		to.sin_addr = raw.yiaddr;
+ 		to.sin_port = remote_port;
+-
++#if defined (sun)
++		if (setup_arp(state->ip, raw.yiaddr, raw.chaddr)) {
++			log_error("dhcp_reply : Set arp entry failed");
++			goto err_out;
++		}
++#endif
+ 	/* Otherwise, broadcast it on the local network. */
+ 	} else {
+ 		to.sin_addr = limited_broadcast;
+@@ -3767,7 +3774,9 @@
+ 
+ 	/* Free all of the entries in the option_state structure
+ 	   now that we're done with them. */
+-
++#if defined (sun)
++err_out:
++#endif
+ 	free_lease_state (state, MDL);
+ 	lease -> state = (struct lease_state *)0;
+ }
--- a/components/isc-dhcp/patches/002-ignore-client-uids.patch	Fri Apr 01 15:20:17 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-The following patch is adopted from ISC DHCP version 4.3.0.
-http://ftp.isc.org/isc/dhcp/4.3.0/dhcp-4.3.0.tar.gz
-
---- dhcp-4.1-ESV-R7/server/stables.c.orig	Thu Aug 23 19:23:54 2012
-+++ dhcp-4.1-ESV-R7/server/stables.c	Mon Apr 28 16:37:14 2014
-@@ -244,6 +244,7 @@
- 	{ "delayed-ack", "S",			&server_universe,  58, 1 },
- 	{ "max-ack-delay", "L",			&server_universe,  59, 1 },
- #endif
-+	{ "ignore-client-uids", "f",		&server_universe,  60, 1 },
- 	{ NULL, NULL, NULL, 0, 0 }
- };
- 
---- dhcp-4.1-ESV-R7/server/dhcp.c.orig	Thu Aug 23 19:23:54 2012
-+++ dhcp-4.1-ESV-R7/server/dhcp.c	Mon Apr 28 16:36:18 2014
-@@ -2304,31 +2304,40 @@
- 	/* Update Client Last Transaction Time. */
- 	lt->cltt = cur_time;
- 
--	/* Record the uid, if given... */
--	oc = lookup_option (&dhcp_universe, packet -> options,
--			    DHO_DHCP_CLIENT_IDENTIFIER);
--	if (oc &&
--	    evaluate_option_cache (&d1, packet, lease,
--				   (struct client_state *)0,
--				   packet -> options, state -> options,
--				   &lease -> scope, oc, MDL)) {
--		if (d1.len <= sizeof lt -> uid_buf) {
--			memcpy (lt -> uid_buf, d1.data, d1.len);
--			lt -> uid = lt -> uid_buf;
--			lt -> uid_max = sizeof lt -> uid_buf;
--			lt -> uid_len = d1.len;
--		} else {
--			unsigned char *tuid;
--			lt -> uid_max = d1.len;
--			lt -> uid_len = d1.len;
--			tuid = (unsigned char *)dmalloc (lt -> uid_max, MDL);
--			/* XXX inelegant */
--			if (!tuid)
--				log_fatal ("no memory for large uid.");
--			memcpy (tuid, d1.data, lt -> uid_len);
--			lt -> uid = tuid;
-+	/* See if we want to record the uid for this client */
-+	oc = lookup_option(&server_universe, state->options,
-+	    SV_IGNORE_CLIENT_UIDS);
-+	if ((oc == NULL) ||
-+	    !evaluate_boolean_option_cache(&ignorep, packet, lease, NULL,
-+		packet->options, state->options,
-+		&lease->scope, oc, MDL)) {
-+
-+		/* Record the uid, if given... */
-+		oc = lookup_option (&dhcp_universe, packet -> options,
-+		    DHO_DHCP_CLIENT_IDENTIFIER);
-+		if (oc &&
-+		    evaluate_option_cache (&d1, packet, lease,
-+			(struct client_state *)0,
-+			packet -> options, state -> options,
-+			&lease -> scope, oc, MDL)) {
-+			if (d1.len <= sizeof lt -> uid_buf) {
-+				memcpy (lt -> uid_buf, d1.data, d1.len);
-+				lt -> uid = lt -> uid_buf;
-+				lt -> uid_max = sizeof lt -> uid_buf;
-+				lt -> uid_len = d1.len;
-+			} else {
-+				unsigned char *tuid;
-+				lt -> uid_max = d1.len;
-+				lt -> uid_len = d1.len;
-+				tuid = (unsigned char *)dmalloc (lt -> uid_max, MDL);
-+				/* XXX inelegant */
-+				if (!tuid)
-+					log_fatal ("no memory for large uid.");
-+				memcpy (tuid, d1.data, lt -> uid_len);
-+				lt -> uid = tuid;
-+			}
-+			data_string_forget (&d1, MDL);
- 		}
--		data_string_forget (&d1, MDL);
- 	}
- 
- 	if (host) {
---- dhcp-4.1-ESV-R7/server/dhcpd.conf.5.orig	Wed May  7 18:37:36 2014
-+++ dhcp-4.1-ESV-R7/server/dhcpd.conf.5	Wed May  7 18:38:46 2014
-@@ -2302,6 +2302,19 @@
- must be a constant value.
- .RE
- .PP
-+The
-+.I ignore-client-uids
-+statement
-+.RS 0.25i
-+.PP
-+.B ignore-client-uids \fIflag\fB;\fR
-+.PP
-+If the \fIignore-client-uids\fR statement is present and has a value of
-+\fItrue\fR or \fIon\fR, the UID for clients will not be recorded.
-+If this statement is not present or has a value of \fIfalse\fR or
-+\fIoff\fR, then client UIDs will be recorded.
-+.RE
-+.PP
- The
- .I infinite-is-reserved
- statement
---- dhcp-4.1-ESV-R7/includes/dhcpd.h.orig	Thu Aug 23 19:23:53 2012
-+++ dhcp-4.1-ESV-R7/includes/dhcpd.h	Mon Apr 28 16:11:17 2014
-@@ -627,6 +627,7 @@
- #define SV_LIMIT_PREFS_PER_IA		57
- #define SV_DELAYED_ACK			58
- #define SV_MAX_ACK_DELAY		59
-+#define SV_IGNORE_CLIENT_UIDS		60
- 
- #if !defined (DEFAULT_PING_TIMEOUT)
- # define DEFAULT_PING_TIMEOUT 1
--- a/components/isc-dhcp/patches/003-CVE-2015-8605.patch	Fri Apr 01 15:20:17 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-This patch was derived from ISC source differences between dhcp-4.1-ESV-R12
-and dhcp-4.1-ESV-R12-P1.
-
---- old/./RELNOTES	Thu Jan  7 21:28:37 2016
-+++ new/./RELNOTES	Thu Jan  7 21:28:37 2016
-@@ -1,6 +1,6 @@
- 	      Internet Systems Consortium DHCP Distribution
--			    Version 4.1-ESV-R7
--			     10 September 2012
-+			    Version 4.1-ESV-R7-P1
-+                              01 January 2016
- 
- 			      Release Notes
- 
-@@ -52,6 +52,13 @@
- work on other platforms. Please report any problems and suggested fixes to
- <[email protected]>.
- 
-+			Changes since 4.1-ESV-R7-P1
-+
-+! Update the bounds checking when receiving a packet.
-+  Thanks to Sebastian Poehn from Sophos for the bug report and a suggested
-+  patch.
-+  [ISC-Bugs #41267]
-+
- 			Changes since 4.1-ESV-R6
- 
- - Existing legacy unit-tests have been migrated to Automated Test
---- old/common/packet.c	Thu Jan  7 21:28:37 2016
-+++ new/common/packet.c	Thu Jan  7 21:28:37 2016
-@@ -220,7 +220,28 @@
- 	}
- }
- 
--/* UDP header and IP header decoded together for convenience. */
-+/*!
-+ *
-+ * \brief UDP header and IP header decoded together for convenience.
-+ *
-+ * Attempt to decode the UDP and IP headers and, if necessary, checksum
-+ * the packet.
-+ *
-+ * \param inteface - the interface on which the packet was recevied
-+ * \param buf - a pointer to the buffer for the received packet
-+ * \param bufix - where to start processing the buffer, previous
-+ *                routines may have processed parts of the buffer already
-+ * \param from - space to return the address of the packet sender
-+ * \param buflen - remaining length of the buffer, this will have been
-+ *                 decremented by bufix by the caller
-+ * \param rbuflen - space to return the length of the payload from the udp
-+ *                  header
-+ * \param csum_ready - indication if the checksum is valid for use
-+ *                     non-zero indicates the checksum should be validated
-+ *
-+ * \return - the index to the first byte of the udp payload (that is the
-+ *           start of the DHCP packet
-+ */
- 
- ssize_t
- decode_udp_ip_header(struct interface_info *interface,
-@@ -231,7 +252,7 @@
-   unsigned char *data;
-   struct ip ip;
-   struct udphdr udp;
--  unsigned char *upp, *endbuf;
-+  unsigned char *upp;
-   u_int32_t ip_len, ulen, pkt_len;
-   u_int32_t sum, usum;
-   static int ip_packets_seen;
-@@ -242,11 +263,8 @@
-   static int udp_packets_length_overflow;
-   unsigned len;
- 
--  /* Designate the end of the input buffer for bounds checks. */
--  endbuf = buf + bufix + buflen;
--
-   /* Assure there is at least an IP header there. */
--  if ((buf + bufix + sizeof(ip)) > endbuf)
-+  if (sizeof(ip) > buflen)
- 	  return -1;
- 
-   /* Copy the IP header into a stack aligned structure for inspection.
-@@ -258,13 +276,17 @@
-   ip_len = (*upp & 0x0f) << 2;
-   upp += ip_len;
- 
--  /* Check the IP packet length. */
-+  /* Check packet lengths are within the buffer:
-+   * first the ip header (ip_len)
-+   * then the packet length from the ip header (pkt_len)
-+   * then the udp header (ip_len + sizeof(udp)
-+   * We are liberal in what we accept, the udp payload should fit within
-+   * pkt_len, but we only check against the full buffer size.
-+   */
-   pkt_len = ntohs(ip.ip_len);
--  if (pkt_len > buflen)
--	return -1;
--
--  /* Assure after ip_len bytes that there is enough room for a UDP header. */
--  if ((upp + sizeof(udp)) > endbuf)
-+  if ((ip_len > buflen) ||
-+      (pkt_len > buflen) ||
-+      ((ip_len + sizeof(udp)) > buflen))
- 	  return -1;
- 
-   /* Copy the UDP header into a stack aligned structure for inspection. */
-@@ -285,7 +307,8 @@
- 	return -1;
- 
-   udp_packets_length_checked++;
--  if ((upp + ulen) > endbuf) {
-+  /* verify that the payload length from the udp packet fits in the buffer */
-+  if ((ip_len + ulen) > buflen) {
- 	udp_packets_length_overflow++;
- 	if ((udp_packets_length_checked > 4) &&
- 	    ((udp_packets_length_checked /
---- old/./configure	Thu Jan  7 21:28:37 2016
-+++ new/./configure	Thu Jan  7 21:28:37 2016
-@@ -574,8 +574,8 @@
- # Identity of this package.
- PACKAGE_NAME='DHCP'
- PACKAGE_TARNAME='dhcp'
--PACKAGE_VERSION='4.1-ESV-R7'
--PACKAGE_STRING='DHCP 4.1-ESV-R7'
-+PACKAGE_VERSION='4.1-ESV-R7-P1'
-+PACKAGE_STRING='DHCP 4.1-ESV-R7-P1'
- PACKAGE_BUGREPORT='[email protected]'
- 
- # Factoring default headers for most tests.
-@@ -2125,7 +2125,7 @@
- 
- # Define the identity of the package.
-  PACKAGE='dhcp'
-- VERSION='4.1-ESV-R7'
-+ VERSION='4.1-ESV-R7-P1'
- 
- 
- cat >>confdefs.h <<_ACEOF
---- old/./configure.ac	Thu Jan  7 21:28:37 2016
-+++ new/./configure.ac	Thu Jan  7 21:28:37 2016
-@@ -1,4 +1,4 @@
--AC_INIT([DHCP], [4.1-ESV-R7], [[email protected]])
-+AC_INIT([DHCP], [4.1-ESV-R7-P1], [[email protected]])
- 
- # we specify "foreign" to avoid having to have the GNU mandated files,
- # like AUTHORS, COPYING, and such
--- a/components/isc-dhcp/patches/004-dhcp_broadcast_offer_bug.patch	Fri Apr 01 15:20:17 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-This patch file was developed in-house to fix a bug specific to solaris only.
-(Bug #17423148). We are working with upstream, but it is unclear at this point whether 
-they are going to accept it or not. This is a higly visible bug which many customers 
-have run into and it is very much desired that that this fix  makes it to S12.
-
---- old/includes/dhcpd.h	Tue Nov 10 16:43:33 2015
-+++ new/includes/dhcpd.h	Tue Nov 10 16:38:06 2015
-@@ -1150,6 +1150,9 @@
- 	int configured;			/* If set to 1, interface has at least
- 					 * one valid IP address.
- 					 */
-+#if defined (sun)
-+	int set_arp_socket;		/* IOCTL socket to set entry in cache */
-+#endif
- 	u_int32_t flags;		/* Control flags... */
- #define INTERFACE_REQUESTED 1
- #define INTERFACE_AUTOMATIC 2
-@@ -2173,6 +2176,10 @@
- 		       struct sockaddr_in6 *, struct hardware *);
- #endif
- 
-+#if defined (sun)
-+int setup_arp(struct interface_info *, struct in_addr, unsigned char *);
-+#endif
-+
- #ifdef USE_SOCKET_SEND
- void if_reinitialize_send (struct interface_info *);
- void if_register_send (struct interface_info *);
---- old/relay/dhcrelay.c	Thu Aug 23 12:23:54 2012
-+++ new/relay/dhcrelay.c	Tue Nov 10 16:36:52 2015
-@@ -630,6 +630,13 @@
- 			to.sin_addr = packet->yiaddr;
- 			to.sin_port = remote_port;
- 
-+#if defined (sun)
-+			if (setup_arp(out, packet->yiaddr, packet->chaddr)) {
-+				log_error("do_relay4 : Set arp entry failed");
-+				return;
-+			}
-+#endif	
-+
- 			/* and hardware address is not broadcast */
- 			htop = &hto;
- 		} else {
---- old/common/socket.c	Thu Aug 23 12:23:53 2012
-+++ new/common/socket.c	Tue Nov 10 16:33:30 2015
-@@ -46,6 +46,10 @@
- #include <sys/uio.h>
- #include <sys/uio.h>
- #include <signal.h>
-+#include <sys/types.h>
-+#if defined (sun)
-+#include <sys/ethernet.h>
-+#endif
- 
- #if defined(sun) && defined(USE_V4_PKTINFO)
- #include <sys/sysmacros.h>
-@@ -93,6 +97,33 @@
- static int once = 0;
- #endif /* !defined(SO_BINDTODEVICE) && !defined(USE_FALLBACK) */
- 
-+#if defined (sun)
-+int
-+setup_arp(struct interface_info *interface, struct in_addr ip_addr,
-+	unsigned char *macaddr)
-+{
-+        struct xarpreq ar;
-+        struct sockaddr_in *sin;
-+
-+	(void) memset(&ar, 0, sizeof (ar));
-+        sin = (struct sockaddr_in *)&ar.xarp_pa;
-+        sin->sin_family = AF_INET;
-+	sin->sin_addr.s_addr = ip_addr.s_addr;
-+
-+	ar.xarp_ha.sdl_alen = ETHERADDRL;
-+	(void) memcpy(LLADDR(&ar.xarp_ha), macaddr, ar.xarp_ha.sdl_alen); 
-+	ar.xarp_ha.sdl_family = AF_LINK; 
-+	if (ioctl(interface->set_arp_socket, SIOCSXARP, (caddr_t)&ar) < 0) {
-+		log_error("setup_arp: ioctl error for IP %s MAC %s",
-+		   inet_ntoa(ip_addr), ether_ntoa((const struct ether_addr *)
-+		    macaddr));
-+		return (1);
-+	}
-+        return (0);
-+}
-+#endif
-+
-+
- /* Reinitializes the specified interface after an address change.   This
-    is not required for packet-filter APIs. */
- 
-@@ -328,6 +359,9 @@
- #else
- 	info->wfdesc = info->rfdesc;
- #endif
-+#if defined(sun)
-+	info->set_arp_socket = socket(AF_INET, SOCK_DGRAM, 0);
-+#endif
- 	if (!quiet_interface_discovery)
- 		log_info ("Sending on   Socket/%s%s%s",
- 		      info->name,
-@@ -344,6 +378,9 @@
- 	close (info -> wfdesc);
- #endif
- 	info -> wfdesc = -1;
-+#if defined (sun)
-+	close (info -> set_arp_socket);
-+#endif
- 
- 	if (!quiet_interface_discovery)
- 		log_info ("Disabling output on Socket/%s%s%s",
-@@ -1006,7 +1043,11 @@
- int can_unicast_without_arp (ip)
- 	struct interface_info *ip;
- {
-+#if defined (sun)
-+	return 1;
-+#else
- 	return 0;
-+#endif
- }
- 
- int can_receive_unicast_unconfigured (ip)
---- old/server/bootp.c	Mon Aug 13 17:15:04 2012
-+++ new/server/bootp.c	Tue Nov 10 15:23:38 2015
-@@ -408,7 +408,12 @@
- 		   can_unicast_without_arp (packet -> interface)) {
- 		to.sin_addr = raw.yiaddr;
- 		to.sin_port = remote_port;
--
-+#if defined (__sun)
-+                if (setup_arp(packet->interface, raw.yiaddr, raw.chaddr)) {
-+                        log_error("bootp : Set arp entry failed");
-+                        goto out;
-+                }
-+#endif
- 	/* Otherwise, broadcast it on the local network. */
- 	} else {
- 		to.sin_addr = limited_broadcast;
---- old/server/dhcp.c	Tue Nov 10 16:43:33 2015
-+++ new/server/dhcp.c	Tue Nov 10 16:39:46 2015
-@@ -36,6 +36,8 @@
- #include <errno.h>
- #include <limits.h>
- #include <sys/time.h>
-+#include <sys/sockio.h>
-+#include <sys/ioccom.h>
- 
- static void commit_leases_ackout(void *foo);
- 
-@@ -3246,7 +3248,12 @@
- 		   can_unicast_without_arp (state -> ip)) {
- 		to.sin_addr = raw.yiaddr;
- 		to.sin_port = remote_port;
--
-+#if defined (sun)
-+		if (setup_arp(state->ip, raw.yiaddr, raw.chaddr)) {
-+			log_error("dhcp_reply : Set arp entry failed");
-+			goto err_out;
-+		}
-+#endif
- 	/* Otherwise, broadcast it on the local network. */
- 	} else {
- 		to.sin_addr = limited_broadcast;
-@@ -3268,7 +3275,9 @@
- 
- 	/* Free all of the entries in the option_state structure
- 	   now that we're done with them. */
--
-+#if defined (sun)
-+err_out:
-+#endif
- 	free_lease_state (state, MDL);
- 	lease -> state = (struct lease_state *)0;
- }