aboutsummaryrefslogtreecommitdiff
path: root/net/isc-dhcp31-server/files
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2004-05-15 15:49:17 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2004-05-15 15:49:17 +0000
commit6f316ce2e89f972a4f22e1b97e1dda5e9d58cefa (patch)
treefb8d61358190cc429db453d54fb9920ccfde716f /net/isc-dhcp31-server/files
parentea16706c62b542adc8f3b887256bf215bf914db6 (diff)
Diffstat (limited to 'net/isc-dhcp31-server/files')
-rw-r--r--net/isc-dhcp31-server/files/isc-dhcpd.sh.sample48
-rw-r--r--net/isc-dhcp31-server/files/isc-dhcrelay.sh.sample58
-rw-r--r--net/isc-dhcp31-server/files/omshell::Makefile.dist80
-rw-r--r--net/isc-dhcp31-server/files/patch-Makefile76
-rw-r--r--net/isc-dhcp31-server/files/patch-Makefile.dist243
-rw-r--r--net/isc-dhcp31-server/files/patch-client::clparse.c11
-rw-r--r--net/isc-dhcp31-server/files/patch-client::dhclient.883
-rw-r--r--net/isc-dhcp31-server/files/patch-client::dhclient.c545
-rw-r--r--net/isc-dhcp31-server/files/patch-client::dhclient.conf11
-rw-r--r--net/isc-dhcp31-server/files/patch-common::dhcp-options.532
-rw-r--r--net/isc-dhcp31-server/files/patch-common::discover.c238
-rw-r--r--net/isc-dhcp31-server/files/patch-common::dispatch.c29
-rw-r--r--net/isc-dhcp31-server/files/patch-common::parse.c22
-rw-r--r--net/isc-dhcp31-server/files/patch-configure41
-rw-r--r--net/isc-dhcp31-server/files/patch-dhcpctl::Makefile.dist79
-rw-r--r--net/isc-dhcp31-server/files/patch-dhcpd.conf12
-rw-r--r--net/isc-dhcp31-server/files/patch-dst::Makefile.dist29
-rw-r--r--net/isc-dhcp31-server/files/patch-freebsd75
-rw-r--r--net/isc-dhcp31-server/files/patch-includes::cf::freebsd.h62
-rw-r--r--net/isc-dhcp31-server/files/patch-includes::dhcpd.h56
-rw-r--r--net/isc-dhcp31-server/files/patch-site.conf42
21 files changed, 0 insertions, 1872 deletions
diff --git a/net/isc-dhcp31-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp31-server/files/isc-dhcpd.sh.sample
deleted file mode 100644
index 63bc57ba0f3d..000000000000
--- a/net/isc-dhcp31-server/files/isc-dhcpd.sh.sample
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: dhcpd
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-#
-# Add the following line to /etc/rc.conf to enable dhcpd:
-#
-# dhcpd_enable="YES"
-#
-
-# override these variables in /etc/rc.conf
-dhcpd_enable=NO
-dhcpd_flags= # command option(s)
-dhcpd_conf=%%PREFIX%%/etc/dhcpd.conf # configuration file
-dhcpd_ifaces= # ethernet interface(s)
-
-dhcpd_precmd ()
-{
- dhcpd_rcconf=%%PREFIX%%/etc/rc.isc-dhcpd.conf
-
- if [ -f ${dhcpd_rcconf} ]; then
- warn "${dhcpd_rcconf} is obsolete, use /etc/rc.conf instead."
- . ${dhcpd_rcconf}
-
- if [ -n "${dhcpd_options}" -a -z "${rc_flags}" ]; then
- warn "dhcpd_options is obsolete, use dhcpd_flags instead."
- rc_flags=${dhcpd_options}
- fi
- fi
-
- rc_flags="${rc_flags} -cf ${dhcpd_conf} ${dhcpd_ifaces}"
-}
-
-. %%RC_SUBR%%
-
-name=dhcpd
-rcvar=$(set_rcvar)
-
-command=%%PREFIX%%/sbin/${name}
-pidfile=/var/run/${name}.pid
-required_files=${dhcpd_conf}
-start_precmd=${name}_precmd
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/net/isc-dhcp31-server/files/isc-dhcrelay.sh.sample b/net/isc-dhcp31-server/files/isc-dhcrelay.sh.sample
deleted file mode 100644
index 4302d7360ff1..000000000000
--- a/net/isc-dhcp31-server/files/isc-dhcrelay.sh.sample
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: dhcrelay
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-#
-# Add the following line to /etc/rc.conf to enable dhcrelay:
-#
-# dhcrelay_enable="YES"
-#
-
-# override these variables in /etc/rc.conf
-dhcrelay_enable=NO
-dhcrelay_flags= # command option(s)
-dhcrelay_servers= # dhcrelay server(s)
-dhcrelay_ifaces= # ethernet interface(s)
-
-dhcrelay_precmd ()
-{
- local ifaces
-
- dhcrelay_rcconf=%%PREFIX%%/etc/rc.isc-dhcrelay.conf
-
- if [ -f ${dhcrelay_rcconf} ]; then
- warn "${dhcrelay_rcconf} is obsolete, use /etc/rc.conf instead."
- . ${dhcrelay_rcconf}
-
- if [ -n "${dhcrelay_options}" -a -z "${rc_flags}" ]; then
- warn "dhcrelay_options is obsolete, use dhcrelay_flags instead."
- rc_flags=${dhcrelay_options}
- fi
- fi
-
- if [ -z "${dhcrelay_servers}" ]; then
- err 1 "no dhcrelay server(s) configured."
- fi
-
- ifaces=
- for iface in ${dhcrelay_ifaces}; do
- ifaces="${ifaces} -i ${iface}"
- done
-
- rc_flags="${rc_flags} ${ifaces} ${dhcrelay_servers}"
-}
-
-. %%RC_SUBR%%
-
-name=dhcrelay
-rcvar=$(set_rcvar)
-
-command=%%PREFIX%%/sbin/${name}
-pidfile=/var/run/${name}.pid
-start_precmd=${name}_precmd
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/net/isc-dhcp31-server/files/omshell::Makefile.dist b/net/isc-dhcp31-server/files/omshell::Makefile.dist
deleted file mode 100644
index 34c90a2e7f53..000000000000
--- a/net/isc-dhcp31-server/files/omshell::Makefile.dist
+++ /dev/null
@@ -1,80 +0,0 @@
-# Makefile.dist
-#
-# Copyright (c) 1996-2002 Internet Software Consortium.
-# Use is subject to license terms which appear in the file named
-# ISC-LICENSE that should have accompanied this file when you
-# received it. If a file named ISC-LICENSE did not accompany this
-# file, or you are not sure the one you have is correct, you may
-# obtain an applicable copy of the license at:
-#
-# http://www.isc.org/isc-license-1.0.html.
-#
-# This file is part of the ISC DHCP distribution. The documentation
-# associated with this file is listed in the file DOCUMENTATION,
-# included in the top-level directory of this release.
-#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
-#
-
-CATMANPAGES = omshell.cat1
-SEDMANPAGES = omshell.man1
-SRCS = omshell.c
-OBJS = omshell.o
-PROG = omshell
-MAN = omshell.1
-
-INCLUDES = -I$(TOP)/dhcpctl $(BINDINC) -I$(TOP)/includes
-CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
-DHCPCTLLIBS = ../dhcpctl/libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
- ../omapip/libomapi.a ../dst/libdst.a
-
-all: $(PROG) $(CATMANPAGES)
-
-$(PROG): $(OBJS) $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPCTLLIBS) $(LIBS)
-
-install: all $(CATMANPAGES)
- for dir in $(USRMANDIR) $(USERBINDIR); do \
- foo=""; \
- for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
- foo=$${foo}/$$bar; \
- if [ ! -d $$foo ]; then \
- mkdir $$foo; \
- chmod 755 $$foo; \
- fi; \
- done; \
- done
- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
-
-depend:
- $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
-
-clean:
- -rm -f $(OBJS)
-
-realclean: clean
- -rm -f $(PROG) *~ $(CATMANPAGES) $(SEDMANPAGES) #*
-
-distclean: realclean
- -rm -f Makefile
-
-links:
- @for foo in $(SRCS) $(MAN); do \
- if [ ! -b $$foo ]; then \
- rm -f $$foo; \
- fi; \
- ln -s $(TOP)/omshell/$$foo $$foo; \
- done
-
-omshell.cat1: omshell.man1
- nroff -man omshell.man1 >omshell.cat1
-
-omshell.man1: omshell.1
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
-
-# Dependencies (semi-automatically-generated)
diff --git a/net/isc-dhcp31-server/files/patch-Makefile b/net/isc-dhcp31-server/files/patch-Makefile
deleted file mode 100644
index 7a8df08b137b..000000000000
--- a/net/isc-dhcp31-server/files/patch-Makefile
+++ /dev/null
@@ -1,76 +0,0 @@
---- Makefile.orig Fri Nov 8 00:10:07 2002
-+++ Makefile Mon Apr 28 15:04:50 2003
-@@ -38,59 +38,59 @@
- # ``http://www.nominum.com''.
- #
-
--all:
-+all all.devel all.server all.relay all.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make all); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--install:
-+install install.devel install.server install.relay install.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make install); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--depend:
-+depend depend.devel depend.server depend.relay depend.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make depend); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--clean:
-+clean clean.devel clean.server clean.relay clean.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make clean); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--realclean:
-+realclean realclean.devel realclean.server realclean.relay realclean.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make realclean); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--distclean:
-+distclean distclean.devel distclean.server distclean.relay distclean.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make distclean); \
-+ (cd work.$$sysname; make $@); \
- fi
-
--links:
-+links links.devel links.server links.relay links.client:
- @sysname=`./configure --print-sysname`; \
- if [ ! -d work.$$sysname ]; then \
- echo No build directory for $$sysname - please run ./configure.; \
- else \
-- (cd work.$$sysname; make links); \
-+ (cd work.$$sysname; make $@); \
- fi
-
diff --git a/net/isc-dhcp31-server/files/patch-Makefile.dist b/net/isc-dhcp31-server/files/patch-Makefile.dist
deleted file mode 100644
index 9edab8fa4571..000000000000
--- a/net/isc-dhcp31-server/files/patch-Makefile.dist
+++ /dev/null
@@ -1,243 +0,0 @@
---- Makefile.dist.orig Fri Nov 8 00:10:08 2002
-+++ Makefile.dist Tue Apr 29 00:07:43 2003
-@@ -3,13 +3,13 @@
- # Copyright (c) 1996-2002 Internet Software Consortium.
- # Use is subject to license terms which appear in the file named
- # ISC-LICENSE that should have accompanied this file when you
--# received it. If a file named ISC-LICENSE did not accompany this
-+# received it. If a file named ISC-LICENSE did not accompany this
- # file, or you are not sure the one you have is correct, you may
- # obtain an applicable copy of the license at:
- #
--# http://www.isc.org/isc-license-1.0.html.
-+# http://www.isc.org/isc-license-1.0.html.
- #
--# This file is part of the ISC DHCP distribution. The documentation
-+# This file is part of the ISC DHCP distribution. The documentation
- # associated with this file is listed in the file DOCUMENTATION,
- # included in the top-level directory of this release.
- #
-@@ -17,47 +17,200 @@
- # http://www.isc.org for more information.
- #
-
--SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
-+COMMON_SUBDIRS= common
-+DEVEL_SUBDIRS= $(MINIRES) dst omapip dhcpctl
-+SERVER_SUBDIRS= omshell server
-+RELAY_SUBDIRS= relay
-+CLIENT_SUBDIRS= client
-+
-+DEVEL_BUILD_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
-+SERVER_BUILD_SUBDIRS= ${SERVER_SUBDIRS}
-+RELAY_BUILD_SUBDIRS= ${RELAY_SUBDIRS}
-+CLIENT_BUILD_SUBDIRS= ${CLIENT_SUBDIRS}
-+
-+DEVEL_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
-+SERVER_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
-+RELAY_INSTALL_SUBDIRS= ${RELAY_SUBDIRS}
-+CLIENT_INSTALL_SUBDIRS= ${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
-
--all:
-- @for dir in ${SUBDIRS}; do \
-+all: all.server all.relay all.client
-+
-+all.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
-+ echo "Making all in $$dir"; \
-+ (cd $$dir; $(MAKE) all) || exit 1; \
-+ done
-+
-+all.server: all.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
-+ echo "Making all in $$dir"; \
-+ (cd $$dir; $(MAKE) all) || exit 1; \
-+ done
-+
-+all.relay: all.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
-+ echo "Making all in $$dir"; \
-+ (cd $$dir; $(MAKE) all) || exit 1; \
-+ done
-+
-+all.client: all.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
- echo "Making all in $$dir"; \
- (cd $$dir; $(MAKE) all) || exit 1; \
-- done
-+ done
-+
-+install: install.devel install.server install.relay install.client
-+
-+install.devel:
-+ @for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
-+ echo "Installing in $$dir"; \
-+ (cd $$dir; $(MAKE) install) || exit 1; \
-+ done
-
--install:
-- @for dir in ${SUBDIRS}; do \
-+install.server:
-+ @for dir in ${SERVER_INSTALL_SUBDIRS}; do \
- echo "Installing in $$dir"; \
- (cd $$dir; $(MAKE) install) || exit 1; \
-- done
-+ done
-
--depend:
-- @for dir in ${SUBDIRS}; do \
-+install.relay:
-+ @for dir in ${RELAY_INSTALL_SUBDIRS}; do \
-+ echo "Installing in $$dir"; \
-+ (cd $$dir; $(MAKE) install) || exit 1; \
-+ done
-+
-+install.client:
-+ @for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
-+ echo "Installing in $$dir"; \
-+ (cd $$dir; $(MAKE) install) || exit 1; \
-+ done
-+
-+depend: depend.server depend.relay depend.client
-+
-+depend.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
-+ echo "Making dependencies in $$dir"; \
-+ (cd $$dir; $(MAKE) depend) || exit 1; \
-+ done
-+
-+depend.server: depend.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
-+ echo "Making dependencies in $$dir"; \
-+ (cd $$dir; $(MAKE) depend) || exit 1; \
-+ done
-+
-+depend.relay: depend.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
- echo "Making dependencies in $$dir"; \
- (cd $$dir; $(MAKE) depend) || exit 1; \
-- done
-+ done
-+
-+depend.client: depend.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
-+ echo "Making dependencies in $$dir"; \
-+ (cd $$dir; $(MAKE) depend) || exit 1; \
-+ done
-+
-+clean: clean.server clean.relay clean.client
-+
-+clean.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
-+ echo "Cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) clean) || exit 1; \
-+ done
-+
-+clean.server: clean.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
-+ echo "Cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) clean) || exit 1; \
-+ done
-+
-+clean.relay: clean.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
-+ echo "Cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) clean) || exit 1; \
-+ done
-
--clean:
-- @for dir in ${SUBDIRS}; do \
-+clean.client: clean.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
- echo "Cleaning in $$dir"; \
- (cd $$dir; $(MAKE) clean) || exit 1; \
-- done
-+ done
-+
-+realclean: realclean.server realclean.relay realclean.client
-+
-+realclean.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
-+ echo "Really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) realclean) || exit 1; \
-+ done
-
--realclean:
-- @for dir in ${SUBDIRS}; do \
-+realclean.server: realclean.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
- echo "Really cleaning in $$dir"; \
- (cd $$dir; $(MAKE) realclean) || exit 1; \
-- done
-+ done
-
--distclean:
-- @for dir in ${SUBDIRS}; do \
-+realclean.relay: realclean.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
-+ echo "Really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) realclean) || exit 1; \
-+ done
-+
-+realclean.client: realclean.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
-+ echo "Really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) realclean) || exit 1; \
-+ done
-+
-+distclean: distclean.server distclean.relay distclean.client
-+
-+distclean.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
- echo "Really, really cleaning in $$dir"; \
- (cd $$dir; $(MAKE) distclean) || exit 1; \
-- done
-- @rm -f Makefile
-+ done
-+
-+distclean.server: distclean.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
-+ echo "Really, really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) distclean) || exit 1; \
-+ done
-+
-+distclean.relay: distclean.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
-+ echo "Really, really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) distclean) || exit 1; \
-+ done
-+
-+distclean.client: distclean.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
-+ echo "Really, really cleaning in $$dir"; \
-+ (cd $$dir; $(MAKE) distclean) || exit 1; \
-+ done
-+
-+links: links.server links.relay links.client
-+
-+links.devel:
-+ @for dir in ${DEVEL_BUILD_SUBDIRS}; do \
-+ echo "Making links in $$dir"; \
-+ (cd $$dir; $(MAKE) links) || exit 1; \
-+ done
-+
-+links.server: links.devel
-+ @for dir in ${SERVER_BUILD_SUBDIRS}; do \
-+ echo "Making links in $$dir"; \
-+ (cd $$dir; $(MAKE) links) || exit 1; \
-+ done
-+
-+links.relay: links.devel
-+ @for dir in ${RELAY_BUILD_SUBDIRS}; do \
-+ echo "Making links in $$dir"; \
-+ (cd $$dir; $(MAKE) links) || exit 1; \
-+ done
-
--links:
-- @for dir in ${SUBDIRS}; do \
-+links.client: links.devel
-+ @for dir in ${CLIENT_BUILD_SUBDIRS}; do \
- echo "Making links in $$dir"; \
- (cd $$dir; $(MAKE) links) || exit 1; \
-- done
-+ done
diff --git a/net/isc-dhcp31-server/files/patch-client::clparse.c b/net/isc-dhcp31-server/files/patch-client::clparse.c
deleted file mode 100644
index 4140cc6e3109..000000000000
--- a/net/isc-dhcp31-server/files/patch-client::clparse.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- client/clparse.c.orig Mon Feb 10 01:39:57 2003
-+++ client/clparse.c Wed Mar 3 01:35:39 2004
-@@ -785,7 +785,7 @@
- if (status != ISC_R_SUCCESS)
- log_fatal ("Can't record interface %s: %s",
- name, isc_result_totext (status));
-- strcpy (ip -> name, name);
-+ strlcpy (ip -> name, name, IFNAMSIZ);
- if (dummy_interfaces) {
- interface_reference (&ip -> next,
- dummy_interfaces, MDL);
diff --git a/net/isc-dhcp31-server/files/patch-client::dhclient.8 b/net/isc-dhcp31-server/files/patch-client::dhclient.8
deleted file mode 100644
index a602907c31b6..000000000000
--- a/net/isc-dhcp31-server/files/patch-client::dhclient.8
+++ /dev/null
@@ -1,83 +0,0 @@
---- client/dhclient.8.orig Sun Nov 17 03:25:43 2002
-+++ client/dhclient.8 Wed Mar 3 02:06:52 2004
-@@ -18,6 +18,10 @@
- .\"
- .\" $Id: dhclient.8,v 1.12.2.7 2002/11/17 02:25:43 dhankins Exp $
- .\"
-+.\" Portions copyright (c) 2000 David E. O'Brien.
-+.\" All rights reserved.
-+.\" $FreeBSD$
-+.\"
- .TH dhclient 8
- .SH NAME
- dhclient - Dynamic Host Configuration Protocol Client
-@@ -28,12 +32,18 @@
- .I port
- ]
- [
-+.B -D
-+]
-+[
- .B -d
- ]
- [
- .B -q
- ]
- [
-+.B -v
-+]
-+[
- .B -1
- ]
- [
-@@ -64,6 +74,10 @@
- relay
- ]
- [
-+.B -i
-+interval
-+]
-+[
- .B -n
- ]
- [
-@@ -148,6 +162,15 @@
- configuration file or on the command line, and will ignore all other
- interfaces.
- .PP
-+The
-+.B -D
-+flag causes
-+.B dhclient
-+to save the script it creates for use in conjunction with
-+.B dhclient-script
-+in
-+.IR /tmp.
-+.PP
- If the DHCP client should listen and transmit on a port other than the
- standard (port 68), the
- .B -p
-@@ -171,6 +194,12 @@
- flag, followed by the IP address to send. This is only useful for testing,
- and should not be expected to work in any consistent or useful way.
- .PP
-+On FreeBSD, dhclient can be enabled to automatically handle the
-+link status of the network card. Normally polling is done every
-+five seconds. The polling interval can be set using the
-+.B -i
-+flag, followed by the numbers of seconds. Minimum is one second.
-+.PP
- The DHCP client will normally run in the foreground until it has
- configured an interface, and then will revert to running in the
- background. To run force dhclient to always run as a foreground
-@@ -188,6 +217,10 @@
- .B -q
- flag prevents any messages other than errors from being printed to the
- standard error descriptor.
-+.B -v
-+flag turns on all messages.
-+Opposite of
-+.B -q .
- .PP
- The client normally doesn't release the current lease as it is not
- required by the DHCP protocol. Some cable ISPs require their clients
diff --git a/net/isc-dhcp31-server/files/patch-client::dhclient.c b/net/isc-dhcp31-server/files/patch-client::dhclient.c
deleted file mode 100644
index 27cef99162df..000000000000
--- a/net/isc-dhcp31-server/files/patch-client::dhclient.c
+++ /dev/null
@@ -1,545 +0,0 @@
---- client/dhclient.c.orig Sat Apr 26 23:51:39 2003
-+++ client/dhclient.c Wed Mar 3 16:21:02 2004
-@@ -47,6 +47,13 @@
- #include "dhcpd.h"
- #include "version.h"
-
-+#if __FreeBSD_version > 502010
-+#include <sys/ioctl.h>
-+#include <net/if_media.h>
-+#include <net80211/ieee80211_ioctl.h>
-+#include <net80211/ieee80211.h>
-+#endif
-+
- TIME cur_time;
- TIME default_lease_time = 43200; /* 12 hours... */
- TIME max_lease_time = 86400; /* 24 hours... */
-@@ -82,8 +89,11 @@
- struct string_list *client_env=NULL;
- int client_env_count=0;
- int onetry=0;
--int quiet=0;
-+int quiet=1;
- int nowait=0;
-+#ifdef ENABLE_POLLING_MODE
-+int polling_interval = 5;
-+#endif
-
- static void usage PROTO ((void));
-
-@@ -184,6 +194,9 @@
- } else if (!strcmp (argv [i], "-q")) {
- quiet = 1;
- quiet_interface_discovery = 1;
-+ } else if (!strcmp (argv [i], "-v")) {
-+ quiet = 0;
-+ quiet_interface_discovery = 0;
- } else if (!strcmp (argv [i], "-s")) {
- if (++i == argc)
- usage ();
-@@ -197,6 +210,19 @@
- } else if (!strcmp (argv [i], "-n")) {
- /* do not start up any interfaces */
- interfaces_requested = 1;
-+#ifdef ENABLE_POLLING_MODE
-+ } else if (!strcmp (argv [i], "-i")) {
-+ if (++i == argc)
-+ usage ();
-+ polling_interval = (int)strtol (argv [i],
-+ (char **)NULL, 10);
-+ if (polling_interval <= 0) {
-+ log_info ("Incorrect polling interval %d",
-+ polling_interval);
-+ log_info ("Using a default of 5 seconds");
-+ polling_interval = 5;
-+ }
-+#endif
- } else if (!strcmp (argv [i], "-w")) {
- /* do not exit if there are no broadcast interfaces. */
- persist = 1;
-@@ -225,7 +251,16 @@
- if (strlen (argv [i]) > sizeof tmp -> name)
- log_fatal ("%s: interface name too long (max %ld)",
- argv [i], (long)strlen (argv [i]));
-- strcpy (tmp -> name, argv [i]);
-+ strlcpy (tmp -> name, argv [i], IFNAMSIZ);
-+#if __FreeBSD_version > 502010
-+ set_ieee80211 (tmp);
-+#endif
-+ /* Init some interface vars, enable polling */
-+#ifdef ENABLE_POLLING_MODE
-+ tmp -> forcediscover = 0;
-+ tmp -> linkstate = HAVELINK;
-+ tmp -> polling = 1;
-+#endif /* ifdef ENABLE_POLLING_MODE */
- if (interfaces) {
- interface_reference (&tmp -> next,
- interfaces, MDL);
-@@ -385,6 +420,16 @@
- INTERFACE_AUTOMATIC)) !=
- INTERFACE_REQUESTED))
- continue;
-+#if __FreeBSD_version > 502010
-+ set_ieee80211 (ip);
-+#endif
-+#ifdef ENABLE_POLLING_MODE
-+ ip -> forcediscover = 0;
-+ if (ip -> client -> config -> media != NULL)
-+ ip -> havemedia = 1;
-+ else
-+ ip -> havemedia = 0;
-+#endif
- script_init (ip -> client,
- "PREINIT", (struct string_list *)0);
- if (ip -> client -> alias)
-@@ -427,8 +472,13 @@
- client -> state = S_INIT;
- /* Set up a timeout to start the initialization
- process. */
-+#ifdef ENABLE_POLLING_MODE
-+ add_timeout (cur_time + random () % 5 + 2,
-+ state_polling, client, 0, 0);
-+#else
- add_timeout (cur_time + random () % 5,
- state_reboot, client, 0, 0);
-+#endif
- }
- }
- }
-@@ -486,9 +536,9 @@
- log_info (arr);
- log_info (url);
-
-- log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
-- "[-s server]");
-- log_error (" [-cf config-file] [-lf lease-file]%s",
-+ log_error ("Usage: dhclient [-1Ddqrv] [-i polling-interval] %s",
-+ "[-nw] [-p <port>] [-s server]");
-+ log_error (" [-cf config-file] [-lf lease-file] %s",
- "[-pf pid-file] [-e VAR=val]");
- log_fatal (" [-sf script-file] [interface]");
- }
-@@ -876,6 +926,15 @@
- /* Write out the new lease. */
- write_client_lease (client, client -> new, 0, 0);
-
-+ /*
-+ * It's now possible that state_reboot can be called
-+ * after a interface link went down and is up again.
-+ * To prevent tons of equal leases saved on disk, we rewrite
-+ * them.
-+ */
-+ read_client_leases ();
-+ rewrite_client_leases ();
-+
- /* Replace the old active lease with the new one. */
- if (client -> active)
- destroy_client_lease (client -> active);
-@@ -890,6 +949,12 @@
- piaddr (client -> active -> address),
- (long)(client -> active -> renewal - cur_time));
- client -> state = S_BOUND;
-+#ifdef ENABLE_POLLING_MODE
-+ /* Init some interface vars, enable polling */
-+ client -> interface -> linkstate = HAVELINK;
-+ client -> interface -> forcediscover = 0;
-+ client -> interface -> polling = 1;
-+#endif /* ifdef ENABLE_POLLING_MODE */
- reinitialize_interfaces ();
- go_daemon ();
- if (client -> config -> do_forward_update) {
-@@ -1352,6 +1417,11 @@
- int interval;
- int increase = 1;
-
-+#ifdef ENABLE_POLLING_MODE
-+ /* Disable polling for this interface */
-+ client -> interface -> polling = 0;
-+#endif
-+
- /* Figure out how long it's been since we started transmitting. */
- interval = cur_time - client -> first_sending;
-
-@@ -1457,6 +1527,9 @@
- struct client_lease *loop;
- struct client_lease *lp;
-
-+ if (client -> interface -> linkstate == NOLINK)
-+ return;
-+
- loop = lp = client -> active;
-
- log_info ("No DHCPOFFERS received.");
-@@ -1489,6 +1562,10 @@
- log_info ("bound: renewal in %ld %s.",
- (long)(client -> active -> renewal -
- cur_time), "seconds");
-+#ifdef ENABLE_POLLING_MODE
-+ /* Enable polling for this interface */
-+ client -> interface -> polling = 1;
-+#endif
- add_timeout (client -> active -> renewal,
- state_bound, client, 0, 0);
- } else {
-@@ -1496,6 +1573,11 @@
- log_info ("bound: immediate renewal.");
- state_bound (client);
- }
-+ /*
-+ * Set the link status back to nolink, even
-+ * if we have media settings.
-+ */
-+ client -> interface -> linkstate = NOLINK;
- reinitialize_interfaces ();
- go_daemon ();
- return;
-@@ -1541,6 +1623,12 @@
- }
-
- log_info ("No working leases in persistent database - sleeping.");
-+
-+#ifdef ENABLE_POLLING_MODE
-+ /* Enable polling for this interface */
-+ client -> interface -> polling = 1;
-+#endif
-+
- script_init (client, "FAIL", (struct string_list *)0);
- if (client -> alias)
- script_write_params (client, "alias_", client -> alias);
-@@ -1681,6 +1769,18 @@
- client -> packet.secs = htons (65535);
- }
-
-+ /*
-+ * Only try the first ten seconds to renew a lease from a
-+ * given dhcp-server adress. After that, fall back to use
-+ * state_reboot with INADDR_BROADCAST.
-+ */
-+ if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
-+ (client -> state == S_RENEWING || client -> state == S_REBINDING)) {
-+ if (client -> active && client -> active -> expiry > cur_time &&
-+ interval >= 10)
-+ goto cancel;
-+ }
-+
- log_info ("DHCPREQUEST on %s to %s port %d",
- client -> name ? client -> name : client -> interface -> name,
- inet_ntoa (destination.sin_addr),
-@@ -1702,6 +1802,16 @@
- from, &destination,
- (struct hardware *)0);
-
-+ /*
-+ * If sendto() for a direct request fails, fall back to use
-+ * state_reboot with INADDR_BROADCAST.
-+ */
-+ if (result == -1 && destination.sin_addr.s_addr != INADDR_BROADCAST &&
-+ (client -> state == S_RENEWING || client -> state == S_REBINDING)) {
-+ if (client -> active && client -> active -> expiry > cur_time)
-+ goto cancel;
-+ }
-+
- add_timeout (cur_time + client -> interval,
- send_request, client, 0, 0);
- }
-@@ -2597,6 +2707,13 @@
- wstatus = 0;
- }
- } else {
-+ if ((i = open(_PATH_DEVNULL, O_RDWR)) != -1) {
-+ dup2(i, STDIN_FILENO);
-+ dup2(i, STDOUT_FILENO);
-+ dup2(i, STDERR_FILENO);
-+ if (i > STDERR_FILENO)
-+ close(i);
-+ }
- execve (scriptName, argv, envp);
- log_error ("execve (%s, ...): %m", scriptName);
- exit (0);
-@@ -2783,8 +2900,10 @@
- case S_STOPPED:
- break;
- }
-+#ifndef ENABLE_POLLING_MODE
- client -> state = S_INIT;
- state_reboot (client);
-+#endif
- }
- }
- }
-@@ -3010,7 +3129,9 @@
- break;
-
- case server_awaken:
-+#ifndef ENABLE_POLLING_MODE
- state_reboot (client);
-+#endif
- break;
- }
- }
-@@ -3147,3 +3268,265 @@
- data_string_forget (&ddns_dhcid, MDL);
- return rcode;
- }
-+
-+/* Check to see if there's a wire plugged in */
-+int
-+interface_active(struct interface_info *ip) {
-+#if __FreeBSD_version > 502010
-+ struct ifmediareq ifmr;
-+ int *media_list, i;
-+ char *ifname;
-+ int sock;
-+
-+ ifname = ip -> name;
-+
-+ if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
-+ log_fatal ("Can't create interface_active socket");
-+
-+ (void) memset (&ifmr, 0, sizeof (ifmr));
-+ (void) strncpy (ifmr.ifm_name, ifname, sizeof (ifmr.ifm_name));
-+
-+ if (ioctl (sock, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
-+ /*
-+ * Interface doesn't support SIOCGIFMEDIA, presume okay
-+ */
-+ close (sock);
-+ return (HAVELINK);
-+ }
-+ close (sock);
-+
-+ if (ifmr.ifm_count == 0) {
-+ /*
-+ * Assume that this means interface
-+ * does not support SIOCGIFMEDIA
-+ */
-+ log_fatal ("%s: no media types?", ifname);
-+ return (HAVELINK);
-+ }
-+
-+ if (ifmr.ifm_status & IFM_AVALID) {
-+ if (ip -> ieee80211) {
-+ /*
-+ * Wavelan devices need to be checked if they are
-+ * associated.
-+ */
-+ if ((IFM_TYPE(ifmr.ifm_active) == IFM_IEEE80211) &&
-+ (ifmr.ifm_status & IFM_ACTIVE)) {
-+ return (HAVELINK);
-+ }
-+ } else {
-+ if (ifmr.ifm_status & IFM_ACTIVE) {
-+ return (HAVELINK);
-+ }
-+ }
-+ /*
-+ * We really have no link.
-+ */
-+ return (NOLINK);
-+ }
-+ /*
-+ * IFM_AVALID is not set. We cannot check
-+ * the link state. Assume HAVELINK.
-+ */
-+
-+#endif /* Other OSs */
-+ /*
-+ * Always return a successful link if the OS
-+ * is not supported.
-+ */
-+ return (HAVELINK);
-+}
-+
-+#if __FreeBSD_version > 502010
-+void
-+set_ieee80211 (struct interface_info *ip) {
-+
-+ struct ieee80211req ireq;
-+ u_int8_t data[32];
-+ int associated = 0;
-+ int *media_list, i;
-+ char *ifname;
-+ int sock;
-+
-+ ifname = ip -> name;
-+
-+ if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
-+ log_fatal ("Can't create interface_active socket");
-+
-+ (void) memset (&ireq, 0, sizeof (ireq));
-+ (void) strncpy (ireq.i_name, ifname, sizeof (ireq.i_name));
-+ ireq.i_data = &data;
-+ ireq.i_type = IEEE80211_IOC_SSID;
-+ ireq.i_val = -1;
-+ /*
-+ * If we can't get the SSID,
-+ * this isn't an 802.11 device.
-+ */
-+ if (ioctl (sock, SIOCG80211, &ireq) < 0)
-+ ip -> ieee80211 = 0;
-+ else {
-+#ifdef DEBUG
-+ printf ("Device %s has 802.11\n", ifname);
-+#endif
-+ ip -> ieee80211 = 1;
-+ }
-+ close (sock);
-+ }
-+#endif /* __FreeBSD_version */
-+
-+#ifdef ENABLE_POLLING_MODE
-+/* Go to background after some time */
-+void state_background (cpp)
-+ void *cpp;
-+{
-+ go_daemon ();
-+}
-+
-+/* Check the state of the NICs if we have link */
-+void state_polling (cpp)
-+ void *cpp;
-+{
-+ static int doinitcheck = 0;
-+ struct interface_info *ip;
-+ struct client_state *client;
-+ int result;
-+
-+ for (ip = interfaces; ip; ip = ip -> next) {
-+ if (! ip -> polling)
-+ continue;
-+#ifdef DEBUG
-+ printf ("%s: Polling interface state\n", ip -> name);
-+ for (client = ip -> client;
-+ client; client = client -> next) {
-+ printf ("%s: client state of %d\n", ip -> name, ip -> client -> state);
-+ printf ("%s: link = %d\n", ip -> name, ip -> linkstate);
-+ }
-+#endif
-+
-+ result = interface_active (ip);
-+ /*
-+ * If dhclient.conf contains media settings, we cannot
-+ * abort if the interface is not set to active mode.
-+ */
-+ if (ip -> havemedia && ip -> client -> state != S_BOUND) {
-+ if (result == HAVELINK)
-+ ip -> forcediscover = 1;
-+ result = HAVELINK;
-+ }
-+
-+ /*
-+ * The last status of the interface tells us
-+ * the we've got no link ...
-+ */
-+ if (ip -> linkstate == NOLINK || ! doinitcheck) {
-+ /*
-+ * ... but we have now link. Let's send
-+ * requests.
-+ */
-+ if (result == HAVELINK) {
-+#ifdef DEBUG
-+ if (ip -> havemedia)
-+ printf ("%s: Trying media settings on interface\n",
-+ ip -> name);
-+ else
-+ printf ("%s: Found Link on interface\n", ip -> name);
-+#endif
-+ /*
-+ * Set the interface to state_bound. We assume that we have
-+ * a working link. If we cannot reach the server directly,
-+ * INADDR_BROADCAST is used.
-+ */
-+ for (client = ip -> client;
-+ client; client = client -> next) {
-+ cancel_timeout (state_init, client);
-+ cancel_timeout (state_reboot, client);
-+ cancel_timeout (state_selecting, client);
-+ if (client -> active) {
-+ add_timeout (cur_time + random () % 5,
-+ state_bound, client, 0, 0);
-+ } else {
-+ add_timeout (cur_time + random () % 5,
-+ state_reboot, client, 0, 0);
-+ }
-+ }
-+ ip -> linkstate = HAVELINK;
-+ } else {
-+#ifdef DEBUG
-+ printf ("%s: No link on interface\n", ip -> name);
-+#endif
-+ for (client = ip -> client;
-+ client; client = client -> next) {
-+ /*
-+ * Without this add_timout(), dhclient does
-+ * not poll on a interface if there
-+ * is no cable plugged in at startup
-+ * time. Because we add one additional second
-+ * to the time of a normal timeout, we always
-+ * skip and block a running one. This prevents
-+ * that polling is done twice at the same time.
-+ */
-+ if (client -> state == S_INIT) {
-+ add_timeout (cur_time + (polling_interval + 1),
-+ state_polling, client, 0, 0);
-+ }
-+ }
-+ ip -> linkstate = NOLINK;
-+ /*
-+ * Automatically go into the background after
-+ * some time. Do this only if there are no
-+ * media options available for a interface.
-+ */
-+ if (! ip -> havemedia && ! doinitcheck) {
-+ add_timeout (cur_time + (polling_interval * 2),
-+ state_background, client, 0, 0);
-+ }
-+ }
-+ }
-+
-+ /*
-+ * The last status of the interface tells us
-+ * the we previously had link.
-+ */
-+ if (ip -> linkstate == HAVELINK && doinitcheck) {
-+ if (result == NOLINK) {
-+ /*
-+ * We lost link on the interface, or it isn't
-+ * associated anymore.
-+ */
-+#ifdef DEBUG
-+ printf ("%s: Lost Link on interface\n", ip -> name);
-+#endif
-+ /*
-+ * After we lost link, cycle again through the
-+ * different media settings if available. Else
-+ * set NOLINK.
-+ */
-+ if (ip -> havemedia)
-+ ip -> forcediscover = 1;
-+ else
-+ ip -> linkstate = NOLINK;
-+ }
-+ /*
-+ * If we happen to have a real link, but no
-+ * active lease, force the interface into
-+ * state_reboot. Do the same if media settings
-+ * are available.
-+ */
-+ if (ip -> forcediscover) {
-+ for (client = ip -> client;
-+ client; client = client -> next) {
-+ if (client -> state != S_REBOOTING &&
-+ client -> state != S_SELECTING) {
-+ add_timeout (cur_time + random () % 5,
-+ state_reboot, client, 0, 0);
-+ }
-+ }
-+ ip -> forcediscover = 0;
-+ ip -> linkstate = HAVELINK;
-+ }
-+ /* We still have link, do nothing. */
-+ }
-+ }
-+ doinitcheck = 1;
-+}
-+#endif /* ifdef ENABLE_POLLING_MODE */
diff --git a/net/isc-dhcp31-server/files/patch-client::dhclient.conf b/net/isc-dhcp31-server/files/patch-client::dhclient.conf
deleted file mode 100644
index 2d9560f43bf8..000000000000
--- a/net/isc-dhcp31-server/files/patch-client::dhclient.conf
+++ /dev/null
@@ -1,11 +0,0 @@
---- client/dhclient.conf.orig Tue Jun 3 00:50:44 1997
-+++ client/dhclient.conf Wed Mar 3 02:20:41 2004
-@@ -11,7 +11,7 @@
- reboot 10;
- select-timeout 5;
- initial-interval 2;
--script "/etc/dhclient-script";
-+script "%%PREFIX%%/sbin/dhclient-script";
- media "-link0 -link1 -link2", "link0 link1";
- reject 192.33.137.209;
-
diff --git a/net/isc-dhcp31-server/files/patch-common::dhcp-options.5 b/net/isc-dhcp31-server/files/patch-common::dhcp-options.5
deleted file mode 100644
index 9d936cfffeee..000000000000
--- a/net/isc-dhcp31-server/files/patch-common::dhcp-options.5
+++ /dev/null
@@ -1,32 +0,0 @@
---- common/dhcp-options.5.orig Sun Feb 23 04:27:42 2003
-+++ common/dhcp-options.5 Wed Mar 3 02:12:13 2004
-@@ -431,7 +431,10 @@
- the domain-name option to specify the domain name). See RFC 1035 for
- character set restrictions. This option is only honored by
- .B dhclient-script(8)
--if the hostname for the client machine is not set.
-+if the hostname for the client machine is not set (i.e., set to the empty
-+string in
-+.B rc.conf(5)
-+).
- .RE
- .PP
- .B option \fBieee802-3-encapsulation\fR \fIflag\fR\fB;\fR
-@@ -654,7 +657,7 @@
- This option specifies whether the client should configure its IP
- layer to allow forwarding of datagrams with non-local source routes
- (see Section 3.3.5 of [4] for a discussion of this topic). A value
--of false means disallow forwarding of such datagrams, and a value of true
-+of 0 means disallow forwarding of such datagrams, and a value of true
- means allow forwarding.
- .RE
- .PP
-@@ -948,7 +951,7 @@
- .PP
- This option specifies whether or not the client should negotiate the
- use of trailers (RFC 893 [14]) when using the ARP protocol. A value
--of false indicates that the client should not attempt to use trailers. A
-+of 0 indicates that the client should not attempt to use trailers. A
- value of true means that the client should attempt to use trailers.
- .RE
- .PP
diff --git a/net/isc-dhcp31-server/files/patch-common::discover.c b/net/isc-dhcp31-server/files/patch-common::discover.c
deleted file mode 100644
index 1cfcc2094098..000000000000
--- a/net/isc-dhcp31-server/files/patch-common::discover.c
+++ /dev/null
@@ -1,238 +0,0 @@
---- common/discover.c.orig Fri Jul 25 21:44:15 2003
-+++ common/discover.c Fri Mar 5 23:33:04 2004
-@@ -47,6 +47,7 @@
- #endif /* not lint */
-
- #include "dhcpd.h"
-+#include <ifaddrs.h>
- #include <sys/ioctl.h>
-
- struct interface_info *interfaces, *dummy_interfaces, *fallback_interface;
-@@ -135,10 +136,7 @@
- {
- struct interface_info *tmp, *ip;
- struct interface_info *last, *next;
-- char buf [2048];
-- struct ifconf ic;
-- struct ifreq ifr;
-- int i;
-+ struct ifaddrs *ifap, *ifa;
- int sock;
- int address_count = 0;
- struct subnet *subnet;
-@@ -157,61 +155,6 @@
- if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
- log_fatal ("Can't create addrlist socket");
-
-- /* Get the interface configuration information... */
--
--#ifdef SIOCGIFCONF_ZERO_PROBE
-- /* linux will only tell us how long a buffer it wants if we give it
-- * a null buffer first. So, do a dry run to figure out the length.
-- *
-- * XXX this code is duplicated from below because trying to fold
-- * the logic into the if statement and goto resulted in excesssive
-- * obfuscation. The intent is that unless you run Linux you shouldn't
-- * have to deal with this. */
--
-- ic.ifc_len = 0;
-- ic.ifc_ifcu.ifcu_buf = (caddr_t)NULL;
--#else
-- /* otherwise, we just feed it a starting size, and it'll tell us if
-- * it needs more */
--
-- ic.ifc_len = sizeof buf;
-- ic.ifc_ifcu.ifcu_buf = (caddr_t)buf;
--#endif
--
-- gifconf_again:
-- i = ioctl(sock, SIOCGIFCONF, &ic);
--
-- if (i < 0)
-- log_fatal ("ioctl: SIOCGIFCONF: %m");
--
--#ifdef SIOCGIFCONF_ZERO_PROBE
-- /* Workaround for SIOCGIFCONF bug on some Linux versions. */
-- if (ic.ifc_ifcu.ifcu_buf == 0 && ic.ifc_len == 0) {
-- ic.ifc_len = sizeof buf;
-- ic.ifc_ifcu.ifcu_buf = (caddr_t)buf;
-- goto gifconf_again;
-- }
--#endif
--
-- /* If the SIOCGIFCONF resulted in more data than would fit in
-- a buffer, allocate a bigger buffer. */
-- if ((ic.ifc_ifcu.ifcu_buf == buf
--#ifdef SIOCGIFCONF_ZERO_PROBE
-- || ic.ifc_ifcu.ifcu_buf == 0
--#endif
-- ) && ic.ifc_len > sizeof buf) {
-- ic.ifc_ifcu.ifcu_buf = dmalloc ((size_t)ic.ifc_len, MDL);
-- if (!ic.ifc_ifcu.ifcu_buf)
-- log_fatal ("Can't allocate SIOCGIFCONF buffer.");
-- goto gifconf_again;
--#ifdef SIOCGIFCONF_ZERO_PROBE
-- } else if (ic.ifc_ifcu.ifcu_buf == 0) {
-- ic.ifc_ifcu.ifcu_buf = (caddr_t)buf;
-- ic.ifc_len = sizeof buf;
-- goto gifconf_again;
--#endif
-- }
--
-
- /* If we already have a list of interfaces, and we're running as
- a DHCP server, the interfaces were requested. */
-@@ -224,51 +167,38 @@
- else
- ir = INTERFACE_REQUESTED;
-
-+ if (getifaddrs(&ifap) != 0)
-+ log_fatal ("getifaddrs failed");
-+
- /* Cycle through the list of interfaces looking for IP addresses. */
-- for (i = 0; i < ic.ifc_len;) {
-- struct ifreq *ifp = (struct ifreq *)((caddr_t)ic.ifc_req + i);
--#ifdef HAVE_SA_LEN
-- if (ifp -> ifr_addr.sa_len > sizeof (struct sockaddr))
-- i += (sizeof ifp -> ifr_name) + ifp -> ifr_addr.sa_len;
-- else
--#endif
-- i += sizeof *ifp;
-+ for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
-
- #ifdef ALIAS_NAMES_PERMUTED
-- if ((s = strrchr (ifp -> ifr_name, ':'))) {
-+ if ((s = strrchr (ifa -> ifa_name, ':'))) {
- *s = 0;
- }
- #endif
-
- #ifdef SKIP_DUMMY_INTERFACES
-- if (!strncmp (ifp -> ifr_name, "dummy", 5))
-+ if (!strncmp (ifa -> ifa_name, "dummy", 5))
- continue;
- #endif
-
--
-- /* See if this is the sort of interface we want to
-- deal with. */
-- strcpy (ifr.ifr_name, ifp -> ifr_name);
-- if (ioctl (sock, SIOCGIFFLAGS, &ifr) < 0)
-- log_fatal ("Can't get interface flags for %s: %m",
-- ifr.ifr_name);
--
- /* See if we've seen an interface that matches this one. */
- for (tmp = interfaces; tmp; tmp = tmp -> next)
-- if (!strcmp (tmp -> name, ifp -> ifr_name))
-+ if (!strcmp (tmp -> name, ifa -> ifa_name))
- break;
-
-- /* Skip non broadcast interfaces (plus loopback and
-- point-to-point in case an OS incorrectly marks them
-- as broadcast). Also skip down interfaces unless we're
-+ /* See if this is the sort of interface we want to
-+ deal with. Skip loopback, point-to-point and down
-+ interfaces, except don't skip down interfaces if we're
- trying to get a list of configurable interfaces. */
-- if (((!(ifr.ifr_flags & IFF_BROADCAST) ||
-- ifr.ifr_flags & IFF_LOOPBACK ||
-- ifr.ifr_flags & IFF_POINTOPOINT) && !tmp) ||
-- (!(ifr.ifr_flags & IFF_UP) &&
-+ if ((ifa->ifa_flags & IFF_LOOPBACK) ||
-+ (ifa->ifa_flags & IFF_POINTOPOINT) ||
-+ (!(ifa->ifa_flags & IFF_UP) &&
- state != DISCOVER_UNCONFIGURED))
- continue;
--
-+
- /* If there isn't already an interface by this name,
- allocate one. */
- if (!tmp) {
-@@ -276,9 +206,9 @@
- status = interface_allocate (&tmp, MDL);
- if (status != ISC_R_SUCCESS)
- log_fatal ("Error allocating interface %s: %s",
-- ifp -> ifr_name,
-+ ifa -> ifa_name,
- isc_result_totext (status));
-- strcpy (tmp -> name, ifp -> ifr_name);
-+ strcpy (tmp -> name, ifa -> ifa_name);
- interface_snorf (tmp, ir);
- interface_dereference (&tmp, MDL);
- tmp = interfaces; /* XXX */
-@@ -290,9 +220,9 @@
- /* If we have the capability, extract link information
- and record it in a linked list. */
- #ifdef HAVE_AF_LINK
-- if (ifp -> ifr_addr.sa_family == AF_LINK) {
-+ if (ifa -> ifa_addr->sa_family == AF_LINK) {
- struct sockaddr_dl *foo = ((struct sockaddr_dl *)
-- (&ifp -> ifr_addr));
-+ (ifa -> ifa_addr));
- #if defined (HAVE_SIN_LEN)
- tmp -> hw_address.hlen = foo -> sdl_alen;
- #else
-@@ -305,12 +235,11 @@
- } else
- #endif /* AF_LINK */
-
-- if (ifp -> ifr_addr.sa_family == AF_INET) {
-+ if (ifa -> ifa_addr->sa_family == AF_INET) {
- struct iaddr addr;
-
- /* Get a pointer to the address... */
-- memcpy (&foo, &ifp -> ifr_addr,
-- sizeof ifp -> ifr_addr);
-+ bcopy(ifa->ifa_addr, &foo, sizeof(foo));
-
- /* We don't want the loopback interface. */
- if (foo.sin_addr.s_addr == htonl (INADDR_LOOPBACK) &&
-@@ -323,16 +252,15 @@
- found, keep a pointer to ifreq structure in
- which we found it. */
- if (!tmp -> ifp) {
--#ifdef HAVE_SA_LEN
-- unsigned len = ((sizeof ifp -> ifr_name) +
-- ifp -> ifr_addr.sa_len);
--#else
-- unsigned len = sizeof *ifp;
--#endif
-+
-+ int len = (IFNAMSIZ +
-+ ifa -> ifa_addr->sa_len);
- tif = (struct ifreq *)dmalloc (len, MDL);
- if (!tif)
- log_fatal ("no space for ifp.");
-- memcpy (tif, ifp, len);
-+ strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ);
-+ memcpy(&tif->ifr_addr, ifa->ifa_addr,
-+ ifa->ifa_addr->sa_len);
- tmp -> ifp = tif;
- tmp -> primary_address = foo.sin_addr;
- }
-@@ -346,9 +274,6 @@
- }
- }
-
-- /* If we allocated a buffer, free it. */
-- if (ic.ifc_ifcu.ifcu_buf != buf)
-- dfree (ic.ifc_ifcu.ifcu_buf, MDL);
-
- #if defined (LINUX_SLASHPROC_DISCOVERY)
- /* On Linux, interfaces that don't have IP addresses don't
-@@ -529,6 +454,7 @@
- be able to configure, we can quit now. */
- if (state == DISCOVER_UNCONFIGURED) {
- close (sock);
-+ freeifaddrs(ifap);
- return;
- }
-
-@@ -674,6 +600,7 @@
- }
-
- close (sock);
-+ freeifaddrs(ifap);
-
- if (state == DISCOVER_SERVER && wifcount == 0) {
- log_info ("%s", "");
diff --git a/net/isc-dhcp31-server/files/patch-common::dispatch.c b/net/isc-dhcp31-server/files/patch-common::dispatch.c
deleted file mode 100644
index 0aa709cf0860..000000000000
--- a/net/isc-dhcp31-server/files/patch-common::dispatch.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- common/dispatch.c.orig Sun Nov 17 03:26:57 2002
-+++ common/dispatch.c Wed Mar 3 16:20:15 2004
-@@ -95,11 +95,26 @@
- void dispatch ()
- {
- struct timeval tv, *tvp;
-+#ifdef ENABLE_POLLING_MODE
-+ struct timeval *tvp_new;
-+#endif
- isc_result_t status;
-+ TIME cur_time;
-
-+ tvp = NULL;
-+#ifdef ENABLE_POLLING_MODE
-+ tvp_new = NULL;
-+#endif
- /* Wait for a packet or a timeout... XXX */
- do {
- tvp = process_outstanding_timeouts (&tv);
-+#ifdef ENABLE_POLLING_MODE
-+ GET_TIME (&cur_time);
-+ add_timeout(cur_time + polling_interval, state_polling, 0, 0, 0);
-+ tvp_new = process_outstanding_timeouts(&tv);
-+ if (tvp != NULL && (tvp -> tv_sec > tvp_new -> tv_sec))
-+ tvp = tvp_new;
-+#endif /* ENABLE_POLLING_MODE */
- status = omapi_one_dispatch (0, tvp);
- } while (status == ISC_R_TIMEDOUT || status == ISC_R_SUCCESS);
- log_fatal ("omapi_one_dispatch failed: %s -- exiting.",
diff --git a/net/isc-dhcp31-server/files/patch-common::parse.c b/net/isc-dhcp31-server/files/patch-common::parse.c
deleted file mode 100644
index 637d69e7f41b..000000000000
--- a/net/isc-dhcp31-server/files/patch-common::parse.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- common/parse.c.orig 2 Sep 2003 11:01:23 -0000
-+++ common/parse.c 22 Feb 2004 10:44:52 -0000
-@@ -414,6 +414,7 @@
- {
- const char *val;
- enum dhcp_token token;
-+ int32_t num;
-
- token = next_token (&val, (unsigned *)0, cfile);
- if (token != NUMBER) {
-@@ -421,9 +422,9 @@
- skip_to_semi (cfile);
- return;
- }
-- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
-+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
- /* Unswap the number - convert_num returns stuff in NBO. */
-- *timep = ntohl (*timep); /* XXX */
-+ *timep = ntohl (num);
-
- parse_semi (cfile);
- }
diff --git a/net/isc-dhcp31-server/files/patch-configure b/net/isc-dhcp31-server/files/patch-configure
deleted file mode 100644
index 5aff6909acce..000000000000
--- a/net/isc-dhcp31-server/files/patch-configure
+++ /dev/null
@@ -1,41 +0,0 @@
---- configure.orig Sat Apr 20 23:44:13 2002
-+++ configure Mon Apr 28 23:02:10 2003
-@@ -13,6 +13,9 @@
- elif [ x$1 = x--dirs ]; then
- dirs=$2
- shift
-+ elif [ x$1 = x--subsys ]; then
-+ subsys=$2
-+ shift
- elif [ x$1 = x--no-links ]; then
- nolinks=YES
- elif [ x$1 = x--copts ]; then
-@@ -233,7 +236,14 @@
- fi
-
- if [ x"$dirs" = x ]; then
-- dirs=". client server relay common omapip dhcpctl minires dst"
-+ dirs=". common minires dst omapip dhcpctl"
-+ if [ x$subsys = x ]; then
-+ dirs="$dirs server omshell client relay"
-+ elif [ x$subsys = xserver ]; then
-+ dirs="$dirs server omshell"
-+ elif [ x$subsys = xclient -o x$subsys = xrelay ]; then
-+ dirs="$dirs $subsys"
-+ fi
- fi
-
- for foo in $dirs; do
-@@ -253,7 +263,11 @@
-
- # Make the link tree in which to actually build.
- if [ x$nolinks = x ]; then
-- make links
-+ if [ x$subsys = x ]; then
-+ make links
-+ else
-+ make links.$subsys
-+ fi
- fi
-
- exit 0
diff --git a/net/isc-dhcp31-server/files/patch-dhcpctl::Makefile.dist b/net/isc-dhcp31-server/files/patch-dhcpctl::Makefile.dist
deleted file mode 100644
index acfee5854413..000000000000
--- a/net/isc-dhcp31-server/files/patch-dhcpctl::Makefile.dist
+++ /dev/null
@@ -1,79 +0,0 @@
---- dhcpctl/Makefile.dist.orig Mon Apr 28 16:31:57 2003
-+++ dhcpctl/Makefile.dist Mon Apr 28 16:24:20 2003
-@@ -17,11 +17,11 @@
- # http://www.isc.org for more information.
- #
-
--CATMANPAGES = dhcpctl.cat3 omshell.cat1
--SEDMANPAGES = dhcpctl.man3 omshell.man1
-+CATMANPAGES = dhcpctl.cat3
-+SEDMANPAGES = dhcpctl.man3
- SRC = dhcpctl.c callback.c remote.c
- OBJ = dhcpctl.o callback.o remote.o
--MAN = dhcpctl.3 omshell.1
-+MAN = dhcpctl.3
- HDRS = dhcpctl.h
-
- INCLUDES = $(BINDINC) -I$(TOP)/includes
-@@ -29,10 +29,7 @@
- DHCPCTLLIBS = libdhcpctl.a ../common/libdhcp.a $(BINDLIB) \
- ../omapip/libomapi.a ../dst/libdst.a
-
--all: libdhcpctl.a omshell cltest $(CATMANPAGES)
--
--omshell: omshell.o $(DHCPCTLLIBS)
-- $(CC) $(DEBUG) $(LFLAGS) -o omshell omshell.o $(DHCPCTLLIBS) $(LIBS)
-+all: libdhcpctl.a cltest $(CATMANPAGES)
-
- cltest: cltest.o $(DHCPCTLLIBS)
- $(CC) $(DEBUG) $(LFLAGS) -o cltest cltest.o $(DHCPCTLLIBS) $(LIBS)
-@@ -43,8 +40,7 @@
- $(RANLIB) libdhcpctl.a
-
- install: all $(CATMANPAGES)
-- for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR) $(USRMANDIR) \
-- $(USERBINDIR); do \
-+ for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR); do \
- foo=""; \
- for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
- foo=$${foo}/$$bar; \
-@@ -64,16 +60,12 @@
- $(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
- $(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
- done
-- $(INSTALL) omshell $(DESTDIR)$(USERBINDIR)
-- $(CHMOD) 755 $(DESTDIR)$(USERBINDIR)/omshell
-- $(MANINSTALL) $(MANFROM) omshell.$(MANCAT)1 $(MANTO) \
-- $(DESTDIR)$(USRMANDIR)/omshell$(USRMANEXT)
-
- depend:
- $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
-
- clean:
-- -rm -f $(OBJ) test.o svtest cltest.o cltest
-+ -rm -f $(OBJ) cltest.o cltest
-
- realclean: clean
- -rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
-@@ -82,7 +74,7 @@
- -rm -f Makefile
-
- links:
-- @for foo in $(SRC) $(MAN) omshell.c cltest.c $(HDRS); do \
-+ @for foo in $(SRC) $(MAN) cltest.c $(HDRS); do \
- if [ ! -b $$foo ]; then \
- rm -f $$foo; \
- fi; \
-@@ -95,12 +87,5 @@
- dhcpctl.man3: dhcpctl.3
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < dhcpctl.3 >dhcpctl.man3
--
--omshell.cat1: omshell.man1
-- nroff -man omshell.man1 >omshell.cat1
--
--omshell.man1: omshell.1
-- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-- -e "s#RUNDIR#$(VARRUN)#g" < omshell.1 >omshell.man1
-
- # Dependencies (semi-automatically-generated)
diff --git a/net/isc-dhcp31-server/files/patch-dhcpd.conf b/net/isc-dhcp31-server/files/patch-dhcpd.conf
deleted file mode 100644
index 030e89874d8d..000000000000
--- a/net/isc-dhcp31-server/files/patch-dhcpd.conf
+++ /dev/null
@@ -1,12 +0,0 @@
---- server/dhcpd.conf.orig Thu Jan 25 03:33:11 2001
-+++ server/dhcpd.conf Wed Jan 30 22:06:52 2002
-@@ -14,6 +14,9 @@
- # network, the authoritative directive should be uncommented.
- #authoritative;
-
-+# ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates.
-+ddns-update-style ad-hoc;
-+
- # Use this to send dhcp log messages to a different log file (you also
- # have to hack syslog.conf to complete the redirection).
- log-facility local7;
diff --git a/net/isc-dhcp31-server/files/patch-dst::Makefile.dist b/net/isc-dhcp31-server/files/patch-dst::Makefile.dist
deleted file mode 100644
index ad45436b1629..000000000000
--- a/net/isc-dhcp31-server/files/patch-dst::Makefile.dist
+++ /dev/null
@@ -1,29 +0,0 @@
---- dst/Makefile.dist.orig Sun Nov 17 03:27:43 2002
-+++ dst/Makefile.dist Fri Mar 5 23:40:45 2004
-@@ -26,12 +26,24 @@
-
- all: libdst.a
-
--install:
--
- libdst.a: $(OBJ)
- rm -f dst.a
- ar cruv libdst.a $(OBJ)
- $(RANLIB) libdst.a
-+
-+install: all
-+ for dir in $(LIBDIR);\
-+ do \
-+ foo=""; \
-+ for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
-+ foo=$${foo}/$$bar; \
-+ if [ ! -d $$foo ]; then \
-+ mkdir $$foo; \
-+ chmod 755 $$foo; \
-+ fi; \
-+ done; \
-+ done
-+ $(INSTALL) libdst.a $(DESTDIR)$(LIBDIR)
-
- depend:
- $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
diff --git a/net/isc-dhcp31-server/files/patch-freebsd b/net/isc-dhcp31-server/files/patch-freebsd
deleted file mode 100644
index 9fef4fdab877..000000000000
--- a/net/isc-dhcp31-server/files/patch-freebsd
+++ /dev/null
@@ -1,75 +0,0 @@
---- client/scripts/freebsd.orig Sun Apr 27 21:44:01 2003
-+++ client/scripts/freebsd Wed Mar 3 02:28:29 2004
-@@ -16,7 +16,7 @@
- ( echo search $new_domain_name >/etc/resolv.conf )
- exit_status=$?
- else
-- rm /etc/resolv.conf
-+ ( rm /etc/resolv.conf )
- exit_status=$?
- fi
- if [ $exit_status -ne 0 ]; then
-@@ -32,17 +32,17 @@
- # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
- exit_with_hooks() {
- exit_status=$1
-- if [ -f /etc/dhclient-exit-hooks ]; then
-- . /etc/dhclient-exit-hooks
-+ if [ -f %%PREFIX%%/etc/dhclient-exit-hooks ]; then
-+ . %%PREFIX%%/etc/dhclient-exit-hooks
- fi
- # probably should do something with exit status of the local script
- exit $exit_status
- }
-
- # Invoke the local dhcp client enter hooks, if they exist.
--if [ -f /etc/dhclient-enter-hooks ]; then
-+if [ -f %%PREFIX%%/etc/dhclient-enter-hooks ]; then
- exit_status=0
-- . /etc/dhclient-enter-hooks
-+ . %%PREFIX%%/etc/dhclient-enter-hooks
- # allow the local script to abort processing of this state
- # local script must set exit_status variable to nonzero.
- if [ $exit_status -ne 0 ]; then
-@@ -51,11 +51,11 @@
- fi
-
- if [ x$new_network_number != x ]; then
-- $LOGGER New Network Number: $new_network_number
-+ $LOGGER "New Network Number: $new_network_number"
- fi
-
- if [ x$new_broadcast_address != x ]; then
-- $LOGGER New Broadcast Address: $new_broadcast_address
-+ $LOGGER "New Broadcast Address: $new_broadcast_address"
- new_broadcast_arg="broadcast $new_broadcast_address"
- fi
- if [ x$old_broadcast_address != x ]; then
-@@ -71,6 +71,15 @@
- alias_subnet_arg="netmask $alias_subnet_mask"
- fi
-
-+# Get the interface to which our default route is bound to.
-+if [ -x /usr/bin/netstat ]; then
-+ if_defaultroute=`/usr/bin/netstat -rn \
-+ | /usr/bin/grep "^default" \
-+ | /usr/bin/awk '{print $6}'`
-+else
-+ if_defaultroute=""
-+fi
-+
- if [ x$reason = xMEDIUM ]; then
- eval "ifconfig $interface $medium"
- eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
-@@ -113,7 +122,10 @@
- eval "ifconfig $interface inet -alias $old_ip_address $medium"
- route delete $old_ip_address 127.1 >/dev/null 2>&1
- for router in $old_routers; do
-- route delete default $router >/dev/null 2>&1
-+ if [ x$if_defaultroute = x ] || [ x$if_defaultroute = x$interface ]
-+ then
-+ route delete default $router >/dev/null 2>&1
-+ fi
- done
- if [ -n "$old_static_routes" ]; then
- set -- $old_static_routes
diff --git a/net/isc-dhcp31-server/files/patch-includes::cf::freebsd.h b/net/isc-dhcp31-server/files/patch-includes::cf::freebsd.h
deleted file mode 100644
index 9a3f4c636b09..000000000000
--- a/net/isc-dhcp31-server/files/patch-includes::cf::freebsd.h
+++ /dev/null
@@ -1,62 +0,0 @@
---- includes/cf/freebsd.h.orig Wed Mar 3 02:32:39 2004
-+++ includes/cf/freebsd.h Wed Mar 3 02:31:56 2004
-@@ -42,7 +42,7 @@
- */
-
- #include <syslog.h>
--#include <sys/types.h>
-+#include <sys/param.h>
- #include <string.h>
- #include <paths.h>
- #include <errno.h>
-@@ -101,6 +101,10 @@
- #define SOCKLEN_T int
- #endif
-
-+#ifdef RESCUE
-+#define _PATH_DHCLIENT_SCRIPT "/rescue/dhclient-script"
-+#endif
-+
- #if defined (USE_DEFAULT_NETWORK)
- # define USE_BPF
- #endif
-@@ -111,6 +115,9 @@
- #endif /* HAVE_DEV_RANDOM */
-
- const char *cmds[] = {
-+#ifndef RESCUE
-+ /* rescue environment can't rely on these ... */
-+ /* Actually, /sbin/dhclient shouldn't use these, either. */
- "/bin/ps -axlw 2>&1",
- "/usr/sbin/arp -an 2>&1",
- "/usr/bin/netstat -an 2>&1",
-@@ -121,10 +128,12 @@
- "/usr/sbin/iostat 2>&1",
- "/usr/bin/vmstat 2>&1",
- "/usr/bin/w 2>&1",
-+#endif
- NULL
- };
-
- const char *dirs[] = {
-+#ifndef RESCUE
- "/tmp",
- "/usr/tmp",
- ".",
-@@ -134,13 +143,16 @@
- "/var/mail",
- "/home",
- "/usr/home",
-+#endif
- NULL
- };
-
- const char *files[] = {
-+#ifndef RESCUE
- "/var/log/messages",
- "/var/log/wtmp",
- "/var/log/lastlog",
-+#endif
- NULL
- };
- #endif /* NEED_PRAND_CONF */
diff --git a/net/isc-dhcp31-server/files/patch-includes::dhcpd.h b/net/isc-dhcp31-server/files/patch-includes::dhcpd.h
deleted file mode 100644
index 1933e0b4037a..000000000000
--- a/net/isc-dhcp31-server/files/patch-includes::dhcpd.h
+++ /dev/null
@@ -1,56 +0,0 @@
---- includes/dhcpd.h.orig Mon Feb 10 02:22:46 2003
-+++ includes/dhcpd.h Wed Mar 3 16:20:09 2004
-@@ -99,6 +99,9 @@
- (((x) >> OPTION_HASH_EXP) & \
- (OPTION_HASH_PTWO - 1))) % OPTION_HASH_SIZE;
-
-+#define NOLINK 0
-+#define HAVELINK 1
-+
- enum dhcp_shutdown_state {
- shutdown_listeners,
- shutdown_omapi_connections,
-@@ -783,6 +786,11 @@
- unsigned remote_id_len; /* Length of Remote ID. */
-
- char name [IFNAMSIZ]; /* Its name... */
-+ int ieee80211; /* True if media is ieee802.11 */
-+ int havemedia; /* True if we have a media table */
-+ int linkstate; /* True if we have link */
-+ int polling; /* True if polling is enabled */
-+ int forcediscover; /* True if a discover is needed */
- int index; /* Its index. */
- int rfdesc; /* Its read file descriptor. */
- int wfdesc; /* Its write file descriptor, if
-@@ -1845,6 +1853,9 @@
- extern const char *path_dhclient_pid;
- extern char *path_dhclient_script;
- extern int interfaces_requested;
-+#ifdef ENABLE_POLLING_MODE
-+extern int polling_interval;
-+#endif
-
- extern struct client_config top_level_config;
-
-@@ -1858,12 +1869,21 @@
- void send_decline PROTO ((void *));
-
- void state_reboot PROTO ((void *));
-+#ifdef ENABLE_POLLING_MODE
-+void state_background PROTO ((void *));
-+void state_polling PROTO ((void *));
-+#endif
- void state_init PROTO ((void *));
- void state_selecting PROTO ((void *));
- void state_requesting PROTO ((void *));
- void state_bound PROTO ((void *));
- void state_stop PROTO ((void *));
- void state_panic PROTO ((void *));
-+
-+#if __FreeBSD_version > 502010
-+void set_ieee80211 PROTO ((struct interface_info *));
-+#endif
-+int interface_active PROTO ((struct interface_info *));
-
- void bind_lease PROTO ((struct client_state *));
-
diff --git a/net/isc-dhcp31-server/files/patch-site.conf b/net/isc-dhcp31-server/files/patch-site.conf
deleted file mode 100644
index 1149e0c7925c..000000000000
--- a/net/isc-dhcp31-server/files/patch-site.conf
+++ /dev/null
@@ -1,42 +0,0 @@
---- site.conf.orig Wed Jul 7 17:20:10 1999
-+++ site.conf Wed Mar 3 14:00:14 2004
-@@ -1,2 +1,39 @@
- # Put local site configuration stuff here to override the default
- # settings in Makefile.conf
-+
-+PREFIX ?= /usr/local
-+
-+USERBINDIR = $(PREFIX)/bin
-+BINDIR = $(PREFIX)/sbin
-+CLIENTBINDIR = $(PREFIX)/sbin
-+ADMMANDIR = $(PREFIX)/man/man8
-+ADMMANEXT = .8
-+FFMANDIR = $(PREFIX)/man/man5
-+FFMANEXT = .5
-+LIBMANDIR = $(PREFIX)/man/man3
-+LIBMANEXT = .3
-+USRMANDIR = $(PREFIX)/man/man1
-+USRMANEXT = .1
-+MANCAT = man
-+# INSTALL = ${INSTALL_DATA}
-+# MANINSTALL = ${INSTALL_MAN}
-+ETC = $(PREFIX)/etc
-+LIBDIR = ${PREFIX}/lib
-+INCDIR = ${PREFIX}/include
-+CLIENT_PATH = \"PATH=/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin\"
-+
-+DEBUG ?= #none
-+
-+CFLAGS += -D_PATH_DHCPD_CONF=\"$(ETC)/dhcpd.conf\"
-+CFLAGS += -D_PATH_DHCPD_DB=\"$(VARDB)/dhcpd.leases\"
-+CFLAGS += -D_PATH_DHCPD_PID=\"$(VARRUN)/dhcpd.pid\"
-+
-+CFLAGS += -D_PATH_DHCRELAY_PID=\"$(VARRUN)/dhcrelay.pid\"
-+
-+CFLAGS += -D_PATH_DHCLIENT_CONF=\"$(ETC)/dhclient.conf\"
-+CFLAGS += -D_PATH_DHCLIENT_SCRIPT=\"$(CLIENTBINDIR)/dhclient-script\"
-+CFLAGS += -D_PATH_DHCLIENT_DB=\"$(VARDB)/dhclient.leases\"
-+CFLAGS += -D_PATH_DHCLIENT_PID=\"$(VARRUN)/dhclient.pid\"
-+
-+CFLAGS += -Dwarn=dhcp_warn
-+CFLAGS += -DNOMINUM