summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile48
-rw-r--r--Makefile.conf52
-rw-r--r--Makefile.dist31
-rw-r--r--README102
-rw-r--r--RELNOTES726
-rw-r--r--client/Makefile.dist30
-rw-r--r--client/clparse.c112
-rw-r--r--client/dhclient-script.866
-rw-r--r--client/dhclient.840
-rw-r--r--client/dhclient.c255
-rw-r--r--client/dhclient.conf.598
-rw-r--r--client/dhclient.leases.563
-rwxr-xr-xclient/scripts/freebsd53
-rwxr-xr-xclient/scripts/linux7
-rw-r--r--common/Makefile.dist45
-rw-r--r--common/alloc.c92
-rw-r--r--common/bpf.c61
-rw-r--r--common/comapi.c59
-rw-r--r--common/conflex.c138
-rw-r--r--common/ctrace.c54
-rw-r--r--common/dhcp-eval.591
-rw-r--r--common/dhcp-options.5106
-rw-r--r--common/discover.c79
-rw-r--r--common/dispatch.c49
-rw-r--r--common/dlpi.c51
-rw-r--r--common/dns.c141
-rw-r--r--common/ethernet.c49
-rw-r--r--common/execute.c65
-rw-r--r--common/fddi.c49
-rw-r--r--common/icmp.c52
-rw-r--r--common/inet.c151
-rw-r--r--common/lpf.c47
-rw-r--r--common/memory.c56
-rw-r--r--common/nit.c51
-rw-r--r--common/options.c368
-rw-r--r--common/packet.c113
-rw-r--r--common/parse.c326
-rw-r--r--common/print.c120
-rw-r--r--common/raw.c49
-rw-r--r--common/resolv.c49
-rw-r--r--common/socket.c49
-rw-r--r--common/tables.c1385
-rw-r--r--common/tr.c45
-rw-r--r--common/tree.c86
-rw-r--r--common/upf.c57
-rwxr-xr-xconfigure27
-rw-r--r--contrib/dhcp.spec4
-rw-r--r--dhcpctl/Makefile.dist31
-rw-r--r--dhcpctl/callback.c52
-rw-r--r--dhcpctl/cltest.c51
-rw-r--r--dhcpctl/dhcpctl.338
-rw-r--r--dhcpctl/dhcpctl.c57
-rw-r--r--dhcpctl/dhcpctl.h49
-rw-r--r--dhcpctl/omshell.149
-rw-r--r--dhcpctl/omshell.c69
-rw-r--r--dhcpctl/remote.c64
-rw-r--r--doc/ja_JP.eucJP/dhclient-script.855
-rw-r--r--doc/ja_JP.eucJP/dhclient.839
-rw-r--r--doc/ja_JP.eucJP/dhclient.conf.557
-rw-r--r--doc/ja_JP.eucJP/dhclient.leases.565
-rw-r--r--doc/ja_JP.eucJP/dhcp-eval.557
-rw-r--r--doc/ja_JP.eucJP/dhcp-options.557
-rw-r--r--dst/Makefile.dist30
-rw-r--r--dst/base64.c26
-rw-r--r--dst/md5_dgst.c128
-rw-r--r--dst/md5_locl.h9
-rw-r--r--includes/arpa/nameser.h26
-rw-r--r--includes/cdefs.h45
-rw-r--r--includes/cf/aix.h54
-rw-r--r--includes/cf/alphaosf.h59
-rw-r--r--includes/cf/bsdos.h47
-rw-r--r--includes/cf/cygwin32.h50
-rw-r--r--includes/cf/freebsd.h54
-rw-r--r--includes/cf/hpux.h55
-rw-r--r--includes/cf/irix.h44
-rw-r--r--includes/cf/linux.h53
-rw-r--r--includes/cf/netbsd.h49
-rw-r--r--includes/cf/nextstep.h50
-rw-r--r--includes/cf/openbsd.h47
-rw-r--r--includes/cf/qnx.h48
-rw-r--r--includes/cf/rhapsody.h47
-rw-r--r--includes/cf/sample.h51
-rw-r--r--includes/cf/sco.h48
-rw-r--r--includes/cf/sunos4.h48
-rw-r--r--includes/cf/sunos5-5.h63
-rw-r--r--includes/cf/ultrix.h51
-rw-r--r--includes/ctrace.h47
-rw-r--r--includes/dhcp.h52
-rw-r--r--includes/dhcpd.h156
-rw-r--r--includes/dhctoken.h53
-rw-r--r--includes/failover.h49
-rw-r--r--includes/inet.h47
-rw-r--r--includes/isc-dhcp/boolean.h28
-rw-r--r--includes/isc-dhcp/int.h28
-rw-r--r--includes/isc-dhcp/lang.h28
-rw-r--r--includes/isc-dhcp/list.h28
-rw-r--r--includes/isc-dhcp/result.h28
-rw-r--r--includes/isc-dhcp/types.h28
-rw-r--r--includes/minires/minires.h31
-rw-r--r--includes/minires/res_update.h26
-rw-r--r--includes/minires/resolv.h26
-rw-r--r--includes/netinet/udp.h23
-rw-r--r--includes/omapip/alloc.h79
-rw-r--r--includes/omapip/buffer.h47
-rw-r--r--includes/omapip/convert.h47
-rw-r--r--includes/omapip/hash.h103
-rw-r--r--includes/omapip/omapip.h51
-rw-r--r--includes/omapip/omapip_p.h47
-rw-r--r--includes/omapip/trace.h47
-rw-r--r--includes/osdep.h65
-rw-r--r--includes/site.h5
-rw-r--r--includes/statement.h47
-rw-r--r--includes/tree.h49
-rw-r--r--minires/Makefile.dist30
-rw-r--r--minires/ns_date.c26
-rw-r--r--minires/ns_name.c30
-rw-r--r--minires/ns_parse.c84
-rw-r--r--minires/ns_samedomain.c28
-rw-r--r--minires/ns_sign.c32
-rw-r--r--minires/ns_verify.c43
-rw-r--r--minires/res_comp.c26
-rw-r--r--minires/res_findzonecut.c28
-rw-r--r--minires/res_init.c26
-rw-r--r--minires/res_mkquery.c26
-rw-r--r--minires/res_mkupdate.c125
-rw-r--r--minires/res_query.c26
-rw-r--r--minires/res_send.c28
-rw-r--r--minires/res_sendsigned.c23
-rw-r--r--minires/res_update.c26
-rw-r--r--omapip/Makefile.dist34
-rw-r--r--omapip/alloc.c100
-rw-r--r--omapip/array.c47
-rw-r--r--omapip/auth.c67
-rw-r--r--omapip/buffer.c47
-rw-r--r--omapip/connection.c51
-rw-r--r--omapip/convert.c57
-rw-r--r--omapip/dispatch.c101
-rw-r--r--omapip/errwarn.c75
-rw-r--r--omapip/generic.c49
-rw-r--r--omapip/handle.c47
-rw-r--r--omapip/hash.c117
-rw-r--r--omapip/listener.c47
-rw-r--r--omapip/message.c61
-rw-r--r--omapip/mrtrace.c51
-rw-r--r--omapip/omapi.354
-rw-r--r--omapip/protocol.c63
-rw-r--r--omapip/result.c52
-rw-r--r--omapip/support.c72
-rw-r--r--omapip/test.c48
-rw-r--r--omapip/toisc.c47
-rw-r--r--omapip/trace.c47
-rw-r--r--relay/Makefile.dist29
-rw-r--r--relay/dhcrelay.880
-rw-r--r--relay/dhcrelay.c109
-rw-r--r--server/Makefile.dist29
-rw-r--r--server/bootp.c63
-rw-r--r--server/class.c51
-rw-r--r--server/confpars.c336
-rw-r--r--server/db.c156
-rw-r--r--server/ddns.c165
-rw-r--r--server/dhcp.c595
-rw-r--r--server/dhcpd.870
-rw-r--r--server/dhcpd.c113
-rw-r--r--server/dhcpd.conf.5358
-rw-r--r--server/dhcpd.leases.565
-rw-r--r--server/failover.c494
-rw-r--r--server/mdb.c237
-rw-r--r--server/omapi.c192
-rw-r--r--server/salloc.c49
-rw-r--r--server/stables.c1069
-rw-r--r--tests/failover/dhcp-1.cf39
-rw-r--r--tests/failover/dhcp-2.cf29
172 files changed, 8470 insertions, 6883 deletions
diff --git a/Makefile b/Makefile
index e6c2d1e5..78867f80 100644
--- a/Makefile
+++ b/Makefile
@@ -1,42 +1,32 @@
# Makefile
#
-# Copyright (c) 2000 Internet Software Consortium.
-# All rights reserved.
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1995-2003 by Internet Software Consortium
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of Internet Software Consortium nor the names
-# of its contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
#
-# This software has been written for the Internet Software Consortium
+# This software has been written for Internet Systems Consortium
# by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-# To learn more about the Internet Software Consortium, see
+# To learn more about Internet Systems Consortium, see
# ``http://www.isc.org/''. To learn more about Vixie Enterprises,
# see ``http://www.vix.com''. To learn more about Nominum, Inc., see
# ``http://www.nominum.com''.
-#
all:
@sysname=`./configure --print-sysname`; \
diff --git a/Makefile.conf b/Makefile.conf
index 4501b178..4d57cb35 100644
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -1,21 +1,25 @@
# Makefile.conf
#
-# Copyright (c) 1996-2000 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1995-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
## Defaults...
SCRIPT = none
@@ -200,6 +204,7 @@ MINORVERSION=MinorVersion
## FreeBSD
##--freebsd--
#CF = cf/freebsd.h
+#COPTS = -O -Wall -Wno-unused -Werror $(CC_OPTIONS)
#SCRIPT=freebsd
##--freebsd--
@@ -216,7 +221,7 @@ MINORVERSION=MinorVersion
#CF = cf/rhapsody.h
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
-##SCRIPT=rhapsody
+#SCRIPT=freebsd
##--darwin--
## NetBSD
@@ -225,28 +230,11 @@ MINORVERSION=MinorVersion
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
# -Wno-uninitialized -Werror \
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
-# -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes \
-# -Wmissing-declarations -Wnested-externs \
-# -pipe $(BINDDEF) $(CC_OPTIONS)
-#SCRIPT=netbsd
-##MKDEP=makedepend
-##--netbsd--
-
-## NetBSD nocast
-## Some versions of the arm32 gcc have a problem in cast conversions.
-## The Alpha definitely has a problem - if you pass '6' where a size_t
-## is expected, you get a warning. So on these architectures, we do
-## not ask for that sort of warning.
-##--netbsd-nocast--
-#CF = cf/netbsd.h
-#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
-# -Wno-uninitialized -Werror \
-# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
# -Wwrite-strings -Wmissing-prototypes \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF) $(CC_OPTIONS)
#SCRIPT=netbsd
-##--netbsd-nocast--
+##--netbsd--
## Ultrix
##--ultrix--
diff --git a/Makefile.dist b/Makefile.dist
index 7e4a2fc1..21cc4dbb 100644
--- a/Makefile.dist
+++ b/Makefile.dist
@@ -1,21 +1,26 @@
# Makefile.dist
#
-# Copyright (c) 1996-1999 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1995-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
+
SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
diff --git a/README b/README
index 5350d6f8..6f8fd178 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
- Internet Software Consortium DHCP Distribution
- Version 3.1 - DEVELOPMENT
- May 26, 2002
+ Internet Systems Consortium DHCP Distribution
+ Version 3.1 - HEAD
+ March 3, 2005
- README FILE
+ README FILE
You should read this file carefully before trying to install or use
the ISC DHCP Distribution.
@@ -96,15 +96,15 @@ system.
RELEASE STATUS
-This is the second beta release of version 3.0 of the ISC DHCP
-Distribution. Development of this release is approaching the point at
-which it will be frozen, and no significant new features will be
-added.
+This is a snapshot of the ISC DHCP project's CVS HEAD prior to release
+version 3.1.x. This is highly experimental code which has not been
+publically released, nor properly tested. It contains a large number of
+new features, and with it most likely many bugs.
In this release, the server and relay agent are currently fully
functional on NetBSD, Linux systems with kernel version 2.2 or later,
-FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The
-software will also run on HP-UX, but only supports a single network
+FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The software
+will also run on AIX and HP-UX, but only supports a single network
interface. Ports also exist for QNX, SCO, NeXTStep, and MacOS X, but
are not in wide use, with all that implies. We are not aware of an
easy way to get this software running on HP-UX.
@@ -142,17 +142,17 @@ information. On Digital Unix, type ``man pfilt''.
To build the DHCP Distribution, unpack the compressed tar file using
the tar utility and the gzip command - type something like:
- zcat dhcp-3.0rc3.tar.gz |tar xvf -
+ zcat dhcp-3.1-HEAD.tar.gz |tar xvf -
On BSD/OS, you have to type gzcat, not zcat, and you may run into
similar problems on other operating systems.
CONFIGURING IT
-Now, cd to the dhcp-3.0rc3 subdirectory that you've just
-created and configure the source tree by typing:
+Now, cd to the dhcp-3.1-HEAD subdirectory that you've just created and
+configure the source tree by typing:
- ./configure
+ ./configure
If the configure utility can figure out what sort of system you're
running on, it will create a custom Makefile for you for that
@@ -243,16 +243,6 @@ network interface. There are also two potential compilation/runtime
problems for Linux 2.1/2.2: the "SO_ATTACH_FILTER undeclared" problem
and the "protocol not configured" problem.
- LINUX: IF_TR.H NOT FOUND
-
-When you compile the distribution on Linux, you may get an error
-message indicating that the include file if_tr.h could not be found.
-If this happens, go into includes/cf/linux.h and delete the line that
-defined HAVE_TR_SUPPORT, or look into installing a new version of libc
-that includes the if_tr.h file. We will be working on removing this
-problem in the future, but for now, if you run into it, this should be
-a viable workaround.
-
LINUX: SO_ATTACH_FILTER UNDECLARED
In addition, there is a minor issue that we will mention here because
@@ -434,6 +424,12 @@ running a version of FreeBSD prior to 2.2, and you find that dhcpd
can't communicate with its clients, you should #define BROKEN_FREEBSD_BPF
in site.h and recompile.
+Modern versions of FreeBSD include the ISC DHCP 3.0 client as part of
+the base system, and the full distribution (for the DHCP server and
+relay agent) is available from the Ports Collection in
+/usr/ports/net/isc-dhcp3, or as a package on FreeBSD installation
+CDROMs.
+
NeXTSTEP
The NeXTSTEP support uses the NeXTSTEP Berkeley Packet Filter
@@ -469,22 +465,46 @@ rather than using the ISC DHCP client. The feature set of the Solaris
client is different (not necessarily better or worse) than that of the
ISC client, but in most cases it will be a lot easier for you to just
use that. Please do not ask for help in using the Solaris DHCP client
-on Internet Software Consortium mailing lists - that's why you're
+on Internet Systems Consortium mailing lists - that's why you're
paying Sun the big bucks. If you're having a problem with the
Solaris client interoperating with the ISC dhcp server, that's another
matter, but please check with Sun first.
+ AIX
+
+The AIX support uses the BSD socket API, which cannot differentiate on
+which network interface a broadcast packet was received; thus the DHCP
+server and relay will work only on a single interface. (They do work
+on multi-interface machines if configured to listen on only one of the
+interfaces.)
+
+The ISC DHCP distribution does not include a dhclient-script for AIX--
+AIX comes with a DHCP client. Contribution of a working dhclient-script
+for AIX would be welcome.
+
SUPPORT
-The Internet Software Consortium DHCP server is not a commercial
-product, and is not supported by the ISC. However, it has attracted a
-fairly sizable following on the Internet, which means that there are a
-lot of knowledgable users who may be able to help you if you get
-stuck. These people generally read the dhcp-server@isc.org mailing
-list.
+The Internet Systems Consortium DHCP server is developed and distributed
+by ISC in the public trust, thanks to the generous donations of its
+sponsors. ISC now also fofers commercial quality support contracts for
+ISC DHCP, more information about ISC Support Contracts can be found at
+the following URL:
+
+ http://www.isc.org/ops/support/
+
+No donators, as yet, have asked for their dollars to be spent providing
+free support to all who ask. Please understand that we may not respond
+to support inquiries unless you have a support contract. ISC will
+continue its practice of always responding to critical items that effect
+the entire community.
+
+However, ISC DHCP has attracted a fairly sizable following on the
+Internet, which means that there are a lot of knowledgable users who
+may be able to help you if you get stuck. These people generally read
+the dhcp-server@isc.org mailing list.
If you are going to use dhcpd, you should probably subscribe to the
-dhcp-server and dhcp-announce mailing lists. If you will be using
+dhcp-server or dhcp-announce mailing lists. If you will be using
dhclient, you should subscribe to the dhcp-client mailing list.
If you need help, you should ask on the dhcp-server or dhcp-client
@@ -495,6 +515,12 @@ If you are having trouble with a combination of the client and server,
send the request to dhcp-server@isc.org. Please do not cross-post to
both lists under any circumstances.
+WHERE TO SEND FEATURE REQUESTS: We like to hear your feedback. We may
+not respond to it all the time, but we do read it. If ISC DHCP doesn't
+work well for you, or you have an idea that would improve it for your
+use, please send your suggestion to dhcp-suggest@isc.org. This is also
+an excellent place to send patches that add new features.
+
WHERE TO REPORT BUGS: If you want the act of sending in a bug report
to result in you getting help in the form of a fixed piece of
software, you are asking for help. Your bug report is helpful to us,
@@ -502,7 +528,7 @@ but fundamentally you are making a support request, so please use the
addresses described in the previous paragraphs. If you are _sure_ that
your problem is a bug, and not user error, or if your bug report
includes a patch, you can send it to dhcp-bugs@isc.org without
-subscribing. This mailing list goes into a bug tracking system, so
+subscribing. This e-mail address goes into a bug tracking system, so
you don't need to check periodically to see if we still remember the
bug - if you haven't been notified that the bug has been closed, we
still consider it a bug, and still have it in the system.
@@ -511,8 +537,9 @@ PLEASE DO NOT REPORT BUGS IN OLD SOFTWARE RELEASES! Fetch the latest
release and see if the bug is still in that version of the software,
and if it's not, _then_ report it. It's okay to report bugs in the
latest patchlevel of a major version that's not the most recent major
-version, though - for example, if you're running 2.0, you don't have
-to upgrade to 3.0 before you can report bugs.
+version, though - for example, if you're running 3.0.2, you don't have
+to upgrade to a 3.0.3rc (release candidate) or even a 3.1.x release
+before you can report bugs.
PLEASE DO NOT REPORT BUGS IF YOU ARE RUNNING A VERSION OF THE ISC
DHCP DISTRIBUTION THAT YOU DIDN'T GET FROM THE ISC! Free operating
@@ -642,7 +669,6 @@ If you are having problems with a client whose executable is called
dhcpcd, this is _not_ the ISC DHCP client, and we probably can't help
you with it.
-Please see http://www.isc.org/services/public/lists/dhcp-lists.html
-for details on how to subscribe to the ISC DHCP mailing lists.
-
+Please see http://www.isc.org/sw/dhcp/ for details on how to subscribe
+to the ISC DHCP mailing lists.
diff --git a/RELNOTES b/RELNOTES
index 2b35b250..fc46463e 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,10 +1,8 @@
- Internet Software Consortium DHCP Distribution
- Version 3.1, Working Branch
+ Internet Systems Consortium DHCP Distribution
+ Version 3.1 - HEAD
+ March 3, 2005
- Release Notes
-
-This is a development snapshot of Version 3 of the Internet Software
-Consortium DHCP Distribution.
+ Release Notes
NEW FEATURES
@@ -24,19 +22,9 @@ that are new since version 2.0:
- Many bug fixes, performance enhancements, and minor new DHCP
protocol features.
-This release has been beta tested quite thorougly, and we think it is
-substantially more robust at this time than 2.0pl5. The release
-candidate is expected to be free of serious bugs, but it's called a
-release candidate because we want people to try it and find any last
-real problems before we call it done. We do not expect to add
-anything other than documentation and any remaining bug fixes to the
-3.0 release.
-
-The 3.0 Release Candidate 1 lease file is not backwards compatible
-with the 3.0 Beta 1 lease file, so if you have to go back, you will
-have to convert your lease files back to the 3.0 Beta 1 format - if
-you try to run a 3.0 Beta 1 server on a 3.0 lease file, it will
-cheerfully delete all your leases.
+The main bug fixed here is a bug in the subclass allocation code that
+could result in a memory smash. Any users of the ISC DHCP server who
+are using subclasses should seriously consider upgrading to 3.0.1.
If you are running 3.0 beta 1 and are doing dynamic DNS updates, the
lease file is no longer forward-compatible to 3.0 final. A script
@@ -55,6 +43,696 @@ Murrell at BC Tel Advanced Communications. I'd like to express my
thanks to all of these good people here, both for working on the code
and for prodding me into improving it.
+
+ Changes since 3.0 (New Features)
+
+- A workaround for certain STSN servers that send a mangled domain-name
+ option was introduced for dhclient. The client will now accept corrupted
+ server responses, if they contain a valid DHCP_MESSAGE_TYPE (OFFER, ACK,
+ or NAK). The server will continue to not accept corrupt client packets.
+
+- Support for 'reserved' (static) and BOOTP leases via failover was
+ introduced.
+
+- Support for adding, removing, and managing class and subclass statements
+ via OMAPI.
+
+- 'make install' now creates the initial zero-length dhcpd.leases file if
+ one does not already exist on the system.
+
+X The 'www-server' option was documented. This should probably be
+ backported to V3-RELEASE-BRANCH.
+
+
+ Changes since 3.0.2
+
+- A bug was fixed where a server might load balance a DHCP REQUEST to its
+ peer after already choosing not to load balance the preceeding DISCOVER.
+ The peer cannot allocate the originating server's lease.
+
+- In the case where a secondary server lost its stable storage while the
+ primary was still in communications-interrupted, and came back online,
+ the lease databases would not be fully transferred to the secondary.
+ This was due to the secondary errantly sending an extra UPDREQ message
+ when the primary made its state transition to PARTNER-DOWN known.
+
+- The package will now compile cleanly in gcc 3.3 and 3.4. As a side effect,
+ lease structures will be 9 bytes smaller on all platforms. Thanks to
+ Jason Vas Dias at Redhat.
+
+- Interface discovery code in DISCOVER_UNCONFIGURED mode is now
+ properly restricted to only detecting broadcast interfaces. Thanks
+ to a patch from Jason Vas Dias at RedHat.
+
+- decode_udp_ip_header was changed so that the IP address was copied out
+ to a variable, rather than referenced by a pointer. This enforces 4-byte
+ alignment of the 32-bit IP address value. Thanks to a patch from Dr.
+ Peter Poeml.
+
+- An incorrect log message was corrected thanks to a patch from
+ Dr. Peter Poeml.
+
+- A bug in DDNS was repaired, where if the server's first DDNS action was
+ a DDNS removal rather than a DDNS update, the resolver library's
+ retransmit timer and retry timer was set to the default, implying a
+ 15 second timeout interval. Which is a little excessive in a synchronous,
+ single-threaded system. In all cases, ISC DHCP should now hold fast to
+ a 1-second timeout, trying only once.
+
+- The siaddr field was being improperly set to the server-identifier when
+ responding to DHCP messages. RFC2131 clarified the siaddr field as
+ meaning the 'next server in the bootstrap process', eg a tftp server.
+ The siaddr field is now left zeroed unless next-server is configured.
+
+- mockup_lease() could have returned in an error condition (or in the
+ condition where no fixed-address was found matching the shared
+ network) with stale references to a host record. This is probably not
+ a memory leak since host records generally never die anyway.
+
+- A bug was repaired where failover servers would let stale client identifiers
+ persist on leases that were reallocated to new clients not sending an id.
+
+- Binding scopes ("set var = value;") are now removed from leases allocated
+ by failover peers if the lease had expired. This should help reduce the
+ number of stale binding scopes on leases.
+
+- A small memory leak was closed involving client identifiers larger than
+ 7 bytes, and failover.
+
+- Configuring a subnet in dhcpd.conf with a subnet mask of 32 bits might
+ cause an internal function to overflow heap. Thanks to Jason Vas Dias
+ at Redhat.
+
+- Some inconsistencies in treating numbers that the lexer parsed as 'NUMBER'
+ or 'NUMBER_OR_NAME' was repaired. Hexadecimal parsing is affected, and
+ should work better.
+
+- In several cases, parse warnings were being issued before the lexical
+ token had been advanced to the token whose value was causing an error...
+ causing parse warnings to claim the problem is on the wrong token.
+
+- Host declarations matching on client identifier for dynamic leases will
+ no longer match fixed-address host declarations (this is now identical
+ to behaviour for host records matching on hardware address).
+
+ Changes since 3.0.2rc3
+
+- A previously undocumented configuration directive, 'local-address',
+ was documented in the dhcpd.conf manpage.
+
+ Changes since 3.0.2rc2
+
+- Two varaibles introduced in 3.0.2b1 were used without being initialized
+ in the case where neither the FILE nor SNAME fields were available for
+ overloading. This was repaired.
+
+- A heretofore believed to be impossible corner case of the option
+ overloading implementation turned out to be possible ("Unable to sort
+ overloaded options after 10 tries."). The implementation was reworked
+ to consider the case of an option so large it would require more than
+ three chunks to fit.
+
+- Many other instances of variables being used without being initialized
+ were repaired.
+
+- An uninitialized variable in omapi_io_destroy() led to the discovery
+ that this function may result in orphaned pointers (and hence, a memory
+ leak).
+
+ Changes since 3.0.2rc1
+
+- allocate_lease() was rewritten to repair a bug in which the server would
+ try to allocate an ABANDONED lease when FREE leases were available.
+
+ Changes since 3.0.2b1
+
+- Some dhcp-eval.5 manpage formatting was repaired.
+
+ Changes since 3.0.1
+
+- A bug was fixed in the server's 'option overloading' implementation,
+ where options loaded into the 'file' and 'sname' packet fields were
+ not aligned precisely as rfc2131 dictates.
+
+- The FreeBSD client script was changed to support the case where a domain
+ name was not provided by the server.
+
+- A memory leak in 'omshell' per each command line parsed was
+ repaired, thanks to a patch from Jarkko Torppa.
+
+- Log functions writing to stderr were adjusted to use the STDERR_FILENO
+ system definition rather than '2'. This is a no-op for 90% of platforms.
+
+- One call to trace_write_packet_iov() counted the number of io vectors
+ incorrectly, causing inconsistent tracefiles. This was fixed.
+
+- Some expression parse failure memory leaks were closed.
+
+- A host byte order problem in tracefiles was repaired.
+
+- Pools configured in DHCPD for failover possessing permission lists that
+ previously were assumed to not include dyanmic bootp clients are now
+ a little more pessimistic. The result is, dhcpd will nag you about just
+ about most pools that possess a 'allow' statement with no 'deny' that
+ would definitely match a dynamic bootp client.
+
+- The 'ddns-update-style' configuration warning bit now insists that
+ the configuration be globally scoped.
+
+- Two memory leaks in dhclient were closed thanks to a patch from Felix
+ Farkas.
+
+- Some minor but excellently pedantic documentation errors were fixed
+ thanks to a patch from Thomas Klausner.
+
+- Bugs in operator precedence in executable statements have been repaired
+ once again. More legal syntaxes should be parsed legally.
+
+- Failing to initialize a tracefile for any reason if a tracefile was
+ specified is now a fatal error. Thanks to a patch from Albert Herranz.
+
+- Corrected a bug in which the number of leases transferred as calculated
+ by the failover primary and sent to peers in POOLRESP responses may be
+ incorrect. This value is not believed to be used by other failover
+ implementations, excepting perhaps as logged information.
+
+- Corrected a bug in which 'dhcp_failover_send_poolresp()' was in fact
+ sending POOLREQ messages instead of POOLRESP mesasges. This message
+ was essentially ignored since failover secondaries effectively do not
+ respond to POOLREQ messages.
+
+- Type definitions for various bitwidths of integers in the sunos5-5
+ build of ISC DHCP have been fixed. It should compile and run more
+ easily when built in 64-bit for this platform.
+
+- "allow known-clients;" is now a legal syntax, to avoid confusion.
+
+- If one dhcp server chooses to 'load balance' a request to its failover
+ peer, it first checks to see if it believes said peer has a free
+ lease to allocate before ignoring the DISCOVER.
+
+- log() was logging a work buffer, rather than the value returned by
+ executing the statements configured by the user. In some cases,
+ the work buffer and the intended results were the same. In some other
+ cases, they were not. This was fixed thanks to a patch from Gunnar
+ Fjone and directconnect.no.
+
+- Compiler warnings for some string type conversions was fixed, thanks
+ to Andreas Gustafsson.
+
+- The netbsd build environments were simplified to one, in which
+ -Wconversion is not used, thanks to Andreas Gustafsson.
+
+- How randomness in the backoff-cutoff dhclient configuration variable
+ is implemented was better documented in the manpage, and the behaviour
+ of dhclient in REQUEST timeout handling was changed to match that of
+ DISCOVER timeout handling.
+
+- Omapi was hardened against clients that pass in null values, thanks
+ to a patch from Mark Jason Dominus.
+
+- A bug was fixed in dhclient that kept it from doing client-side
+ ddns updates. Thanks to a patch from Andreas Gustafsson, which
+ underwent some modification after review by Jason Vas Dias.
+
+- Failover implementations disconnected due to the network between
+ them (rather than one of the two shutting down) will now try to
+ re-establish the failover connection every 5 seconds, rather than
+ to simply try once and give up until one of them is restarted.
+ Thanks to a patch from Ulf Ekberg from Infoblox, and field testing
+ by Greger V. Teigre which led to an enhancement to it.
+
+- A problem that kept DHCP Failover secondaries from tearing down
+ ddns records was repaired. Thanks to a patch from Ulf Ekberg from
+ Infoblox.
+
+- 64bit pointer sizes are detected properly on FreeBSD now.
+
+- A bug was repaired where the DHCP server would leave stale references
+ to host records on leases it once thought about offering to certain
+ clients. The result would be to apply host and 'known' scopes to the
+ wrong clients (possibly denying booting). NOTE: The 'mis-host' patch
+ that was being circulated as a workaround is not the way this bug was
+ fixed. If you were a victim of this bug in 3.0.1, you are cautioned
+ to proceed carefully and see if it fixes your problem.
+
+- A bug was repaired in the server's DHCPINFORM handling, where it
+ tried to divine the client's address from the source packet and
+ would get it wrong. Thanks to Anshuman Singh Rawat.
+
+- A log message was introduced to help illuminate the case where the
+ server was unable to find a lease to assign to any BOOTP client.
+ Thanks to Daniel Baker.
+
+- A minor dhcpd.conf.5 manpage error was fixed.
+
+ Changes since 3.0.1rc14
+
+- The global variable 'cur_time' was centralized and is now uniformly of a
+ type #defined in system-dependent headers. It had previously been defined
+ in one of many places as a 32-bit value, and this causes mayhem on 64-bit
+ big endian systems. It probably wasn't too healthy on little endian
+ systems either.
+
+- A printf format string error introduced in rc14 was repaired.
+
+- AIX system-dependent header file was altered to only define NO_SNPRINTF
+ if the condition used to #ifdef in vsnprintf in AIX' header files
+ is false.
+
+- The Alpha/OSF system-dependent header file was altered to define
+ NO_SNPRINTF on OS revisions older than 4.0G.
+
+- omapip/test.c had string.h added to its includes.
+
+ Changes since 3.0.1rc13
+
+! CAN-2004-0460 - CERT VU#317350: Five stack overflow exploits were closed
+ in logging messages with excessively long hostnames provided by the
+ clients. It is highly probable that these could have been used by
+ attackers to gain arbitrary root access on systems using ISC DHCP 3.0.1
+ release candidates 12 or 13. Special thanks to Gregory Duchemin for
+ both finding and solving the problem.
+
+! CAN-2004-0461 - CERT VU#654390: Once the above was closed, an opening
+ in log_*() functions was evidented, on some specific platforms where
+ vsnprintf() was not believed to be available and calls were wrapped to
+ sprintf() instead. Again, credit goes to Gregory Duchemin for finding
+ the problem. Calls to snprintf() are now linked to a distribution-local
+ snprintf implementation, only in those cases where the architecture is
+ not known to provide one (see includes/cf/[arch].h). If you experience
+ linking problems with snprintf/vsnprintf or 'isc_print_' functions, this
+ is where to look. This vulnerability did not exist in any previously
+ published version of ISC DHCP.
+
+- Compilation on hpux 11.11 was repaired.
+
+- 'The cross-compile bug fix' was backed out.
+
+ Changes since 3.0.1rc12
+
+- Fixed a bug in omapi lease lookup function, to form the hardware
+ address for the hash lookup correctly, thanks to a patch from
+ Richard Hirst.
+
+- Fixed a bug where dhcrelay was sending relayed responses back to the
+ broadcast address, but with the source's unicast mac address. Should
+ now conform to rfc2131 section 4.1.
+
+- Cross-compile bug fix; use $(AR) instead of ar. Thanks to Morten Brorup.
+
+- Fixed a crash bug in dhclient where dhcpd servers that do not provide
+ renewal times results in an FPE. As a side effect, dhclient can now
+ properly handle 0xFFFFFFFF (-1) expiry times supplied by servers. Thanks
+ to a patch from Burt Silverman.
+
+- The 'ping timeout' debugs from rc12 were removed to -DDEBUG only,
+ and reformatted to correct a compilation error on solaris platforms.
+
+- A patch was applied which fixes a case where leases read from the
+ leases database do not properly over-ride previously read leases.
+
+- dhcpctl.3 manpage was tweaked.
+
+ Changes since 3.0.1rc11
+
+- A patch from Steve Campbell was applied with minor modifications to
+ permit reverse dns PTR record updates with values containing spaces.
+
+- A patch from Florian Lohoff was applied with some modifications to
+ dhcrelay. It now discards packets whose hop count exceeds 10 by default,
+ and a command-line option (-c) can be used to set this threshold.
+
+- A failover bug relating to identifying peers by name length instead of
+ by name was fixed.
+
+- Delcaring failover configs within shared-network statements should no
+ longer result in error.
+
+- The -nw command line option to dhclient now works.
+
+- Thanks to a patch from Michael Richardson:
+ - Some problems with long option processing have been fixed.
+ - Some fixes to minires so that updates of KEY records will work.
+
+- contrib/ms2isc was updated by Shu-Min Chang of the Intel Corporation.
+ see contrib/ms2isc/readme.txt for revision notes.
+
+- Dhclient no longer uses shell commands to kill another instance of
+ itself, it sends the signal directly. Thanks to a patch from Martin
+ Blapp.
+
+- The FreeBSD dhclient-script was changed so that a failure to write to
+ /etc/resolv.conf does not prematurely end the script. This keeps dhclient
+ from looping infinitely when this is the case. Thanks to a patch from
+ Martin Blapp.
+
+- A patch from Bill Stephens was applied which resolves a problem with lease
+ expiry times in failover configurations.
+
+- A memory leak in configuration parsing was closed thanks to a patch from
+ Steve G.
+
+- The function which discovers interfaces will now skip non-broadcast or
+ point-to-point interfaces, thanks to a patch from David Brownlee.
+
+- Options not yet known by the dhcpd or dhclient have had their names
+ changed such that they do not contain # symbols, in case they should ever
+ appear in a lease file. An option that might have been named "#144" is
+ now "unknown-144".
+
+- Another patch from Bill Stephens which allows the ping-check timeout to
+ be configured as 'ping-timeout'. Defaults to 1.
+
+ Changes since 3.0.1rc10
+
+- Potential buffer overflows in minires repaired.
+
+- A change to the linux client script to use /bin/bash, since /bin/sh may
+ not be bash.
+
+- Some missing va_end cleanups thanks to a patch from Thomas Klausner.
+
+- A correction of boolean parsing syntax validation - some illegal syntaxes
+ that worked before are now detected and produce errs, some legal syntaxes
+ that errored before will now work properly.
+
+- Some search-and-replace errors that caused some options to change their
+ names was repaired.
+
+- Shu-min Chang of the Intel corporation has contributed a perl script and
+ module that converts the MS NT4 DHCP configuration to a ISC DHCP3
+ configuration file.
+
+- Applied the remainder of the dhcpctl memory leak patch provided by Bill
+ Squier at ReefEdge, Inc. (groo@reefedge.com).
+
+- Missing non-optional failover peer configurations will now result in a soft
+ error rather than a null dereference.
+
+ Changes since 3.0.1rc9
+
+- A format string was corrected to fix compiler warnings.
+
+- A number of spelling corrections were made in the man pages.
+
+- The dhclient.conf.5 man page was changed to refer to do-forward-updates
+ rather than a configuration option that doesn't exist.
+
+- A FreeBSD-specific bug in the interface removal handling was fixed.
+
+- A Linux-specific Token Ring detection problem was fixed.
+
+- Hashes removed from as-yet-unknown agent options, having those options
+ appear in reality before we know about them will no longer produce
+ self-corrupting lease databases.
+
+- dhclient will use the proper port numbers now when using the -g option.
+
+- A order-of-operations bug with 2 match clauses in 1 class statement is
+ fixed thanks to a patch from Andrew Matheson.
+
+- Compilation problems on Solaris were fixed.
+
+- Compilation problems when built with DEBUG or DEBUG_PACKET were repaired.
+
+- A fix to the dhcp ack process which makes certain group options will be
+ included in the first DHCPOFFER message was made thanks to a patch from
+ Ling Gou.
+
+- A few memory leaks were repaired thanks to patches from Bill Squier at
+ ReefEdge, Inc. (groo@reefedge.com).
+
+- A fix for shared-networks that sometimes give clients options for the
+ wrong subnets (in particular, 'option routers') was applied, thanks to
+ Ted Lemon for the patch.
+
+- Omshell's handling of dotted octets as values was changed such that dots
+ one after the other produce zero values in the integer string.
+
+ Changes since 3.0.1rc8
+
+- Fix a format string vulnerability in the server that could lead to a
+ remote root compromise (discovered by NGSEC Research Team, www.ngsec.com).
+
+- Add additional support for NetBSD/sparc64.
+
+- Fix a bug in the command-line parsing of the client. Also, resolve
+ a memory leak.
+
+- Add better support for shells other than bash in the Linux client
+ script.
+
+- Various build fixes for modern versions of FreeBSD and Linux.
+
+- Fix a bad bounds check when printing binding state names.
+
+- Clarify documentation about fixed-address and multiple addresses.
+
+- Fix a typo in the authoritative error message.
+
+- Make a log entry when we can't write a billing class.
+
+- Use conversion targets that are the right size on all architectures.
+
+- Increment the hop count when relaying.
+
+- Log a message when lease state is changed through OMAPI.
+
+- Don't rerun the shared_network when evaluating the pool.
+
+- Fix a reversed test in the parser.
+
+- Change the type of rbuf_max.
+
+- Make FTS_LAST a manifest constant to quiet warnings.
+
+ Changes since 3.0.1rc7
+
+- Fix two compiler warnings that are generated when compiling on Solaris
+ with gcc. These stop the build, even though they weren't actually
+ errors, because we prefer that our builds generate no warnings.
+
+ Changes since 3.0.1rc6
+
+- Don't allow a lease that's in the EXPIRED, RELEASED or RESET state
+ to be renewed.
+
+- Implement lease stealing for cases where the primary has fewer leases
+ than the secondary, as called for by the standard.
+
+- Add a fudge factor to the lease expiry acceptance code, (suggested
+ by Kevin Miller of CMU).
+
+- Fix a bug in permit_list_match that made it much too willing to say
+ that two permit lists matched.
+
+- Unless DEBUG_DNS_UPDATES is defined, print more user-friendly (and
+ also more compact) messages about DNS updates.
+
+- Fix a bug in generating wire-format domain names for the FQDN option.
+
+- Fix a bug where the FQDN option would not be returned if the client
+ requested it, contrary to the standard.
+
+- On Darwin, use the FreeBSD DHCP client script.
+
+- On NetBSD/sparc, don't check for casting warnings.
+
+- Add a flag in the DHCP client to disable updating the client's A
+ record when sending an FQDN option indicating that the client is
+ going to update its A record.
+
+- In the client, don't attempt a DNS update until one second after
+ configuring the new IP address, and if the update times out, keep
+ trying until a response, positive or negative, is received from the
+ DNS server.
+
+- Fix an uninitialized memory bug in the DHCP client.
+
+- Apply some FreeBSD-specific bug fixes suggested by Murray Stokely.
+
+- Fix a bug in ns_parserr(), where it was returning the wrong sort
+ of result code in some cases (suggested by Ben Harris of the
+ NetBSD project).
+
+- Fix a bug in is_identifier(), where it was checking against EOF
+ instead of the END_OF_FILE token (also suggested by Ben Harris).
+
+- Fix a bug where if an option universe contained no options, the
+ DHCP server could dump core (Walter Steiner).
+
+- Fix a bug in the handling of encapsulated options.
+
+- Fix a bug that prevented NWIP suboptions from being processed.
+
+- Delete the FTS_BOOTP and FTS_RESERVED states and implement them
+ as modifier flags to the FTS_ACTIVE state, as called for in the
+ failover protocol standard.
+
+- Fix bugs in the pool merging code that resulted in references and
+ dereferences of null pointers. This bug had no impact unless the
+ POINTER_DEBUG flag was defined.
+
+- In the server, added a do-forward-updates flag that can be used to
+ disable forward updates in all cases, so that sites that want the
+ clients to take sole responsibility for updating their A record can
+ do so.
+
+- Make it possible to disable optimization of PTR record updates.
+
+ Changes since 3.0.1rc5
+
+- Include some new documentation and changes provided by Karl Auer.
+
+- Add a workaround for some Lexmark printers that send a double-NUL-
+ terminated host-name option, which would break DNS updates.
+
+- Fix an off-by-one error in the MAC-address checking code for
+ DHCPRELEASE that was added in 3.0.1rc5.
+
+- Fix a bug where client-specific information was not being discarded
+ from the lease when it expired or was released, resulting in
+ problems if the lease was reallocated to a different client.
+
+- If more than one allocation pool is specified that has the same set
+ of constraints as another allocation pool on the same shared
+ network, merge the two pools.
+
+- Don't print an error in fallback_discard, since this just causes
+ confusion and does not appear to be helping to encourage anyone to
+ fix this bug.
+
+ Changes since 3.0.1rc4
+
+- Fix a bug that would cause the DHCP server to spin if asked to parse
+ a certain kind of incorrect statement.
+
+- Fix a related bug that would prevent an error from being reported in
+ the same case.
+
+- Additional documentation.
+
+- Make sure that the hardware address matches the lease when
+ processing a DHCPRELEASE message.
+
+ Changes since 3.0.1rc3
+
+- A minor bug fix in the arguments to a logging function call.
+- Documentation update for dhcpd.conf.
+
+ Changes since 3.0.1rc2
+
+- Allow the primary to send a POOLREQ message. This isn't what the current
+ failover draft says to do, so we may have to back it out if I can't get the
+ authors to relent, but the scheme for balancing that's specified in the
+ current draft seems needlessly hairy, so I'm floating a trial balloon.
+ The rc1 code did not implement the method described in the draft either.
+
+ Changes since 3.0.1rc1
+
+- Treat NXDOMAIN and NXRRSET as success when we are trying to delete a
+ domain or RRSET. This allows the DHCP server to forget about a name
+ it added to the DNS once it's been removed, even if the DHCP server
+ wasn't the one that removed it.
+
+- Install defaults for failover maximum outstanding updates and maximum
+ silent time. This prevents problems that might occur if these values
+ were not configured.
+
+- Don't do DDNS deletes if ddns-update-style is none.
+
+- Return relay agent information options in DHCPNAK. This prevents DHCPNAK
+ messages from being dropped when the relay agent information option contains
+ routing information.
+
+- Fix a problem where coming up in recover wouldn't result in an update
+ request being sent.
+
+- Add some more chatty messages when we start a recovery update and when it's
+ done.
+
+- Fix a possible problem where some state might have been left around
+ after the peer lost contact and regained contact about how many updates
+ were pending.
+
+- Don't nix a lease update because of a lease conflict. This test has
+ never (as far as I know) prevented a mistake, and it appears to cause
+ problems with failover.
+
+- Add support in rc history code for keeping a selective history, rather
+ than a history of all references and dereferences. This code is only used
+ when extensive additional debugging is enabled.
+
+ Changes since 3.0
+
+- Make allocators for hash tables. As a side effect, this fixes a memory
+ smash in the subclass allocation code.
+
+- Fix a small bug in omshell where if you try to close an object when
+ no object is open, it dumps core.
+
+- Fix an obscure coredump that could occur on shutdown.
+
+- Fix a bug in the recording of host declaration rubouts in the lease file.
+
+- Fix two potential spins in the host deletion code.
+
+- Fix a core dump that would happen if an application tried to update
+ a host object attribute with a null value.
+
+ Changes since 3.0 Release Candidate 12
+
+- Fix a memory leak in the evaluation code.
+
+- Fix an obscure core dump.
+
+- Print a couple of new warnings when parsing the configuration file
+ when crucial information is left out.
+
+- Log "no free leases" as an error.
+
+- Documentation updates.
+
+ Changes since 3.0 Release Candidate 11
+
+- Always return a subnet selection option if one is sent.
+
+- Fix a warning that was being printed because an automatic data
+ structure wasn't zeroed.
+
+- Fix some failover state transitions that were being handled
+ incorrectly.
+
+- When supersede_lease is called on a lease whose end time has already
+ expired, but for which a state transition has not yet been done, do
+ a state transition. This fixes the case where if the secondary
+ allocated a lease to a client and the lease "expired" while the
+ secondary was in partner-down, no expiry event would actually
+ happen, so the lease would remain active until the primary was
+ restarted.
+
+ Changes since 3.0 Release Candidate 10
+
+- Fix a bug that was preventing released leases from changing state
+ in failover-enabled pools.
+
+- Fix a core dump in the client identifier finder code (for host
+ declarations).
+
+- Finish fixing a bug where bogus data would sometimes get logged to
+ the dhclient.leases file because it was opened as descriptor 2.
+
+- Fix the Linux dhclient-script according to suggestions made by
+ several people on the dhcp-client mailing list.
+
+- Log successful DNS updates at LOG_INFO, not LOG_ERROR.
+
+- Print an error message and refuse to run if a failover peer is
+ defined but not referenced by any pools.
+
+- Correct a confusing error message in failover.
+
Changes since 3.0 Release Candidate 9
- Fix a bug in lease allocation for Dynamic BOOTP clients.
@@ -208,10 +886,10 @@ and for prodding me into improving it.
- Clean up the memory allocation/reference history printer.
-- Support input of dotted quads and colon-seperated hex lists as
+- Support input of dotted quads and colon-separated hex lists as
attribute values in omshell.
-- Fix a typo in the linux interface discovery code.
+- Fix a typo in the Linux interface discovery code.
- Conditionalize a piece of trace code that wasn't conditional.
@@ -245,7 +923,7 @@ and for prodding me into improving it.
- Fix compile problem on SunOS 4.x
-- If a signature algorithm is not termined with '.', terminate it so
+- If a signature algorithm is not terminated with '.', terminate it so
that comparisons between fully-qualified names will work
consistently.
@@ -279,7 +957,7 @@ and for prodding me into improving it.
- Change the conditions under which a DHCPRELEASE is actually
committed to be consistent with lease binding states rather than
- using the lease end time. THis may fix some problems with the
+ using the lease end time. This may fix some problems with the
billing class code.
- Fix a bug where lease updates would fail on Digital Unix (and maybe
@@ -458,7 +1136,7 @@ and for prodding me into improving it.
given a lease where the hardware address was correct but the client
identifier was not, resulting in a lease conflict message.
-- Fix a problem where the server could write out a colon-seperated
+- Fix a problem where the server could write out a colon-separated
hex list as a value for a variable, which would then not parse.
The fix is to always write strings as quoted strings, with any
non-printable characters quoted as octal escape sequences. So
diff --git a/client/Makefile.dist b/client/Makefile.dist
index a1f8a38a..c1239632 100644
--- a/client/Makefile.dist
+++ b/client/Makefile.dist
@@ -1,21 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-1999 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
dhclient.leases.cat5
diff --git a/client/clparse.c b/client/clparse.c
index eaf4f579..32d82d02 100644
--- a/client/clparse.c
+++ b/client/clparse.c
@@ -3,39 +3,30 @@
Parser for dhclient config and lease files... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.63 2001/06/27 00:29:27 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.64 2005/03/17 20:14:55 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -92,6 +83,7 @@ isc_result_t read_client_conf ()
top_level_config.script_name = path_dhclient_script;
top_level_config.requested_options = default_requested_options;
top_level_config.omapi_port = -1;
+ top_level_config.do_forward_update = 1;
group_allocate (&top_level_config.on_receipt, MDL);
if (!top_level_config.on_receipt)
@@ -460,6 +452,23 @@ void parse_client_statement (cfile, ip, config)
parse_semi (cfile);
return;
+ case DO_FORWARD_UPDATE:
+ token = next_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, (unsigned *)0, cfile);
+ if (!strcasecmp (val, "on") ||
+ !strcasecmp (val, "true"))
+ config -> do_forward_update = 1;
+ else if (!strcasecmp (val, "off") ||
+ !strcasecmp (val, "false"))
+ config -> do_forward_update = 0;
+ else {
+ parse_warn (cfile, "expecting boolean value.");
+ skip_to_semi (cfile);
+ return;
+ }
+ parse_semi (cfile);
+ return;
+
case REBOOT:
token = next_token (&val, (unsigned *)0, cfile);
parse_lease_time (cfile, &config -> reboot_timeout);
@@ -599,34 +608,41 @@ void parse_option_list (cfile, list)
struct parse *cfile;
u_int32_t **list;
{
- int ix, i;
+ int ix;
int token;
const char *val;
- pair p = (pair)0, q, r;
+ pair p = (pair)0, q = (pair)0, r;
+ struct option *option;
ix = 0;
do {
- token = next_token (&val, (unsigned *)0, cfile);
- if (token == SEMI)
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token == SEMI) {
+ token = next_token (&val, (unsigned *)0, cfile);
break;
+ }
if (!is_identifier (token)) {
parse_warn (cfile, "%s: expected option name.", val);
+ token = next_token (&val, (unsigned *)0, cfile);
skip_to_semi (cfile);
return;
}
- for (i = 0; i < 256; i++) {
- if (!strcasecmp (dhcp_options [i].name, val))
- break;
- }
- if (i == 256) {
+ option = parse_option_name (cfile, 0, NULL);
+ if (!option) {
parse_warn (cfile, "%s: expected option name.", val);
+ return;
+ }
+ if (option -> universe != &dhcp_universe) {
+ parse_warn (cfile,
+ "%s.%s: Only global options allowed.",
+ option -> universe -> name, option->name );
skip_to_semi (cfile);
return;
}
r = new_pair (MDL);
if (!r)
log_fatal ("can't allocate pair for option code.");
- r -> car = (caddr_t)(long)i;
+ r -> car = (caddr_t)(long)option -> code;
r -> cdr = (pair)0;
if (p)
q -> cdr = r;
@@ -755,9 +771,7 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
/* If we didn't find an interface, make a dummy interface as
a placeholder. */
if (!ip) {
- isc_result_t status;
- status = interface_allocate (&ip, MDL);
- if (status != ISC_R_SUCCESS)
+ if ((status = interface_allocate (&ip, MDL)) != ISC_R_SUCCESS)
log_fatal ("Can't record interface %s: %s",
name, isc_result_totext (status));
strcpy (ip -> name, name);
@@ -770,6 +784,8 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
}
if (pi)
status = interface_reference (pi, ip, MDL);
+ else
+ status = ISC_R_FAILURE;
interface_dereference (&ip, MDL);
if (status != ISC_R_SUCCESS)
return 0;
@@ -814,7 +830,7 @@ void parse_client_lease_statement (cfile, is_static)
struct parse *cfile;
int is_static;
{
- struct client_lease *lease, *lp, *pl;
+ struct client_lease *lease, *lp, *pl, *next;
struct interface_info *ip = (struct interface_info *)0;
int token;
const char *val;
@@ -874,17 +890,19 @@ void parse_client_lease_statement (cfile, is_static)
lease list looking for a lease with the same address, and
if we find it, toss it. */
pl = (struct client_lease *)0;
- for (lp = client -> leases; lp; lp = lp -> next) {
+ for (lp = client -> leases; lp; lp = next) {
+ next = lp -> next;
if (lp -> address.len == lease -> address.len &&
!memcmp (lp -> address.iabuf, lease -> address.iabuf,
lease -> address.len)) {
if (pl)
- pl -> next = lp -> next;
+ pl -> next = next;
else
- client -> leases = lp -> next;
+ client -> leases = next;
destroy_client_lease (lp);
break;
- }
+ } else
+ pl = lp;
}
/* If this is a preloaded lease, just put it on the list of recorded
diff --git a/client/dhclient-script.8 b/client/dhclient-script.8
index 36eafbf2..078dfe3c 100644
--- a/client/dhclient-script.8
+++ b/client/dhclient-script.8
@@ -1,41 +1,34 @@
.\" dhclient-script.8
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhclient-script.8,v 1.9 2002/05/27 03:50:20 murray Exp $
+.\" $Id: dhclient-script.8,v 1.10 2005/03/17 20:14:55 dhankins Exp $
.\"
.TH dhclient-script 8
.SH NAME
@@ -100,7 +93,8 @@ script can modify the valid of exit_status to change the exit status
of dhclient-script.
.SH OPERATION
When dhclient needs to invoke the client configuration script, it
-writes a shell script into /tmp which defines a variety of variables.
+defines a set of variables in the environment, and then invokes
+.B CLIENTBINDIR/dhclient-script.
In all cases, $reason is set to the name of the reason why the script
has been invoked. The following reasons are currently defined:
MEDIUM, PREINIT, BOUND, RENEW, REBIND, REBOOT, EXPIRE, FAIL and TIMEOUT.
@@ -143,7 +137,7 @@ When a binding has been completed, a lot of network parameters are
likely to need to be set up. A new /etc/resolv.conf needs to be
created, using the values of $new_domain_name and
$new_domain_name_servers (which may list more than one server,
-seperated by spaces). A default route should be set using
+separated by spaces). A default route should be set using
$new_routers, and static routes may need to be set up using
$new_static_routes.
.PP
@@ -199,8 +193,8 @@ $new_static_routes, but current scripts do not do this.
.SH FILES
Each operating system should generally have its own script file,
although the script files for similar operating systems may be similar
-or even identical. The script files included in the Internet
-Software Consortium DHCP distribution appear in the distribution tree
+or even identical. The script files included in Internet
+Systems Consortium DHCP distribution appear in the distribution tree
under client/scripts, and bear the names of the operating systems on
which they are intended to work.
.SH BUGS
@@ -217,11 +211,11 @@ dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
dhclient.leases(5).
.SH AUTHOR
.B dhclient-script(8)
-has been written for the Internet Software Consortium
-by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+has been written for Internet Systems Consortium
+by Ted Lemon in cooperation with Vixie
+Enterprises. To learn more about Internet Systems Consortium,
see
-.B http://www.vix.com/isc.
+.B http://www.isc.org.
To learn more about Vixie
Enterprises, see
.B http://www.vix.com.
diff --git a/client/dhclient.8 b/client/dhclient.8
index 896c9cde..9c00737c 100644
--- a/client/dhclient.8
+++ b/client/dhclient.8
@@ -1,22 +1,30 @@
.\" dhclient.8
.\"
-.\" Copyright (c) 1996-1999 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:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" http://www.isc.org/isc-license-1.0.html.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" 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.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
.\" Support and other services are available for ISC products - see
.\" http://www.isc.org for more information.
.\"
-.\" $Id: dhclient.8,v 1.16 2002/06/08 08:22:09 murray Exp $
+.\" $Id: dhclient.8,v 1.17 2005/03/17 20:14:55 dhankins Exp $
.\"
.TH dhclient 8
.SH NAME
@@ -79,7 +87,7 @@ relay
]
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Client, dhclient, provides a
+The Internet Systems Consortium DHCP Client, dhclient, provides a
means for configuring one or more network interfaces using the Dynamic
Host Configuration Protocol, BOOTP protocol, or if these protocols
fail, by statically assigning an address.
@@ -285,13 +293,13 @@ resume it, set its state attribute to 4.
.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
.B DBDIR/dhclient.leases~.
.SH SEE ALSO
-dhcpd(8), dhcrelay(8), dhclient-script (8), dhclient.conf(5),
+dhcpd(8), dhcrelay(8), dhclient-script(8), dhclient.conf(5),
dhclient.leases(5).
.SH AUTHOR
.B dhclient(8)
-has been written for the Internet Software Consortium
+has been written for Internet Systems Consortium
by Ted Lemon in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+Enterprises. To learn more about Internet Systems Consortium,
see
.B http://www.isc.org
To learn more about Vixie
@@ -304,7 +312,7 @@ Stanford.
.PP
The current version owes much to Elliot's Linux enhancements, but
was substantially reorganized and partially rewritten by Ted Lemon
-so as to use the same networking framework that the Internet Software
+so as to use the same networking framework that the Internet Systems
Consortium DHCP server uses. Much system-specific configuration code
was moved into a shell script so that as support for more operating
systems is added, it will not be necessary to port and maintain
diff --git a/client/dhclient.c b/client/dhclient.c
index 26d84601..3f31650e 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -3,35 +3,26 @@
DHCP Client. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
* This code is based on the original client state machine that was
* written by Elliot Poger. The code has been extensively hacked on
@@ -41,13 +32,12 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.131 2001/08/10 10:47:33 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.132 2005/03/17 20:14:55 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
#include "version.h"
-TIME cur_time;
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
@@ -71,19 +61,19 @@ struct in_addr giaddr;
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
-static char copyright[] = "Copyright 1995-2001 Internet Software Consortium.";
+static char copyright[] = "Copyright 2004-2005 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Client";
+static char message [] = "Internet Systems Consortium DHCP Client";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
-u_int16_t local_port;
-u_int16_t remote_port;
-int no_daemon;
-struct string_list *client_env;
-int client_env_count;
-int onetry;
-int quiet;
-int nowait;
+u_int16_t local_port=0;
+u_int16_t remote_port=0;
+int no_daemon=0;
+struct string_list *client_env=NULL;
+int client_env_count=0;
+int onetry=0;
+int quiet=0;
+int nowait=0;
static void usage PROTO ((void));
@@ -192,14 +182,14 @@ int main (argc, argv, envp)
if (++i == argc)
usage ();
relay = argv [i];
+ } else if (!strcmp (argv [i], "-nw")) {
+ nowait = 1;
} else if (!strcmp (argv [i], "-n")) {
/* do not start up any interfaces */
interfaces_requested = 1;
} else if (!strcmp (argv [i], "-w")) {
/* do not exit if there are no broadcast interfaces. */
persist = 1;
- } else if (argv [i][0] == '-') {
- usage ();
} else if (!strcmp (argv [i], "-e")) {
struct string_list *tmp;
if (++i == argc)
@@ -214,9 +204,9 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "--version")) {
log_info ("isc-dhclient-%s", DHCP_VERSION);
exit (0);
- } else if (!strcmp (argv [i], "-nw")) {
- nowait = 1;
- } else {
+ } else if (argv [i][0] == '-') {
+ usage ();
+ } else {
struct interface_info *tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);
if (status != ISC_R_SUCCESS)
@@ -252,15 +242,24 @@ int main (argc, argv, envp)
/* first kill of any currently running client */
if (release_mode) {
- /* XXX inelegant hack to prove concept */
- char command[1024];
-
-#if !defined (NO_SNPRINTF)
- snprintf (command, 1024, "kill `cat %s`", path_dhclient_pid);
-#else
- sprintf (command, "kill `cat %s`", path_dhclient_pid);
-#endif
- system (command);
+ FILE *pidfd;
+ pid_t oldpid;
+ long temp;
+ int e;
+
+ oldpid = 0;
+ if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
+ e = fscanf(pidfd, "%ld\n", &temp);
+ oldpid = (pid_t)temp;
+
+ if (e != 0 && e != EOF) {
+ if (oldpid) {
+ if (kill(oldpid, SIGTERM) == 0)
+ unlink(path_dhclient_pid);
+ }
+ }
+ fclose(pidfd);
+ }
}
if (!quiet) {
@@ -289,8 +288,10 @@ int main (argc, argv, envp)
/* Default to the DHCP/BOOTP port. */
if (!local_port) {
+ /* If we're faking a relay agent, and we're not using loopback,
+ use the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
- local_port = htons (67);
+ local_port = htons(67);
} else {
ent = getservbyname ("dhcpc", "udp");
if (!ent)
@@ -304,13 +305,12 @@ int main (argc, argv, envp)
}
/* If we're faking a relay agent, and we're not using loopback,
- use the server port, not the client port. */
+ we're using the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
- local_port = htons (ntohs (local_port) - 1);
remote_port = local_port;
} else
remote_port = htons (ntohs (local_port) - 1); /* XXX */
-
+
/* Get the current time... */
GET_TIME (&cur_time);
@@ -783,11 +783,15 @@ void dhcpack (packet)
/* If it wasn't specified by the server, calculate it. */
if (!client -> new -> renewal)
- client -> new -> renewal =
- client -> new -> expiry / 2;
+ client -> new -> renewal = client -> new -> expiry / 2 + 1;
+
+ if (client -> new -> renewal <= 0)
+ client -> new -> renewal = TIME_MAX;
/* Now introduce some randomness to the renewal time: */
- client -> new -> renewal = (((client -> new -> renewal + 3) * 3 / 4) +
+ if (client -> new -> renewal <= TIME_MAX / 3 - 3)
+ client -> new -> renewal =
+ (((client -> new -> renewal + 3) * 3 / 4) +
(random () % /* XXX NUMS */
((client -> new -> renewal + 3) / 4)));
@@ -806,14 +810,25 @@ void dhcpack (packet)
} else
client -> new -> rebind = 0;
- if (!client -> new -> rebind)
- client -> new -> rebind =
- (client -> new -> expiry * 7) / 8; /* XXX NUMS */
+ if (client -> new -> rebind <= 0) {
+ if (client -> new -> expiry <= TIME_MAX / 7)
+ client -> new -> rebind =
+ client -> new -> expiry * 7 / 8;
+ else
+ client -> new -> rebind =
+ client -> new -> expiry / 8 * 7;
+ }
/* Make sure our randomness didn't run the renewal time past the
rebind time. */
- if (client -> new -> renewal > client -> new -> rebind)
- client -> new -> renewal = (client -> new -> rebind * 3) / 4;
+ if (client -> new -> renewal > client -> new -> rebind) {
+ if (client -> new -> rebind <= TIME_MAX / 3)
+ client -> new -> renewal =
+ client -> new -> rebind * 3 / 4;
+ else
+ client -> new -> renewal =
+ client -> new -> rebind / 4 * 3;
+ }
client -> new -> expiry += cur_time;
/* Lease lengths can never be negative. */
@@ -882,7 +897,11 @@ void bind_lease (client)
client -> state = S_BOUND;
reinitialize_interfaces ();
go_daemon ();
- client_dns_update (client, 1);
+ if (client -> config -> do_forward_update) {
+ client -> dns_update_timeout = 1;
+ add_timeout (cur_time + 1, client_dns_update_timeout,
+ client, 0, 0);
+ }
}
/* state_bound is called when we've successfully bound to a particular
@@ -917,6 +936,8 @@ void state_bound (cpp)
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
+
+ data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
@@ -1183,12 +1204,13 @@ struct client_lease *packet_to_lease (packet, client)
memcpy (lease -> address.iabuf, &packet -> raw -> yiaddr,
lease -> address.len);
+ memset (&data, 0, sizeof data);
+
if (client -> config -> vendor_space_name) {
i = DHO_VENDOR_ENCAPSULATED_OPTIONS;
/* See if there was a vendor encapsulation option. */
oc = lookup_option (&dhcp_universe, lease -> options, i);
- memset (&data, 0, sizeof data);
if (oc &&
client -> config -> vendor_space_name &&
evaluate_option_cache (&data, packet,
@@ -1231,7 +1253,7 @@ struct client_lease *packet_to_lease (packet, client)
break;
lease -> server_name = dmalloc (len + 1, MDL);
if (!lease -> server_name) {
- log_error ("dhcpoffer: no memory for filename.\n");
+ log_error ("dhcpoffer: no memory for server name.\n");
destroy_client_lease (lease);
return (struct client_lease *)0;
} else {
@@ -1378,9 +1400,9 @@ void send_discover (cpp)
/* If we're supposed to increase the interval, do so. If it's
currently zero (i.e., we haven't sent any packets yet), set
- it to one; otherwise, add to it a random number between
- zero and two times itself. On average, this means that it
- will double with every transmission. */
+ it to initial_interval; otherwise, add to it a random number
+ between zero and two times itself. On average, this means
+ that it will double with every transmission. */
if (increase) {
if (!client -> interval)
client -> interval =
@@ -1624,7 +1646,8 @@ void send_request (cpp)
client -> config -> backoff_cutoff)
client -> interval =
((client -> config -> backoff_cutoff / 2)
- + ((random () >> 2) % client -> interval));
+ + ((random () >> 2) %
+ client -> config -> backoff_cutoff));
/* If the backoff would take us to the expiry time, just set the
timeout to the expiry time. */
@@ -1863,10 +1886,18 @@ void make_discover (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
- (struct lease *)0, client, 0,
- (struct option_state *)0, options,
- &global_scope, 0, 0, 0, (struct data_string *)0,
+ (struct lease *)0, client,
+ /* maximum packet size */1500,
+ (struct option_state *)0,
+ options,
+ /* scope */ &global_scope,
+ /* overload */ 0,
+ /* terminate */0,
+ /* bootpp */0,
+ (struct data_string *)0,
client -> config -> vendor_space_name);
+
+ option_state_dereference (&options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@@ -1918,6 +1949,9 @@ void make_request (client, lease)
else
oc = (struct option_cache *)0;
+ if (client -> sent_options)
+ option_state_dereference (&client -> sent_options, MDL);
+
make_client_options (client, lease, &request, oc,
((client -> state == S_REQUESTING ||
client -> state == S_REBOOTING)
@@ -1929,10 +1963,17 @@ void make_request (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
- (struct lease *)0, client, 0,
- (struct option_state *)0, client -> sent_options,
- &global_scope, 0, 0, 0, (struct data_string *)0,
+ (struct lease *)0, client,
+ /* maximum packet size */1500,
+ (struct option_state *)0,
+ client -> sent_options,
+ /* scope */ &global_scope,
+ /* overload */ 0,
+ /* terminate */0,
+ /* bootpp */0,
+ (struct data_string *)0,
client -> config -> vendor_space_name);
+
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@@ -2003,6 +2044,7 @@ void make_decline (client, lease)
(struct option_state *)0, options,
&global_scope, 0, 0, 0, (struct data_string *)0,
client -> config -> vendor_space_name);
+ option_state_dereference (&options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
option_state_dereference (&options, MDL);
@@ -2056,10 +2098,17 @@ void make_release (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
- (struct lease *)0, client, 0,
- (struct option_state *)0, options,
- &global_scope, 0, 0, 0, (struct data_string *)0,
+ (struct lease *)0, client,
+ /* maximum packet size */1500,
+ (struct option_state *)0,
+ options,
+ /* scope */ &global_scope,
+ /* overload */ 0,
+ /* terminate */0,
+ /* bootpp */0,
+ (struct data_string *)0,
client -> config -> vendor_space_name);
+
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
option_state_dereference (&options, MDL);
@@ -2781,6 +2830,8 @@ void do_release(client)
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
+
+ data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
client -> first_sending = cur_time;
@@ -2960,7 +3011,8 @@ isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
case server_shutdown:
if (client -> active &&
client -> active -> expiry > cur_time) {
- client_dns_update (client, 0);
+ if (client -> config -> do_forward_update)
+ client_dns_update (client, 0, 0);
do_release (client);
}
break;
@@ -2980,9 +3032,30 @@ isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
return ISC_R_SUCCESS;
}
+/* Called after a timeout if the DNS update failed on the previous try.
+ Retries the update, and if it times out, schedules a retry after
+ ten times as long of a wait. */
+
+void client_dns_update_timeout (void *cp)
+{
+ struct client_state *client = cp;
+ isc_result_t status;
+
+ if (client -> active) {
+ status = client_dns_update (client, 1,
+ (client -> active -> renewal -
+ cur_time));
+ if (status == ISC_R_TIMEDOUT) {
+ client -> dns_update_timeout *= 10;
+ add_timeout (cur_time + client -> dns_update_timeout,
+ client_dns_update_timeout, client, 0, 0);
+ }
+ }
+}
+
/* See if we should do a DNS update, and if so, do it. */
-void client_dns_update (struct client_state *client, int addp)
+isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
{
struct data_string ddns_fqdn, ddns_fwd_name,
ddns_dhcid, client_identifier;
@@ -2994,11 +3067,11 @@ void client_dns_update (struct client_state *client, int addp)
/* If we didn't send an FQDN option, we certainly aren't going to
be doing an update. */
if (!client -> sent_options)
- return;
+ return ISC_R_SUCCESS;
/* If we don't have a lease, we can't do an update. */
if (!client -> active)
- return;
+ return ISC_R_SUCCESS;
/* If we set the no client update flag, don't do the update. */
if ((oc = lookup_option (&fqdn_universe, client -> sent_options,
@@ -3008,7 +3081,7 @@ void client_dns_update (struct client_state *client, int addp)
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* If we set the "server, please update" flag, or didn't set it
to false, don't do the update. */
@@ -3019,7 +3092,7 @@ void client_dns_update (struct client_state *client, int addp)
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* If no FQDN option was supplied, don't do the update. */
memset (&ddns_fwd_name, 0, sizeof ddns_fwd_name);
@@ -3030,7 +3103,7 @@ void client_dns_update (struct client_state *client, int addp)
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* Make a dhcid string out of either the client identifier,
if we are sending one, or the interface's MAC address,
@@ -3056,7 +3129,7 @@ void client_dns_update (struct client_state *client, int addp)
client -> interface -> hw_address.hlen);
if (!result) {
data_string_forget (&ddns_fwd_name, MDL);
- return;
+ return ISC_R_SUCCESS;
}
/* Start the resolver, if necessary. */
@@ -3074,14 +3147,16 @@ void client_dns_update (struct client_state *client, int addp)
if (addp)
rcode = ddns_update_a (&ddns_fwd_name,
client -> active -> address,
- &ddns_dhcid, DEFAULT_DDNS_TTL,
+ &ddns_dhcid, ttl,
1);
else
rcode = ddns_remove_a (&ddns_fwd_name,
client -> active -> address,
&ddns_dhcid);
- }
+ } else
+ rcode = ISC_R_FAILURE;
data_string_forget (&ddns_fwd_name, MDL);
data_string_forget (&ddns_dhcid, MDL);
+ return rcode;
}
diff --git a/client/dhclient.conf.5 b/client/dhclient.conf.5
index 34652e5e..ba9583c8 100644
--- a/client/dhclient.conf.5
+++ b/client/dhclient.conf.5
@@ -1,41 +1,34 @@
-.\" dhclient.conf.5
+.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Software Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Software Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhclient.conf.5,v 1.14 2002/05/27 03:50:55 murray Exp $
+.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins Exp $
.\"
.TH dhclient.conf 5
.SH NAME
@@ -43,7 +36,7 @@ dhclient.conf - DHCP client configuration file
.SH DESCRIPTION
The dhclient.conf file contains configuration information for
.IR dhclient,
-the Internet Software Consortium DHCP Client.
+the Internet Systems Consortium DHCP Client.
.PP
The dhclient.conf file is a free-form ASCII text file. It is parsed by
the recursive-descent parser built into dhclient. The file may contain
@@ -155,7 +148,8 @@ so that if many clients try to configure themselves at the same time,
they will not make their requests in lockstep. The
.I backoff-cutoff
statement determines the maximum amount of time that the client is
-allowed to back off. It defaults to two minutes.
+allowed to back off, the actual value will be evaluated randomly between
+1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes.
.PP
.I The
.B initial-interval
@@ -250,6 +244,22 @@ The \fIfqdn.fqdn\fR option \fBMUST\fR be a fully-qualified domain
name. You \fBMUST\fR define a zone statement for the zone to be
updated. The \fIfqdn.encoded\fR option may need to be set to
\fIon\fR or \fIoff\fR, depending on the DHCP server you are using.
+.PP
+.I The
+.B do-forward-updates
+.I statement
+.PP
+ \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR
+.PP
+If you want to do DNS updates in the DHCP client
+script (see \fBdhclient-script(8)\fR) rather than having the
+DHCP client do the update directly (for example, if you want to
+use SIG(0) authentication, which is not supported directly by the
+DHCP client, you can instruct the client not to do the update using
+the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR
+if you want the DHCP client to do the update, and \fBfalse\fR if
+you don't want the DHCP client to do the update. By default, the DHCP
+client will do the DNS update.
.SH OPTION MODIFIERS
In some cases, a client may receive option data from the server which
is not really appropriate for that client, or may not receive
@@ -322,7 +332,7 @@ enforced - if you ignore it, the behaviour will be unpredictable.
\fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR
.PP
The DHCP client may decide after some period of time (see \fBPROTOCOL
-TIMING\fR) decide that it is not going to succeed in contacting a
+TIMING\fR) that it is not going to succeed in contacting a
server. At that time, it consults its own database of old leases and
tests each one that has not yet timed out by pinging the listed router
for that lease to see if that lease could work. It is possible to
@@ -430,10 +440,10 @@ automatically determine the type of network to which they are
connected. The media setup string is a system-dependent parameter
which is passed to the dhcp client configuration script when
initializing the interface. On Unix and Unix-like systems, the
-argument is passed on the ifconfig command line when configuring te
+argument is passed on the ifconfig command line when configuring the
interface.
.PP
-The dhcp client automatically declares this parameter if it used a
+The dhcp client automatically declares this parameter if it uses a
media type (see the
.B media
statement) when configuring the interface in order to obtain a lease.
@@ -479,7 +489,7 @@ second also a number between 0 and 59.
Some DHCP clients running TCP/IP roaming protocols may require that in
addition to the lease they may acquire via DHCP, their interface also
be configured with a predefined IP alias so that they can have a
-permanent IP address even while roaming. The Internet Software
+permanent IP address even while roaming. The Internet Systems
Consortium DHCP client doesn't support roaming with fixed addresses
directly, but in order to facilitate such experimentation, the dhcp
client can be set up to configure an IP alias using the
@@ -496,7 +506,9 @@ declaration.
.SH OTHER DECLARATIONS
\fBreject \fIip-address\fB;\fR
.PP
-The reject statement causes the DHCP client to reject offers from
+The
+.B reject
+statement causes the DHCP client to reject offers from
servers who use the specified address as a server identifier. This
can be used to avoid being configured by rogue or misconfigured dhcp
servers, although it should be a last resort - better to track down
@@ -523,7 +535,7 @@ A pseudo-interface is just another state machine running on the
interface named \fIreal-name\fR, with its own lease and its own
state. If you use this feature, you must provide a client identifier
for both the pseudo-interface and the actual interface, and the two
-identifiers must be different. You must also provide a seperate
+identifiers must be different. You must also provide a separate
client script for the pseudo-interface to do what you want with the IP
address. For example:
.PP
@@ -557,7 +569,7 @@ succeeds in getting a request to the server and hearing the reply is
probably right (no guarantees).
.PP
The media setup is only used for the initial phase of address
-acquisition (the DHCPDISCOVER and DHCPOFFER packtes). Once an
+acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an
address has been acquired, the dhcp client will record it in its lease
database and will record the media type used to acquire the address.
Whenever the client tries to renew the lease, it will use that same
@@ -589,7 +601,7 @@ interface "ep0" {
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
- script "/etc/dhclient-script";
+ script "CLIENTBINDIR/dhclient-script";
media "media 10baseT/UTP", "media 10base2/BNC";
}
@@ -607,8 +619,8 @@ dhcp-options(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5), RFC2132,
RFC2131.
.SH AUTHOR
.B dhclient(8)
-was written by Ted Lemon <mellon@vix.com>
+was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
diff --git a/client/dhclient.leases.5 b/client/dhclient.leases.5
index cfc215b7..7ccded7d 100644
--- a/client/dhclient.leases.5
+++ b/client/dhclient.leases.5
@@ -1,48 +1,39 @@
-.\" dhclient.conf.5
+.\" $Id: dhclient.leases.5,v 1.4 2005/03/17 20:14:56 dhankins Exp $
.\"
-.\" Copyright (c) 1997 The Internet Software Consortium.
-.\" All rights reserved.
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1997-2003 by Internet Software Consortium
.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
-.\" This software has been written for the Internet Software Consortium
-.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
-.\" Enterprises. To learn more about the Internet Software Consortium,
+.\" This software has been written for Internet Systems Consortium
+.\" by Ted Lemon in cooperation with Vixie
+.\" Enterprises. To learn more about Internet Systems Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
-.\" $Id: dhclient.leases.5,v 1.3 2002/05/27 03:50:56 murray Exp $
+.\" $Id: dhclient.leases.5,v 1.4 2005/03/17 20:14:56 dhankins Exp $
.\"
.TH dhclient.leases 5
.SH NAME
dhclient.leases - DHCP client lease database
.SH DESCRIPTION
-The Internet Software Consortium DHCP client keeps a persistent
+The Internet Systems Consortium DHCP client keeps a persistent
database of leases that it has acquired that are still valid. The
database is a free-form ASCII file containing one valid declaration
per lease. If more than one declaration appears for a given lease,
@@ -58,8 +49,8 @@ dhclient(8), dhcp-options(5), dhclient.conf(5), dhcpd(8),
dhcpd.conf(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhclient(8)
-was written by Ted Lemon <mellon@vix.com>
+was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
diff --git a/client/scripts/freebsd b/client/scripts/freebsd
index 61937321..2f0623ef 100755
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -1,4 +1,8 @@
#!/bin/sh
+#
+# $Id: freebsd,v 1.16 2005/03/17 20:14:56 dhankins Exp $
+#
+# $FreeBSD$
if [ -x /usr/bin/logger ]; then
LOGGER="/usr/bin/logger -s -p user.notice -t dhclient"
@@ -9,13 +13,24 @@ fi
make_resolv_conf() {
if [ x"$new_domain_name_servers" != x ]; then
if [ "x$new_domain_name" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
+ ( echo search $new_domain_name >/etc/resolv.conf )
+ exit_status=$?
else
- rm /etc/resolv.conf
+ if [ -e /etc/resolv.conf ] ; then
+ ( rm /etc/resolv.conf )
+ exit_status=$?
+ else
+ ( touch /etc/resolv.conf )
+ exit_status=$?
+ fi
+ fi
+ if [ $exit_status -ne 0 ]; then
+ $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
+ else
+ for nameserver in $new_domain_name_servers; do
+ ( echo nameserver $nameserver >>/etc/resolv.conf )
+ done
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
fi
}
@@ -84,7 +99,7 @@ fi
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
- current_hostname=`hostname`
+ current_hostname=`/bin/hostname`
if [ x$current_hostname = x ] || \
[ x$current_hostname = x$old_host_name ]; then
if [ x$current_hostname = x ] || \
@@ -105,7 +120,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
@@ -118,17 +133,17 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
- $LOGGER "New IP Address($interface): $new_ip_address"
- $LOGGER "New Subnet Mask($interface): $new_subnet_mask"
- $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
- if [ "$new_routers" != "" ]; then
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
+ if [ -n "$new_routers" ]; then
$LOGGER "New Routers: $new_routers"
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
done
- if [ "$new_static_routes" != "" ]; then
+ if [ -n "$new_static_routes" ]; then
$LOGGER "New Static Routes: $new_static_routes"
set -- $new_static_routes
while [ $# -gt 1 ]; do
@@ -158,14 +173,14 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
shift; shift
done
fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
|sh >/dev/null 2>&1
fi
if [ x$alias_ip_address != x ]; then
@@ -182,11 +197,11 @@ if [ x$reason = xTIMEOUT ]; then
fi
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
- $LOGGER "New IP Address($interface): $new_ip_address"
- $LOGGER "New Subnet Mask($interface): $new_subnet_mask"
- $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
sleep 1
- if [ "$new_routers" != "" ]; then
+ if [ -n "$new_routers" ]; then
$LOGGER "New Routers: $new_routers"
set -- $new_routers
if ping -q -c 1 $1; then
@@ -212,7 +227,7 @@ if [ x$reason = xTIMEOUT ]; then
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
diff --git a/client/scripts/linux b/client/scripts/linux
index 6598b90e..31ddd2fe 100755
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# dhclient-script for Linux. Dan Halbert, March, 1997.
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
# No guarantees about this. I'm a novice at the details of Linux
@@ -22,9 +22,10 @@
# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
# of the $1 in its args.
-function make_resolv_conf() {
+make_resolv_conf() {
if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
+ chmod 644 /etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done
@@ -32,7 +33,7 @@ function make_resolv_conf() {
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
-function exit_with_hooks() {
+exit_with_hooks() {
exit_status=$1
if [ -f /etc/dhclient-exit-hooks ]; then
. /etc/dhclient-exit-hooks
diff --git a/common/Makefile.dist b/common/Makefile.dist
index b62f31f9..5e40a0f5 100644
--- a/common/Makefile.dist
+++ b/common/Makefile.dist
@@ -1,16 +1,36 @@
# Makefile.dist
-
-CATMANPAGES = dhcp-options.cat5 dhcp-contrib.cat5 dhcp-eval.cat5
-SEDMANPAGES = dhcp-options.man5 dhcp-contrib.man5 dhcp-eval.man5
+#
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
+
+CATMANPAGES = dhcp-options.cat5 dhcp-eval.cat5
+SEDMANPAGES = dhcp-options.man5 dhcp-eval.man5
SRC = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
- inet.c tree.c tables.c alloc.c fddi.c ctrace.c \
- dns.c resolv.c execute.c discover.c comapi.c
+ inet.c tree.c tables.c alloc.c fddi.c ctrace.c dns.c resolv.c \
+ execute.c discover.c comapi.c
OBJ = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o \
- inet.o tree.o tables.o alloc.o fddi.o ctrace.o \
- dns.o resolv.o execute.o discover.o comapi.o
-MAN = dhcp-options.5 dhcp-contrib.5 dhcp-eval.5
+ inet.o tree.o tables.o alloc.o fddi.o ctrace.o dns.o resolv.o \
+ execute.o discover.o comapi.o
+MAN = dhcp-options.5 dhcp-eval.5
INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
@@ -37,8 +57,6 @@ install: all
$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
$(MANINSTALL) $(MANFROM) dhcp-eval.$(MANCAT)5 $(MANTO) \
$(DESTDIR)$(FFMANDIR)/dhcp-eval$(FFMANEXT)
- $(MANINSTALL) $(MANFROM) dhcp-contrib.$(MANCAT)5 $(MANTO) \
- $(DESTDIR)$(FFMANDIR)/dhcp-contrib$(FFMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
@@ -74,11 +92,4 @@ dhcp-eval.man5: dhcp-eval.5
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcp-eval.5 >dhcp-eval.man5
-dhcp-contrib.cat5: dhcp-contrib.man5
- nroff -man dhcp-contrib.man5 >dhcp-contrib.cat5
-
-dhcp-contrib.man5: dhcp-contrib.5
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < dhcp-contrib.5 >dhcp-contrib.man5
-
# Dependencies (semi-automatically-generated)
diff --git a/common/alloc.c b/common/alloc.c
index 3bf8393c..deed7b6e 100644
--- a/common/alloc.c
+++ b/common/alloc.c
@@ -3,39 +3,30 @@
Memory allocation... */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: alloc.c,v 1.54 2001/06/27 00:29:39 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: alloc.c,v 1.55 2005/03/17 20:14:56 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -109,7 +100,7 @@ int option_chain_head_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -134,8 +125,8 @@ int option_chain_head_dereference (ptr, file, line)
option_chain_head = *ptr;
*ptr = (struct option_chain_head *)0;
--option_chain_head -> refcnt;
- rc_register (file, line, ptr,
- option_chain_head, option_chain_head -> refcnt, 1);
+ rc_register (file, line, ptr, option_chain_head,
+ option_chain_head -> refcnt, 1, RC_MISC);
if (option_chain_head -> refcnt > 0)
return 1;
@@ -222,7 +213,7 @@ int group_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -246,7 +237,7 @@ int group_dereference (ptr, file, line)
group = *ptr;
*ptr = (struct group *)0;
--group -> refcnt;
- rc_register (file, line, ptr, group, group -> refcnt, 1);
+ rc_register (file, line, ptr, group, group -> refcnt, 1, RC_MISC);
if (group -> refcnt > 0)
return 1;
@@ -496,7 +487,7 @@ int expression_reference (ptr, src, file, line)
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
@@ -570,7 +561,7 @@ int binding_value_reference (ptr, src, file, line)
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
@@ -636,7 +627,7 @@ int fundef_reference (ptr, src, file, line)
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
@@ -701,7 +692,7 @@ int option_cache_reference (ptr, src, file, line)
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
@@ -745,7 +736,7 @@ int buffer_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -775,7 +766,7 @@ int buffer_dereference (ptr, file, line)
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt) {
dfree ((*ptr), file, line);
} else if ((*ptr) -> refcnt < 0) {
@@ -834,7 +825,7 @@ int dns_host_entry_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -855,7 +846,7 @@ int dns_host_entry_dereference (ptr, file, line)
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt)
dfree ((*ptr), file, line);
if ((*ptr) -> refcnt < 0) {
@@ -903,7 +894,8 @@ int option_state_allocate (ptr, file, line)
memset (*ptr, 0, size);
(*ptr) -> universe_count = universe_count;
(*ptr) -> refcnt = 1;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 0);
+ rc_register (file, line,
+ ptr, *ptr, (*ptr) -> refcnt, 0, RC_MISC);
return 1;
}
return 0;
@@ -933,7 +925,7 @@ int option_state_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -957,7 +949,7 @@ int option_state_dereference (ptr, file, line)
options = *ptr;
*ptr = (struct option_state *)0;
--options -> refcnt;
- rc_register (file, line, ptr, options, options -> refcnt, 1);
+ rc_register (file, line, ptr, options, options -> refcnt, 1, RC_MISC);
if (options -> refcnt > 0)
return 1;
@@ -1021,7 +1013,7 @@ int executable_statement_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -1103,7 +1095,7 @@ int packet_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -1127,7 +1119,7 @@ int packet_dereference (ptr, file, line)
packet = *ptr;
*ptr = (struct packet *)0;
--packet -> refcnt;
- rc_register (file, line, ptr, packet, packet -> refcnt, 1);
+ rc_register (file, line, ptr, packet, packet -> refcnt, 1, RC_MISC);
if (packet -> refcnt > 0)
return 1;
@@ -1217,7 +1209,7 @@ int dns_zone_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
@@ -1278,7 +1270,7 @@ int binding_scope_reference (ptr, bp, file, line)
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
diff --git a/common/bpf.c b/common/bpf.c
index 86022d16..90083b30 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -3,42 +3,29 @@
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software was contributed to the Internet Software Consortium
- * by Archie Cobbs, and is now maintained by Ted Lemon in cooperation
- * with Nominum, Inc. To learn more about the Internet Software
- * Consortium, see ``http://www.isc.org/''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''. To learn more about
- * Nominum, Inc., see ``http://www.nominum.com''.
+ * This software was contributed to Internet Systems Consortium
+ * by Archie Cobbs.
*
* Patches for FDDI support on Digital Unix were written by Bill
* Stapleton, and maintained for a while by Mike Meredith before he
@@ -47,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.49 2002/06/08 09:28:15 murray Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.50 2005/03/17 20:14:56 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -103,11 +90,8 @@ int if_register_bpf (info)
/* Open a BPF device */
for (b = 0; 1; b++) {
-#ifndef NO_SNPRINTF
- snprintf(filename, sizeof(filename), BPF_FORMAT, b);
-#else
+ /* %Audit% 31 bytes max. %2004.06.17,Safe% */
sprintf(filename, BPF_FORMAT, b);
-#endif
sock = open (filename, O_RDWR, 0);
if (sock < 0) {
if (errno == EBUSY) {
@@ -421,7 +405,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
if (interface -> rbuf_offset == interface -> rbuf_len) {
length = read (interface -> rfdesc,
interface -> rbuf,
- interface -> rbuf_max);
+ (size_t)interface -> rbuf_max);
if (length <= 0) {
#ifdef __FreeBSD__
if (errno == ENXIO) {
@@ -494,7 +478,6 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
interface -> rbuf,
interface -> rbuf_offset,
from,
- (unsigned char *)0,
hdr.bh_caplen);
/* If the IP or UDP checksum was bad, skip the packet... */
diff --git a/common/comapi.c b/common/comapi.c
index 68c0e1fe..bdeb990a 100644
--- a/common/comapi.c
+++ b/common/comapi.c
@@ -3,39 +3,30 @@
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -50,7 +41,7 @@
#ifndef lint
static char copyright[] =
-"$Id: comapi.c,v 1.10 2001/06/27 00:29:41 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: comapi.c,v 1.11 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -84,7 +75,7 @@ void dhcp_common_objects_setup ()
dhcp_control_create,
dhcp_control_remove, 0, 0, 0,
sizeof (dhcp_control_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register control object type: %s",
isc_result_totext (status));
@@ -104,7 +95,8 @@ void dhcp_common_objects_setup ()
dhcp_group_lookup,
dhcp_group_create,
dhcp_group_remove, 0, 0, 0,
- sizeof (struct group_object), 0);
+ sizeof (struct group_object), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register group object type: %s",
isc_result_totext (status));
@@ -119,7 +111,8 @@ void dhcp_common_objects_setup ()
dhcp_subnet_lookup,
dhcp_subnet_create,
dhcp_subnet_remove, 0, 0, 0,
- sizeof (struct subnet), 0);
+ sizeof (struct subnet), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register subnet object type: %s",
isc_result_totext (status));
@@ -135,7 +128,7 @@ void dhcp_common_objects_setup ()
dhcp_shared_network_lookup,
dhcp_shared_network_create,
dhcp_shared_network_remove, 0, 0, 0,
- sizeof (struct shared_network), 0);
+ sizeof (struct shared_network), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register shared network object type: %s",
isc_result_totext (status));
diff --git a/common/conflex.c b/common/conflex.c
index 76db7be6..509b9911 100644
--- a/common/conflex.c
+++ b/common/conflex.c
@@ -3,39 +3,30 @@
Lexical scanner for dhcpd config file... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: conflex.c,v 1.94 2001/06/27 00:29:42 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: conflex.c,v 1.95 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -312,8 +303,8 @@ static enum dhcp_token read_string (cfile)
int i;
int bs = 0;
int c;
- int value;
- int hex;
+ int value = 0;
+ int hex = 0;
for (i = 0; i < sizeof cfile -> tokbuf; i++) {
again:
@@ -419,37 +410,85 @@ static enum dhcp_token read_number (c, cfile)
int c;
struct parse *cfile;
{
+#ifdef OLD_LEXER
int seenx = 0;
+#endif
int i = 0;
int token = NUMBER;
cfile -> tokbuf [i++] = c;
for (; i < sizeof cfile -> tokbuf; i++) {
c = get_char (cfile);
- if (!seenx && c == 'x') {
- seenx = 1;
+
#ifndef OLD_LEXER
- } else if (isascii (c) && !isxdigit (c) &&
- (c == '-' || c == '_' || isalpha (c))) {
- token = NAME;
- } else if (isascii (c) && !isdigit (c) && isxdigit (c)) {
- token = NUMBER_OR_NAME;
-#endif
+ /* Promote NUMBER -> NUMBER_OR_NAME -> NAME, never demote.
+ * Except in the case of '0x' syntax hex, which gets called
+ * a NAME at '0x', and returned to NUMBER_OR_NAME once it's
+ * verified to be at least 0xf or less.
+ */
+ switch(isascii(c) ? token : BREAK) {
+ case NUMBER:
+ if(isdigit(c))
+ break;
+ /* FALLTHROUGH */
+ case NUMBER_OR_NAME:
+ if(isxdigit(c)) {
+ token = NUMBER_OR_NAME;
+ break;
+ }
+ /* FALLTHROUGH */
+ case NAME:
+ if((i == 2) && isxdigit(c) &&
+ (cfile->tokbuf[0] == '0') &&
+ ((cfile->tokbuf[1] == 'x') ||
+ (cfile->tokbuf[1] == 'X'))) {
+ token = NUMBER_OR_NAME;
+ break;
+ } else if(((c == '-') || (c == '_') || isalnum(c))) {
+ token = NAME;
+ break;
+ }
+ /* FALLTHROUGH */
+ case BREAK:
+ /* At this point c is either EOF or part of the next
+ * token. If not EOF, rewind the file one byte so
+ * the next token is read from there.
+ */
+ if(c != EOF) {
+ cfile->bufix--;
+ cfile->ugflag = 1;
+ }
+ goto end_read;
+
+ default:
+ log_fatal("read_number():%s:%d: impossible case", MDL);
+ }
+#else /* OLD_LEXER */
+ if (!seenx && (c == 'x') {
+ seenx = 1;
} else if (!isascii (c) || !isxdigit (c)) {
- cfile -> bufix--;
- cfile -> ugflag = 1;
+ if (c != EOF) {
+ cfile -> bufix--;
+ cfile -> ugflag = 1;
+ }
break;
}
+#endif /* OLD_LEXER */
+
cfile -> tokbuf [i] = c;
}
+
if (i == sizeof cfile -> tokbuf) {
parse_warn (cfile,
"numeric token larger than internal buffer");
--i;
}
+
+ end_read:
cfile -> tokbuf [i] = 0;
cfile -> tlen = i;
cfile -> tval = cfile -> tokbuf;
+
return token;
}
@@ -464,8 +503,10 @@ static enum dhcp_token read_num_or_name (c, cfile)
c = get_char (cfile);
if (!isascii (c) ||
(c != '-' && c != '_' && !isalnum (c))) {
- cfile -> bufix--;
- cfile -> ugflag = 1;
+ if (c != EOF) {
+ cfile -> bufix--;
+ cfile -> ugflag = 1;
+ }
break;
}
if (!isxdigit (c))
@@ -608,6 +649,8 @@ static enum dhcp_token intern (atom, dfv)
return DOMAIN;
if (!strcasecmp (atom + 1, "omain-name"))
return DOMAIN_NAME;
+ if (!strcasecmp (atom + 1, "o-forward-update"))
+ return DO_FORWARD_UPDATE;
if (!strcasecmp (atom + 1, "ebug"))
return TOKEN_DEBUG;
if (!strcasecmp (atom + 1, "eny"))
@@ -745,8 +788,13 @@ static enum dhcp_token intern (atom, dfv)
return IGNORE;
break;
case 'k':
- if (!strcasecmp (atom + 1, "nown"))
- return KNOWN;
+ if (!strncasecmp (atom + 1, "nown", 4)) {
+ if (!strcasecmp (atom + 5, "-clients"))
+ return KNOWN_CLIENTS;
+ if (!atom[5])
+ return KNOWN;
+ break;
+ }
if (!strcasecmp (atom + 1, "ey"))
return KEY;
break;
diff --git a/common/ctrace.c b/common/ctrace.c
index bea933cb..e5042ec6 100644
--- a/common/ctrace.c
+++ b/common/ctrace.c
@@ -3,42 +3,38 @@
Subroutines that support dhcp tracing... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about the Internet Software Consortium, see http://www.isc.org/. To
+ * about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: ctrace.c,v 1.4 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include "dhcpd.h"
#if defined (TRACING)
@@ -155,6 +151,7 @@ void trace_inpacket_stash (struct interface_info *interface,
return;
tip.from_port = from_port;
tip.from = from;
+ tip.from.len = htonl (tip.from.len);
if (hfrom) {
tip.hfrom = *hfrom;
tip.havehfrom = 1;
@@ -182,6 +179,7 @@ void trace_inpacket_input (trace_type_t *ttype, unsigned len, char *buf)
}
tip = (trace_inpacket_t *)buf;
index = ntohl (tip -> index);
+ tip -> from.len = ntohl (tip -> from.len);
if (index > interface_count ||
index < 0 ||
diff --git a/common/dhcp-eval.5 b/common/dhcp-eval.5
index 3b80ad87..61f6fd3b 100644
--- a/common/dhcp-eval.5
+++ b/common/dhcp-eval.5
@@ -1,36 +1,29 @@
-.\" dhcp-eval.5
+.\" $Id: dhcp-eval.5,v 1.19 2005/03/17 20:14:57 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -38,7 +31,7 @@
.SH NAME
dhcp-eval - ISC DHCP conditional evaluation
.SH DESCRIPTION
-The Internet Software Consortium DHCP client and server both provide
+The Internet Systems Consortium DHCP client and server both provide
the ability to perform conditional behavior depending on the contents
of packets they receive. The syntax for specifying this conditional
behaviour is documented here.
@@ -218,6 +211,13 @@ The \fBoption\fR operator returns the contents of the specified option in
the packet to which the server is responding.
.RE
.PP
+.B config-option \fIoption-name\fR
+.PP
+.RS 0.25i
+The \fBconfig-option\fR operator returns the value for the specified option
+that the DHCP client or server has been configured to send.
+.RE
+.PP
.B hardware
.PP
.RS 0.25i
@@ -246,18 +246,18 @@ contents packet as in the \fBsubstring\fR operator.
.RS 0.25i
A string, enclosed in quotes, may be specified as a data expression,
and returns the text between the quotes, encoded in ASCII. The
-backslash ('\\') character is treated specially, as in C programming:
-'\\t' means TAB, '\\r' means carriage return, '\\n' means newline, and
-'\\b' means bell. Any octal value can be specified with '\\nnn',
-where nnn is any positive octal number less than 0400. Any
-hexadecimal value can be specified with '\xnn', where nn is any
-positive hexadecimal number less than 0xff.
+backslash ('\\') character is treated specially, as in C programming: '\\t'
+means TAB, '\\r' means carriage return, '\\n' means newline, and '\\b' means
+bell. Any octal value can be specified with '\\nnn', where nnn is any
+positive octal number less than 0400. Any hexadecimal value can be
+specified with '\\xnn', where nn is any positive hexadecimal number less
+than or equal to 0xff.
.RE
.PP
-.I colon-seperated hexadecimal list
+.I colon-separated hexadecimal list
.PP
.RS 0.25i
-A list of hexadecimal octet values, seperated by colons, may be
+A list of hexadecimal octet values, separated by colons, may be
specified as a data expression.
.RE
.PP
@@ -293,7 +293,7 @@ address.
.RS 0.25i
Converts the result of evaluating data-expr2 into a text string
containing one number for each element of the result of evaluating
-data-expr2. Each number is seperated from the other by the result of
+data-expr2. Each number is separated from the other by the result of
evaluating data-expr1. The result of evaluating numeric-expr1
specifies the base (2 through 16) into which the numbers should be
converted. The result of evaluating numeric-expr2 specifies the
@@ -317,6 +317,7 @@ Numeric-expr is evaluated and encoded as a data string of the
specified width, in network byte order (most significant byte first).
If the numeric expression evaluates to the null value, the result is
also null.
+.RE
.PP
.B pick-first-value (\fIdata-expr1\fR [ ... \fIexpr\fRn ] \fB)\fR
.RS 0.25i
@@ -414,7 +415,7 @@ Logging statements may be used to send information to the standard logging
channels. A logging statement includes an optional priority (\fBfatal\fR,
\fBerror\fR, \fBinfo\fR, or \fBdebug\fR), and a data expression.
.PP
-.B log (\fIpriority\fB, \fIdata-expr\FB)\fR
+.B log (\fIpriority\fB, \fIdata-expr\fB)\fR
.PP
Logging statements take only a single data expression argument, so if you
want to output multiple data values, you will need to use the \fBconcat\fR
@@ -446,7 +447,7 @@ right hand side of the RR and the ttl that should be applied to the
record. The simplest example of the use of the function can be found
in the reference section of the dhcpd.conf file, where events are
described. In this example several statements are being used to make
-the arguments to the \fBdns-update\f\R.
+the arguments to the \fBdns-update\fR.
.PP
In the example, the first argument to the first \f\Bdns-update\fR
expression is a data expression that evaluates to the A RR type. The
@@ -470,8 +471,8 @@ of the client to which the address is being leased.
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
dhclient(8), RFC2132, RFC2131.
.SH AUTHOR
-The Internet Software Consortium DHCP Distribution was written by Ted
-Lemon <mellon@isc.org> under a contract with Vixie Labs. Funding for
-this project was provided through the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
-.B http://www.isc.org/isc.
+The Internet Systems Consortium DHCP Distribution was written by Ted
+Lemon under a contract with Vixie Labs. Funding for
+this project was provided through Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
index 22470bdb..25c003b3 100644
--- a/common/dhcp-options.5
+++ b/common/dhcp-options.5
@@ -1,41 +1,34 @@
-.\" dhcp-options.5
+.\" $Id: dhcp-options.5,v 1.24 2005/03/17 20:14:57 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcp-options.5,v 1.23 2002/06/10 00:07:41 murray Exp $
+.\" $Id: dhcp-options.5,v 1.24 2005/03/17 20:14:57 dhankins Exp $
.\"
.TH dhcpd-options 5
.SH NAME
@@ -221,7 +214,7 @@ sending TCP segments. The minimum value is 1.
.B option \fBdhcp-client-identifier\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
-This option can be used to specify the a DHCP client identifier in a
+This option can be used to specify a DHCP client identifier in a
host declaration, so that dhcpd can find the host record by matching
against the client identifier.
.PP
@@ -247,7 +240,7 @@ server reply (DHCPOFFER), a DHCP server uses this option to specify
the lease time it is willing to offer.
.PP
This option is not directly user configurable in the server; refer to the
-\fImax-lease-time\fR and \fidefault-lease-time\fR server options in
+\fImax-lease-time\fR and \fIdefault-lease-time\fR server options in
.B dhcpd.conf(5).
.RE
.PP
@@ -411,8 +404,8 @@ RFC2132.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
-The Finger server option specifies a list of Finger available to the
-client. Servers should be listed in order of preference.
+The Finger server option specifies a list of Finger servers available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBfont-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
@@ -481,8 +474,8 @@ forwarding, and a value of true means enable IP forwarding.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
-The IRC server option specifies a list of IRC available to the
-client. Servers should be listed in order of preference.
+The IRC server option specifies a list of IRC servers available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBlog-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
@@ -589,7 +582,7 @@ Possible node types are:
B-node: Broadcast - no WINS
.TP
.I 2
-P-node: Peer - WINS only.
+P-node: Peer - WINS only
.TP
.I 4
M-node: Mixed - broadcast, then WINS
@@ -644,8 +637,8 @@ preference.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
-The NNTP server option specifies a list of NNTP available to the
-client. Servers should be listed in order of preference.
+The NNTP server option specifies a list of NNTP servesr available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBnon-local-source-routing\fR \fIflag\fR\fB;\fR
@@ -729,8 +722,8 @@ See STD 3 (RFC1122) for further information.
.B option \fBpop-server\fR \fIip-address\fR [\fB,\fR \fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
-The POP3 server option specifies a list of POP3 available to the
-client. Servers should be listed in order of preference.
+The POP3 server option specifies a list of POP3 servers available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBresource-location-servers\fR \fIip-address\fR
@@ -901,8 +894,8 @@ This specifies the IP address of the client's swap server.
.B option \fBtcp-keepalive-garbage\fR \fIflag\fR\fB;\fR
.RS 0.25i
.PP
-This option specifies the whether or not the client should send TCP
-keepalive messages with a octet of garbage for compatibility with
+This option specifies whether or not the client should send TCP
+keepalive messages with an octet of garbage for compatibility with
older implementations. A value of false indicates that a garbage octet
should not be sent. A value of true indicates that a garbage octet
should be sent.
@@ -982,12 +975,12 @@ this identifier, usually as a text string.
This option is used by some DHCP clients to identify the vendor
type and possibly the configuration of a DHCP client. The information
is a string of bytes whose contents are specific to the vendor and are
-not specified in a standard. To see what vendor class identifier a
+not specified in a standard. To see what vendor class identifier
clients are sending, you can write the following in your DHCP server
configuration file:
.nf
.PP
-set vendor-class option vendor-class-identifier;
+set vendor-string = option vendor-class-identifier;
.fi
.PP
This will result in all entries in the DHCP server lease database file
@@ -995,14 +988,14 @@ for clients that sent vendor-class-identifier options having a set
statement that looks something like this:
.nf
.PP
-set vendor-class "SUNW.Ultra-5_10";
+set vendor-string = "SUNW.Ultra-5_10";
.fi
.PP
The vendor-class-identifier option is normally used by the DHCP server
to determine the options that are returned in the
.B vendor-encapsulated-options
-option. Please see the VENDOR ENCAPSULATED OPTIONS section of the
-dhcpd.conf manual page for further information.
+option. Please see the VENDOR ENCAPSULATED OPTIONS section later in this
+manual page for further information.
.RE
.PP
.B option \fBvendor-encapsulated-options\fR \fIstring\fR\fB;\fR
@@ -1019,8 +1012,15 @@ that basis.
Some default behaviours for well-known DHCP client vendors (currently,
the Microsoft Windows 2000 DHCP client) are configured automatically,
but otherwise this must be configured manually - see the VENDOR
-ENCAPSULATED OPTIONS section of the \fIdhcpd.conf\fI manual page for
-details.
+ENCAPSULATED OPTIONS section later in this manual page for details.
+.RE
+.PP
+.B option \fBwww-server\fR \fIip-address\fR [\fB,\fR
+\fIip-address\fR... ]\fB;\fR
+.RS 0.25i
+.PP
+The WWW server option specifies a list of WWW servers available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBwww-server\fR \fIip-address\fR [\fB,\fR
@@ -1223,7 +1223,7 @@ utility uses this value as Primary DSS server when configuring a
secondary DSS server.
.RE
.SH DEFINING NEW OPTIONS
-The Internet Software Consortium DHCP client and server provide the
+The Internet Systems Consortium DHCP client and server provide the
capability to define new options. Each DHCP option has a name, a
code, and a structure. The name is used by you to refer to the
option. The code is a number, used by the DHCP server and client to
@@ -1519,8 +1519,8 @@ option.
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
dhclient(8), RFC2132, RFC2131, draft-ietf-dhc-agent-options-??.txt.
.SH AUTHOR
-The Internet Software Consortium DHCP Distribution was written by Ted
+The Internet Systems Consortium DHCP Distribution was written by Ted
Lemon under a contract with Vixie Labs. Funding for
-this project was provided through the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
+this project was provided through Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
.B http://www.isc.org.
diff --git a/common/discover.c b/common/discover.c
index 06b9e2c4..9c8a5ca4 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -3,39 +3,30 @@
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: discover.c,v 1.47 2002/06/10 00:12:34 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: discover.c,v 1.48 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -94,7 +85,7 @@ isc_result_t interface_setup ()
dhcp_interface_remove,
0, 0, 0,
sizeof (struct interface_info),
- interface_initialize);
+ interface_initialize, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register interface object type: %s",
isc_result_totext (status));
@@ -258,10 +249,12 @@ void discover_interfaces (state)
if (!strcmp (tmp -> name, ifp -> ifr_name))
break;
- /* 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_LOOPBACK ||
+ /* 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
+ 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) &&
state != DISCOVER_UNCONFIGURED))
@@ -399,6 +392,18 @@ void discover_interfaces (state)
if (tmp)
continue;
+ strncpy (ifr.ifr_name, name, IFNAMSIZ);
+
+ /* Skip non broadcast interfaces (plus loopback and
+ * point-to-point in case an OS incorrectly marks them
+ * as broadcast).
+ */
+ if ((ioctl (sock, SIOCGIFFLAGS, &ifr) < 0) ||
+ (!(ifr.ifr_flags & IFF_BROADCAST)) ||
+ (ifr.ifr_flags & IFF_LOOPBACK ) ||
+ (ifr.ifr_flags & IFF_POINTOPOINT))
+ continue;
+
/* Otherwise, allocate one. */
tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);
@@ -540,8 +545,12 @@ void discover_interfaces (state)
if (tmp -> next)
interface_reference (&next, tmp -> next, MDL);
/* skip interfaces that are running already */
- if (tmp -> flags & INTERFACE_RUNNING)
+ if (tmp -> flags & INTERFACE_RUNNING) {
+ interface_dereference(&tmp, MDL);
+ if(next)
+ interface_reference(&tmp, next, MDL);
continue;
+ }
if ((tmp -> flags & INTERFACE_AUTOMATIC) &&
state == DISCOVER_REQUESTED)
tmp -> flags &= ~(INTERFACE_AUTOMATIC |
diff --git a/common/dispatch.c b/common/dispatch.c
index 4b5923cc..ce9d1ba3 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -3,39 +3,30 @@
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.64 2001/06/27 00:29:45 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.65 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/dlpi.c b/common/dlpi.c
index 4cbc332a..e43240c1 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -3,39 +3,30 @@
Data Link Provider Interface (DLPI) network interface code. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software was written for the Internet Software Consortium
+ * This software was written for Internet Systems Consortium
* by Eric James Negaard, <lmdejn@lmd.ericsson.se>. To learn more about
- * the Internet Software Consortium, see ``http://www.isc.org''.
+ * Internet Systems Consortium, see ``http://www.isc.org''.
*
* Joost Mulders has also done considerable work in debugging the DLPI API
* support on Solaris and getting this code to work properly on a variety
@@ -88,7 +79,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dlpi.c,v 1.28 2001/04/05 20:53:01 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dlpi.c,v 1.29 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -688,7 +679,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
- from, (unsigned char *)0, length);
+ from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {
diff --git a/common/dns.c b/common/dns.c
index 49f52b33..b6ad19e2 100644
--- a/common/dns.c
+++ b/common/dns.c
@@ -3,46 +3,37 @@
Domain Name Service subroutines. */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
-"$Id: dns.c,v 1.36 2001/06/27 00:29:46 mellon Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dns.c,v 1.37 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -130,8 +121,7 @@ static char copyright[] =
* supported.
*/
-struct hash_table *tsig_key_hash;
-struct hash_table *dns_zone_hash;
+dns_zone_hash_t *dns_zone_hash;
#if defined (NSUPDATE)
isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname,
@@ -202,11 +192,7 @@ isc_result_t enter_dns_zone (struct dns_zone *zone)
dns_zone_dereference (&tz, MDL);
}
} else {
- dns_zone_hash =
- new_hash ((hash_reference)dns_zone_reference,
- (hash_dereference)dns_zone_dereference, 1,
- MDL);
- if (!dns_zone_hash)
+ if (!dns_zone_new_hash (&dns_zone_hash, 1, MDL))
return ISC_R_NOMEMORY;
}
dns_zone_hash_add (dns_zone_hash, zone -> name, 0, zone, MDL);
@@ -263,7 +249,7 @@ int dns_zone_dereference (ptr, file, line)
dns_zone = *ptr;
*ptr = (struct dns_zone *)0;
--dns_zone -> refcnt;
- rc_register (file, line, ptr, dns_zone, dns_zone -> refcnt, 1);
+ rc_register (file, line, ptr, dns_zone, dns_zone -> refcnt, 1, RC_MISC);
if (dns_zone -> refcnt > 0)
return 1;
@@ -544,15 +530,11 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
if (ddns_addr.len != 4)
return ISC_R_INVALIDARG;
-#ifndef NO_SNPRINTF
- snprintf (ddns_address, 16, "%d.%d.%d.%d",
+
+ /* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
+ sprintf (ddns_address, "%u.%u.%u.%u",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
-#else
- sprintf (ddns_address, "%d.%d.%d.%d",
- ddns_addr.iabuf[0], ddns_addr.iabuf[1],
- ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
-#endif
/*
* When a DHCP client or server intends to update an A RR, it first
@@ -624,14 +606,9 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#ifdef DEBUG_DNS_UPDATES
print_dns_status ((int)result, &updqueue);
-
- while (!ISC_LIST_EMPTY (updqueue)) {
- updrec = ISC_LIST_HEAD (updqueue);
- ISC_LIST_UNLINK (updqueue, updrec, r_link);
- minires_freeupdrec (updrec);
- }
-
+#endif
/*
* If this update operation succeeds, the updater can conclude that it
@@ -641,8 +618,12 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
* -- "Interaction between DHCP and DNS"
*/
- if (result == ISC_R_SUCCESS)
- return result;
+ if (result == ISC_R_SUCCESS) {
+ log_info ("Added new forward map from %.*s to %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address);
+ goto error;
+ }
/*
@@ -658,9 +639,19 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
* -- "Interaction between DHCP and DNS"
*/
- if (result != (rrsetp ? ISC_R_YXRRSET : ISC_R_YXDOMAIN))
- return result;
+ if (result != (rrsetp ? ISC_R_YXRRSET : ISC_R_YXDOMAIN)) {
+ log_error ("Unable to add forward map from %.*s to %s: %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address,
+ isc_result_totext (result));
+ goto error;
+ }
+ while (!ISC_LIST_EMPTY (updqueue)) {
+ updrec = ISC_LIST_HEAD (updqueue);
+ ISC_LIST_UNLINK (updqueue, updrec, r_link);
+ minires_freeupdrec (updrec);
+ }
/*
* DHCID RR exists, and matches client identity.
@@ -721,7 +712,27 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+ if (result != ISC_R_SUCCESS) {
+ if (result == YXRRSET || result == YXDOMAIN ||
+ result == NXRRSET || result == NXDOMAIN)
+ log_error ("Forward map from %.*s to %s already in use",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ ddns_address);
+ else
+ log_error ("Can't update forward map %.*s to %s: %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ ddns_address, isc_result_totext (result));
+
+ } else {
+ log_info ("Added new forward map from %.*s to %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address);
+ }
+#if defined (DEBUG_DNS_UPDATES)
print_dns_status ((int)result, &updqueue);
+#endif
/*
* If this query succeeds, the updater can conclude that the current
@@ -769,16 +780,10 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
if (ddns_addr.len != 4)
return ISC_R_INVALIDARG;
-#ifndef NO_SNPRINTF
- snprintf (ddns_address, 16, "%d.%d.%d.%d",
+ /* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
+ sprintf (ddns_address, "%u.%u.%u.%u",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
-#else
- sprintf (ddns_address, "%d.%d.%d.%d",
- ddns_addr.iabuf[0], ddns_addr.iabuf[1],
- ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
-#endif
-
/*
* The entity chosen to handle the A record for this client (either the
@@ -868,8 +873,13 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
* -- "Interaction between DHCP and DNS"
*/
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
+ /* If the rrset isn't there, we didn't need to do the
+ delete, which is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
goto error;
+ }
while (!ISC_LIST_EMPTY (updqueue)) {
updrec = ISC_LIST_HEAD (updqueue);
@@ -939,4 +949,5 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
#endif /* NSUPDATE */
-HASH_FUNCTIONS (dns_zone, const char *, struct dns_zone)
+HASH_FUNCTIONS (dns_zone, const char *, struct dns_zone, dns_zone_hash_t,
+ dns_zone_reference, dns_zone_dereference)
diff --git a/common/ethernet.c b/common/ethernet.c
index 0c51df35..c3542ef5 100644
--- a/common/ethernet.c
+++ b/common/ethernet.c
@@ -3,39 +3,30 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: ethernet.c,v 1.7 2001/06/27 00:29:47 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ethernet.c,v 1.8 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/execute.c b/common/execute.c
index 1287e9e5..cc5a6ba6 100644
--- a/common/execute.c
+++ b/common/execute.c
@@ -3,39 +3,30 @@
Support for executable statements. */
/*
- * Copyright (c) 1998-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: execute.c,v 1.46 2001/08/10 10:48:58 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.47 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -379,7 +370,9 @@ int execute_statements (result, packet, lease, client_state,
goto blb;
}
}
- }
+ } else
+ binding = NULL;
+
if (ns && binding) {
status = (evaluate_expression
(&binding -> value, packet, lease,
@@ -429,19 +422,19 @@ int execute_statements (result, packet, lease, client_state,
switch (r -> data.log.priority) {
case log_priority_fatal:
log_fatal ("%.*s", (int)ds.len,
- ds.buffer -> data);
+ ds.data);
break;
case log_priority_error:
log_error ("%.*s", (int)ds.len,
- ds.buffer -> data);
+ ds.data);
break;
case log_priority_debug:
log_debug ("%.*s", (int)ds.len,
- ds.buffer -> data);
+ ds.data);
break;
case log_priority_info:
log_info ("%.*s", (int)ds.len,
- ds.buffer -> data);
+ ds.data);
break;
}
data_string_forget (&ds, MDL);
@@ -545,7 +538,7 @@ int executable_statement_dereference (ptr, file, line)
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if ((*ptr) -> refcnt > 0) {
*ptr = (struct executable_statement *)0;
return 1;
@@ -859,7 +852,7 @@ void write_statements (file, statements, indent)
case log_statement:
indent_spaces (file, indent);
fprintf (file, "log ");
- col = token_print_indent (file, col, indent + 4,
+ col = token_print_indent (file, indent + 4, indent + 4,
"", "", "(");
switch (r -> data.log.priority) {
case log_priority_fatal:
diff --git a/common/fddi.c b/common/fddi.c
index d73d4509..bb466fce 100644
--- a/common/fddi.c
+++ b/common/fddi.c
@@ -3,39 +3,30 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: fddi.c,v 1.3 2000/04/18 23:02:09 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: fddi.c,v 1.4 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/icmp.c b/common/icmp.c
index 032ffad5..a5f0711d 100644
--- a/common/icmp.c
+++ b/common/icmp.c
@@ -4,39 +4,30 @@
responses. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.32 2002/06/09 22:16:34 murray Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.33 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -83,7 +74,8 @@ void icmp_startup (routep, handler)
result = omapi_object_type_register (&dhcp_type_icmp, "icmp",
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- sizeof (struct icmp_state), 0);
+ sizeof (struct icmp_state),
+ 0, RC_MISC);
if (result != ISC_R_SUCCESS)
log_fatal ("Can't register icmp object type: %s",
diff --git a/common/inet.c b/common/inet.c
index f03e1893..e272bd21 100644
--- a/common/inet.c
+++ b/common/inet.c
@@ -4,39 +4,30 @@
way... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
-"$Id: inet.c,v 1.9 2001/06/27 00:29:51 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: inet.c,v 1.10 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -58,6 +49,12 @@ struct iaddr subnet_number (addr, mask)
int i;
struct iaddr rv;
+ if (addr.len > sizeof(addr.iabuf))
+ log_fatal("subnet_number():%s:%d: Invalid addr length.", MDL);
+ if (addr.len != mask.len)
+ log_fatal("subnet_number():%s:%d: Addr/mask length mismatch.",
+ MDL);
+
rv.len = 0;
/* Both addresses must have the same length... */
@@ -84,6 +81,12 @@ struct iaddr ip_addr (subnet, mask, host_address)
struct iaddr rv;
unsigned char habuf [sizeof swaddr];
+ if (subnet.len > sizeof(subnet.iabuf))
+ log_fatal("ip_addr():%s:%d: Invalid addr length.", MDL);
+ if (subnet.len != mask.len)
+ log_fatal("ip_addr():%s:%d: Addr/mask length mismatch.",
+ MDL);
+
swaddr = htonl (host_address);
memcpy (habuf, &swaddr, sizeof swaddr);
@@ -124,6 +127,12 @@ struct iaddr broadcast_addr (subnet, mask)
int i, j, k;
struct iaddr rv;
+ if (subnet.len > sizeof(subnet.iabuf))
+ log_fatal("broadcast_addr():%s:%d: Invalid addr length.", MDL);
+ if (subnet.len != mask.len)
+ log_fatal("broadcast_addr():%s:%d: Addr/mask length mismatch.",
+ MDL);
+
if (subnet.len != mask.len) {
rv.len = 0;
return rv;
@@ -145,6 +154,12 @@ u_int32_t host_addr (addr, mask)
u_int32_t swaddr;
struct iaddr rv;
+ if (addr.len > sizeof(addr.iabuf))
+ log_fatal("host_addr():%s:%d: Invalid addr length.", MDL);
+ if (addr.len != mask.len)
+ log_fatal("host_addr():%s:%d: Addr/mask length mismatch.",
+ MDL);
+
rv.len = 0;
/* Mask out the network bits... */
@@ -162,6 +177,9 @@ u_int32_t host_addr (addr, mask)
int addr_eq (addr1, addr2)
struct iaddr addr1, addr2;
{
+ if (addr1.len > sizeof(addr1.iabuf))
+ log_fatal("addr_eq():%s:%d: Invalid addr length.", MDL);
+
if (addr1.len != addr2.len)
return 0;
return memcmp (addr1.iabuf, addr2.iabuf, addr1.len) == 0;
@@ -174,22 +192,8 @@ char *piaddr (addr)
char *s = pbuf;
int i;
- if (addr.len == 0) {
- strcpy (s, "<null address>");
- }
- for (i = 0; i < addr.len; i++) {
- sprintf (s, "%s%d", i ? "." : "", addr.iabuf [i]);
- s += strlen (s);
- }
- return pbuf;
-}
-
-char *piaddr1 (addr)
- struct iaddr addr;
-{
- static char pbuf [4 * 16];
- char *s = pbuf;
- int i;
+ if (addr.len > sizeof(addr.iabuf))
+ log_fatal("piaddr():%s:%d: Address length too long.", MDL);
if (addr.len == 0) {
strcpy (s, "<null address>");
@@ -204,39 +208,40 @@ char *piaddr1 (addr)
char *piaddrmask (struct iaddr addr, struct iaddr mask,
const char *file, int line)
{
- char *s, *t;
- int i, mw;
- unsigned len;
-
- for (i = 0; i < 32; i++) {
- if (!mask.iabuf [3 - i / 8])
- i += 7;
- else if (mask.iabuf [3 - i / 8] & (1 << (i % 8)))
+ char *s, tbuf[sizeof("255.255.255.255/32")];
+ int mw;
+ unsigned i, oct, bit;
+
+ if (addr.len != 4)
+ log_fatal("piaddrmask():%s:%d: Address length %d invalid",
+ MDL, addr.len);
+ if (addr.len != mask.len)
+ log_fatal("piaddrmask():%s:%d: Address and mask size mismatch",
+ MDL);
+
+ /* Determine netmask width in bits. */
+ for (mw = 32; mw > 0; ) {
+ oct = (mw - 1) / 8;
+ bit = 0x80 >> ((mw - 1) % 8);
+ if (!mask.iabuf [oct])
+ mw -= 8;
+ else if (mask.iabuf [oct] & bit)
break;
- }
- mw = 32 - i;
- len = mw > 9 ? 2 : 1;
- len += 4; /* three dots and a slash. */
- for (i = 0; i < (mw / 8) + 1; i++) {
- if (addr.iabuf [i] > 99)
- len += 3;
- else if (addr.iabuf [i] > 9)
- len += 2;
else
- len++;
+ mw--;
}
- s = dmalloc (len + 1, file, line);
+
+ s = tbuf;
+ for (i = 0 ; i <= oct ; i++) {
+ sprintf(s, "%s%d", i ? "." : "", addr.iabuf[i]);
+ s += strlen(s);
+ }
+ sprintf(s, "/%d", mw);
+
+ s = dmalloc (strlen(tbuf) + 1, file, line);
if (!s)
return s;
- t = s;
- sprintf (t, "%d", addr.iabuf [0]);
- t += strlen (t);
- for (i = 1; i < (mw / 8) + 1; i++) {
- sprintf (t, ".%d", addr.iabuf [i]);
- t += strlen (t);
- }
- *t++ = '/';
- sprintf (t, "%d", mw);
+ strcpy(s, tbuf);
return s;
}
diff --git a/common/lpf.c b/common/lpf.c
index da03c311..0d706da4 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -4,40 +4,31 @@
Support Services in Vancouver, B.C. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.29 2001/04/24 00:36:00 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.30 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -369,7 +360,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
- (unsigned char *)0, (unsigned)length);
+ (unsigned)length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/common/memory.c b/common/memory.c
index 1e709da5..0540405d 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -3,39 +3,30 @@
Memory-resident database... */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,13 +34,13 @@
#ifndef lint
static char copyright[] =
-"$Id: memory.c,v 1.67 2001/06/27 00:29:52 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: memory.c,v 1.68 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct group *root_group;
-struct hash_table *group_name_hash;
+group_hash_t *group_name_hash;
int (*group_write_hook) (struct group_object *);
isc_result_t delete_group (struct group_object *group, int writep)
@@ -128,10 +119,7 @@ isc_result_t supersede_group (struct group_object *group, int writep)
}
}
} else {
- group_name_hash = new_hash ((hash_reference)
- group_object_reference,
- (hash_dereference)
- group_object_dereference, 0, MDL);
+ group_new_hash (&group_name_hash, 0, MDL);
t = (struct group_object *)0;
}
diff --git a/common/nit.c b/common/nit.c
index 59197f2a..4fc1fb6d 100644
--- a/common/nit.c
+++ b/common/nit.c
@@ -4,39 +4,30 @@
with one crucial tidbit of help from Stu Grossmen. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.34 2001/02/17 21:17:25 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.35 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -379,7 +370,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, (unsigned char *)0, length);
+ from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/common/options.c b/common/options.c
index 0e7a0886..4d291402 100644
--- a/common/options.c
+++ b/common/options.c
@@ -3,39 +3,30 @@
DHCP options parsing and reassembly. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.87 2001/08/10 10:49:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.88 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
@@ -187,15 +178,36 @@ int parse_option_buffer (options, buffer, length, universe)
the parse fails, or the option isn't an encapsulation (by
far the most common case), or the option isn't entirely
an encapsulation, keep the raw data as well. */
- if (!((universe -> options [code] -> format [0] == 'e' ||
+ if (universe -> options [code] &&
+ !((universe -> options [code] -> format [0] == 'e' ||
universe -> options [code] -> format [0] == 'E') &&
(parse_encapsulated_suboptions
(options, universe -> options [code],
buffer + offset + 2, len,
universe, (const char *)0)))) {
- save_option_buffer (universe, options, bp,
- &bp -> data [offset + 2], len,
- universe -> options [code], 1);
+ op = lookup_option (universe, options, code);
+ if (op) {
+ struct data_string new;
+ memset (&new, 0, sizeof new);
+ if (!buffer_allocate (&new.buffer, op -> data.len + len,
+ MDL)) {
+ log_error ("parse_option_buffer: No memory.");
+ return 0;
+ }
+ memcpy (new.buffer -> data, op -> data.data,
+ op -> data.len);
+ memcpy (&new.buffer -> data [op -> data.len],
+ &bp -> data [offset + 2], len);
+ new.len = op -> data.len + len;
+ new.data = new.buffer -> data;
+ data_string_forget (&op -> data, MDL);
+ data_string_copy (&op -> data, &new, MDL);
+ data_string_forget (&new, MDL);
+ } else {
+ save_option_buffer (universe, options, bp,
+ &bp -> data [offset + 2], len,
+ universe -> options [code], 1);
+ }
}
offset += len + 2;
}
@@ -394,9 +406,16 @@ int fqdn_universe_decode (struct option_state *options,
*s = '.';
s += len + 1;
- total_len += len;
+ total_len += len + 1;
}
+ /* We wind up with a length that's one too many because
+ we shouldn't increment for the last label, but there's
+ no way to tell we're at the last label until we exit
+ the loop. :'*/
+ if (total_len > 0)
+ total_len--;
+
if (!terminated) {
first_len = total_len;
}
@@ -469,6 +488,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
unsigned char buffer [4096]; /* Really big buffer... */
unsigned main_buffer_size;
unsigned mainbufix, bufix, agentix;
+ int fileix;
+ int snameix;
unsigned option_size;
unsigned length;
int i;
@@ -476,6 +497,9 @@ int cons_options (inpacket, outpacket, lease, client_state,
struct data_string ds;
pair pp, *hash;
int need_endopt = 0;
+ int have_sso = 0;
+ int ocount = 0;
+ int ofbuf1=0, ofbuf2=0;
memset (&ds, 0, sizeof ds);
@@ -483,14 +507,18 @@ int cons_options (inpacket, outpacket, lease, client_state,
and no alternate maximum message size has been specified, take the
one in the packet. */
- if (!mms && inpacket &&
+ if (inpacket &&
(op = lookup_option (&dhcp_universe, inpacket -> options,
DHO_DHCP_MAX_MESSAGE_SIZE))) {
evaluate_option_cache (&ds, inpacket,
lease, client_state, in_options,
cfg_options, scope, op, MDL);
- if (ds.len >= sizeof (u_int16_t))
- mms = getUShort (ds.data);
+ if (ds.len >= sizeof (u_int16_t)) {
+ i = getUShort (ds.data);
+
+ if(!mms || (i < mms))
+ mms = i;
+ }
data_string_forget (&ds, MDL);
}
@@ -528,8 +556,16 @@ int cons_options (inpacket, outpacket, lease, client_state,
priority_list [priority_len++] = DHO_DHCP_LEASE_TIME;
priority_list [priority_len++] = DHO_DHCP_MESSAGE;
priority_list [priority_len++] = DHO_DHCP_REQUESTED_ADDRESS;
+ priority_list [priority_len++] = DHO_FQDN;
if (prl && prl -> len > 0) {
+ if ((op = lookup_option (&dhcp_universe, cfg_options,
+ DHO_SUBNET_SELECTION))) {
+ if (priority_len < PRIORITY_COUNT)
+ priority_list [priority_len++] =
+ DHO_SUBNET_SELECTION;
+ }
+
data_string_truncate (prl, (PRIORITY_COUNT - priority_len));
for (i = 0; i < prl -> len; i++) {
@@ -557,7 +593,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
if (cfg_options -> site_code_min) {
for (i = 0; i < OPTION_HASH_SIZE; i++) {
hash = cfg_options -> universes [dhcp_universe.index];
- for (pp = hash [i]; pp; pp = pp -> cdr) {
+ if (hash) {
+ for (pp = hash [i]; pp; pp = pp -> cdr) {
op = (struct option_cache *)(pp -> car);
if (op -> option -> code <
cfg_options -> site_code_min &&
@@ -566,6 +603,7 @@ int cons_options (inpacket, outpacket, lease, client_state,
DHO_DHCP_AGENT_OPTIONS))
priority_list [priority_len++] =
op -> option -> code;
+ }
}
}
}
@@ -574,8 +612,9 @@ int cons_options (inpacket, outpacket, lease, client_state,
is no site option space, we'll be cycling through the
dhcp option space. */
for (i = 0; i < OPTION_HASH_SIZE; i++) {
- hash = (cfg_options -> universes
- [cfg_options -> site_universe]);
+ hash = (cfg_options -> universes
+ [cfg_options -> site_universe]);
+ if (hash)
for (pp = hash [i]; pp; pp = pp -> cdr) {
op = (struct option_cache *)(pp -> car);
if (op -> option -> code >=
@@ -612,18 +651,35 @@ int cons_options (inpacket, outpacket, lease, client_state,
DHO_VENDOR_ENCAPSULATED_OPTIONS;
}
+ /* Figure out the overload buffer offset(s). */
+ if (overload) {
+ ofbuf1 = main_buffer_size - 4;
+ if (overload == 3)
+ ofbuf2 = main_buffer_size - 4 + DHCP_FILE_LEN;
+ }
+
/* Copy the options into the big buffer... */
- option_size = store_options (buffer,
- (main_buffer_size - 7 +
+ option_size = store_options (&ocount, buffer,
+ (main_buffer_size - 4 +
((overload & 1) ? DHCP_FILE_LEN : 0) +
((overload & 2) ? DHCP_SNAME_LEN : 0)),
inpacket, lease, client_state,
in_options, cfg_options, scope,
priority_list, priority_len,
- main_buffer_size,
- (main_buffer_size +
- ((overload & 1) ? DHCP_FILE_LEN : 0)),
- terminate, vuname);
+ ofbuf1, ofbuf2, terminate, vuname);
+ /* If store_options failed. */
+ if (option_size == 0)
+ return 0;
+ if (overload) {
+ if (ocount == 1 && (overload & 1))
+ overload = 1;
+ else if (ocount == 1 && (overload & 2))
+ overload = 2;
+ else if (ocount == 3)
+ overload = 3;
+ else
+ overload = 0;
+ }
/* Put the cookie up front... */
memcpy (outpacket -> options, DHCP_OPTIONS_COOKIE, 4);
@@ -633,70 +689,43 @@ int cons_options (inpacket, outpacket, lease, client_state,
option at the beginning. If we can, though, just store the
whole thing in the packet's option buffer and leave it at
that. */
- if (option_size <= main_buffer_size - mainbufix) {
- memcpy (&outpacket -> options [mainbufix],
- buffer, option_size);
- mainbufix += option_size;
- agentix = mainbufix;
- if (mainbufix < main_buffer_size)
- need_endopt = 1;
- length = DHCP_FIXED_NON_UDP + mainbufix;
- } else {
+ memcpy (&outpacket -> options [mainbufix],
+ buffer, option_size);
+ mainbufix += option_size;
+ if (overload) {
outpacket -> options [mainbufix++] = DHO_DHCP_OPTION_OVERLOAD;
outpacket -> options [mainbufix++] = 1;
- if (option_size > main_buffer_size - mainbufix + DHCP_FILE_LEN)
- outpacket -> options [mainbufix++] = 3;
- else
- outpacket -> options [mainbufix++] = 1;
-
- memcpy (&outpacket -> options [mainbufix],
- buffer, main_buffer_size - mainbufix);
- length = DHCP_FIXED_NON_UDP + main_buffer_size;
- agentix = main_buffer_size;
+ outpacket -> options [mainbufix++] = overload;
- bufix = main_buffer_size - mainbufix;
if (overload & 1) {
- if (option_size - bufix <= DHCP_FILE_LEN) {
- memcpy (outpacket -> file,
- &buffer [bufix], option_size - bufix);
- mainbufix = option_size - bufix;
- if (mainbufix < DHCP_FILE_LEN)
- outpacket -> file [mainbufix++]
- = DHO_END;
- while (mainbufix < DHCP_FILE_LEN)
- outpacket -> file [mainbufix++]
- = DHO_PAD;
+ memcpy (outpacket -> file,
+ &buffer [ofbuf1], DHCP_FILE_LEN);
+ }
+ if (overload & 2) {
+ if (ofbuf2) {
+ memcpy (outpacket -> sname, &buffer [ofbuf2],
+ DHCP_SNAME_LEN);
} else {
- memcpy (outpacket -> file,
- &buffer [bufix], DHCP_FILE_LEN);
- bufix += DHCP_FILE_LEN;
+ memcpy (outpacket -> sname, &buffer [ofbuf1],
+ DHCP_SNAME_LEN);
}
}
- if ((overload & 2) && option_size < bufix) {
- memcpy (outpacket -> sname,
- &buffer [bufix], option_size - bufix);
-
- mainbufix = option_size - bufix;
- if (mainbufix < DHCP_SNAME_LEN)
- outpacket -> file [mainbufix++]
- = DHO_END;
- while (mainbufix < DHCP_SNAME_LEN)
- outpacket -> file [mainbufix++]
- = DHO_PAD;
- }
}
+ agentix = mainbufix;
+ if (mainbufix < main_buffer_size)
+ need_endopt = 1;
+ length = DHCP_FIXED_NON_UDP + mainbufix;
/* Now hack in the agent options if there are any. */
priority_list [0] = DHO_DHCP_AGENT_OPTIONS;
priority_len = 1;
agentix +=
- store_options (&outpacket -> options [agentix],
+ store_options (0, &outpacket -> options [agentix],
1500 - DHCP_FIXED_LEN - agentix,
inpacket, lease, client_state,
in_options, cfg_options, scope,
priority_list, priority_len,
- 1500 - DHCP_FIXED_LEN - agentix,
- 1500 - DHCP_FIXED_LEN - agentix, 0, (char *)0);
+ 0, 0, 0, (char *)0);
/* Tack a DHO_END option onto the packet if we need to. */
if (agentix < 1500 - DHCP_FIXED_LEN && need_endopt)
@@ -709,9 +738,10 @@ int cons_options (inpacket, outpacket, lease, client_state,
/* Store all the requested options into the requested buffer. */
-int store_options (buffer, buflen, packet, lease, client_state,
+int store_options (ocount, buffer, buflen, packet, lease, client_state,
in_options, cfg_options, scope, priority_list, priority_len,
first_cutoff, second_cutoff, terminate, vuname)
+ int *ocount;
unsigned char *buffer;
unsigned buflen;
struct packet *packet;
@@ -726,14 +756,30 @@ int store_options (buffer, buflen, packet, lease, client_state,
int terminate;
const char *vuname;
{
- int bufix = 0;
+ int bufix = 0, six = 0, tix = 0;
int i;
int ix;
int tto;
+ int bufend, sbufend;
struct data_string od;
struct option_cache *oc;
unsigned code;
- int optstart;
+
+ if (first_cutoff) {
+ if (first_cutoff >= buflen)
+ log_fatal("%s:%d:store_options: Invalid first cutoff.", MDL);
+
+ bufend = first_cutoff;
+ } else
+ bufend = buflen;
+
+ if (second_cutoff) {
+ if (second_cutoff >= buflen)
+ log_fatal("%s:%d:store_options: Invalid second cutoff.", MDL);
+
+ sbufend = second_cutoff;
+ } else
+ sbufend = buflen;
memset (&od, 0, sizeof od);
@@ -760,10 +806,11 @@ int store_options (buffer, buflen, packet, lease, client_state,
/* Number of bytes left to store (some may already
have been stored by a previous pass). */
unsigned length;
- int optstart;
+ int optstart, soptstart, toptstart;
struct universe *u;
int have_encapsulation = 0;
struct data_string encapsulation;
+ int splitup;
memset (&encapsulation, 0, sizeof encapsulation);
@@ -783,8 +830,9 @@ int store_options (buffer, buflen, packet, lease, client_state,
to be encapsulated first, except that if it's a straight
encapsulation and the user has provided a value for the
encapsulation option, use the user-provided value. */
- if ((u -> options [code] -> format [0] == 'E' && !oc) ||
- u -> options [code] -> format [0] == 'e') {
+ if (u -> options [code] &&
+ ((u -> options [code] -> format [0] == 'E' && !oc) ||
+ u -> options [code] -> format [0] == 'e')) {
int uix;
static char *s, *t;
struct option_cache *tmp;
@@ -899,47 +947,119 @@ int store_options (buffer, buflen, packet, lease, client_state,
in any case, if the option data will cross a buffer
boundary, split it across that boundary. */
+
+ if (length > 255)
+ splitup = 1;
+ else
+ splitup = 0;
+
ix = 0;
optstart = bufix;
+ soptstart = six;
+ toptstart = tix;
while (length) {
- unsigned char incr = length > 255 ? 255 : length;
+ unsigned incr = length;
int consumed = 0;
-
- /* If this hunk of the buffer will cross a
- boundary, only go up to the boundary in this
- pass. */
- if (bufix < first_cutoff &&
- bufix + incr > first_cutoff)
- incr = first_cutoff - bufix;
- else if (bufix < second_cutoff &&
- bufix + incr > second_cutoff)
- incr = second_cutoff - bufix;
-
- /* If this option is going to overflow the buffer,
- skip it. */
- if (bufix + 2 + incr > buflen) {
+ int *pix;
+ char *base;
+
+ /* Try to fit it in the options buffer. */
+ if (!splitup &&
+ ((!six && !tix && (i == priority_len - 1) &&
+ (bufix + 2 + length < bufend)) ||
+ (bufix + 5 + length < bufend))) {
+ base = buffer;
+ pix = &bufix;
+ /* Try to fit it in the second buffer. */
+ } else if (!splitup && first_cutoff &&
+ (first_cutoff + six + 3 + length < sbufend)) {
+ base = &buffer[first_cutoff];
+ pix = &six;
+ /* Try to fit it in the third buffer. */
+ } else if (!splitup && second_cutoff &&
+ (second_cutoff + tix + 3 + length < buflen)) {
+ base = &buffer[second_cutoff];
+ pix = &tix;
+ /* Split the option up into the remaining space. */
+ } else {
+ splitup = 1;
+
+ /* Use any remaining options space. */
+ if (bufix + 6 < bufend) {
+ incr = bufend - bufix - 5;
+ base = buffer;
+ pix = &bufix;
+ /* Use any remaining first_cutoff space. */
+ } else if (first_cutoff &&
+ (first_cutoff + six + 4 < sbufend)) {
+ incr = sbufend - (first_cutoff + six) - 3;
+ base = &buffer[first_cutoff];
+ pix = &six;
+ /* Use any remaining second_cutoff space. */
+ } else if (second_cutoff &&
+ (second_cutoff + tix + 4 < buflen)) {
+ incr = buflen - (second_cutoff + tix) - 3;
+ base = &buffer[second_cutoff];
+ pix = &tix;
+ /* Give up, roll back this option. */
+ } else {
bufix = optstart;
+ six = soptstart;
+ tix = toptstart;
break;
+ }
}
-
+
+ if (incr > length)
+ incr = length;
+ if (incr > 255)
+ incr = 255;
+
/* Everything looks good - copy it in! */
- buffer [bufix] = code;
- buffer [bufix + 1] = incr;
+ base [*pix] = code;
+ base [*pix + 1] = (unsigned char)incr;
if (tto && incr == length) {
- memcpy (buffer + bufix + 2,
- od.data + ix, (unsigned)(incr - 1));
- buffer [bufix + 2 + incr - 1] = 0;
+ if (incr > 1)
+ memcpy (base + *pix + 2,
+ od.data + ix, (unsigned)(incr - 1));
+ base [*pix + 2 + incr - 1] = 0;
} else {
- memcpy (buffer + bufix + 2,
+ memcpy (base + *pix + 2,
od.data + ix, (unsigned)incr);
}
length -= incr;
ix += incr;
- bufix += 2 + incr;
+ *pix += 2 + incr;
}
data_string_forget (&od, MDL);
}
+ /* If we can overload, and we have, then PAD and END those spaces. */
+ if (first_cutoff && six) {
+ if ((first_cutoff + six + 1) < sbufend)
+ memset (&buffer[first_cutoff + six + 1], DHO_PAD,
+ sbufend - (first_cutoff + six + 1));
+ else if (first_cutoff + six >= sbufend)
+ log_fatal("Second buffer overflow in overloaded options.");
+
+ buffer[first_cutoff + six] = DHO_END;
+ *ocount |= 1; /* So that caller knows there's data there. */
+ }
+
+ if (second_cutoff && tix) {
+ if (second_cutoff + tix + 1 < buflen) {
+ memset (&buffer[second_cutoff + tix + 1], DHO_PAD,
+ buflen - (second_cutoff + tix + 1));
+ } else if (second_cutoff + tix >= buflen)
+ log_fatal("Third buffer overflow in overloaded options.");
+
+ buffer[second_cutoff + tix] = DHO_END;
+ *ocount |= 2; /* So that caller knows there's data there. */
+ }
+
+ if ((six || tix) && (bufix + 3 > bufend))
+ log_fatal("Not enough space for option overload option.");
+
return bufix;
}
@@ -1537,7 +1657,7 @@ int option_cache_dereference (ptr, file, line)
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt) {
if ((*ptr) -> data.buffer)
data_string_forget (&(*ptr) -> data, file, line);
@@ -1768,6 +1888,8 @@ int nwip_option_space_encapsulate (result, packet, lease, client_state,
status = 1;
}
} else {
+ memset (&ds, 0, sizeof ds);
+
/* If we have nwip options, the first one has to be the
nwip-exists-in-option-area option. */
if (!buffer_allocate (&ds.buffer, result -> len + 2, MDL)) {
diff --git a/common/packet.c b/common/packet.c
index 50e0bf43..830c276a 100644
--- a/common/packet.c
+++ b/common/packet.c
@@ -3,35 +3,26 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
* This code was originally contributed by Archie Cobbs, and is still
* very similar to that contribution, although the packet checksum code
@@ -42,7 +33,7 @@
#ifndef lint
static char copyright[] =
-"$Id: packet.c,v 1.41 2001/06/27 00:29:55 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: packet.c,v 1.42 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -219,15 +210,15 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
/* UDP header and IP header decoded together for convenience. */
-ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
+ssize_t decode_udp_ip_header (interface, buf, bufix, from, buflen)
struct interface_info *interface;
unsigned char *buf;
unsigned bufix;
struct sockaddr_in *from;
- unsigned char *data;
unsigned buflen;
{
- struct ip *ip;
+ unsigned char *data;
+ struct ip ip;
struct udphdr *udp;
u_int32_t ip_len = (buf [bufix] & 0xf) << 2;
u_int32_t sum, usum;
@@ -241,12 +232,12 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
unsigned ulen;
int ignore = 0;
- ip = (struct ip *)(buf + bufix);
+ memcpy(&ip, buf + bufix, sizeof (struct ip));
udp = (struct udphdr *)(buf + bufix + ip_len);
#ifdef USERLAND_FILTER
/* Is it a UDP packet? */
- if (ip -> ip_p != IPPROTO_UDP)
+ if (ip.ip_p != IPPROTO_UDP)
return -1;
/* Is it to the port we're serving? */
@@ -275,46 +266,44 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
}
/* Check the IP packet length. */
- if (ntohs (ip -> ip_len) != buflen) {
- if ((ntohs (ip -> ip_len + 2) & ~1) == buflen)
+ if (ntohs (ip.ip_len) != buflen) {
+ if ((ntohs (ip.ip_len + 2) & ~1) == buflen)
ignore = 1;
else
log_debug ("ip length %d disagrees with bytes received %d.",
- ntohs (ip -> ip_len), buflen);
+ ntohs (ip.ip_len), buflen);
}
/* Copy out the IP source address... */
- memcpy (&from -> sin_addr, &ip -> ip_src, 4);
+ memcpy (&from -> sin_addr, &ip.ip_src, 4);
/* Compute UDP checksums, including the ``pseudo-header'', the UDP
header and the data. If the UDP checksum field is zero, we're
not supposed to do a checksum. */
- if (!data) {
- data = buf + bufix + ip_len + sizeof *udp;
- len = ulen - sizeof *udp;
- ++udp_packets_length_checked;
- if (len + data > buf + bufix + buflen) {
- ++udp_packets_length_overflow;
- if (udp_packets_length_checked > 4 &&
- (udp_packets_length_checked /
- udp_packets_length_overflow) < 2) {
- log_info ("%d udp packets in %d too long - dropped",
- udp_packets_length_overflow,
- udp_packets_length_checked);
- udp_packets_length_overflow =
- udp_packets_length_checked = 0;
- }
- return -1;
- }
- if (len + data < buf + bufix + buflen &&
- len + data != buf + bufix + buflen && !ignore)
- log_debug ("accepting packet with data after udp payload.");
- if (len + data > buf + bufix + buflen) {
- log_debug ("dropping packet with bogus uh_ulen %ld",
- (long)(len + sizeof *udp));
- return -1;
+ data = buf + bufix + ip_len + sizeof *udp;
+ len = ulen - sizeof *udp;
+ ++udp_packets_length_checked;
+ if (len + data > buf + bufix + buflen) {
+ ++udp_packets_length_overflow;
+ if (udp_packets_length_checked > 4 &&
+ (udp_packets_length_checked /
+ udp_packets_length_overflow) < 2) {
+ log_info ("%d udp packets in %d too long - dropped",
+ udp_packets_length_overflow,
+ udp_packets_length_checked);
+ udp_packets_length_overflow =
+ udp_packets_length_checked = 0;
}
+ return -1;
+ }
+ if (len + data < buf + bufix + buflen &&
+ len + data != buf + bufix + buflen && !ignore)
+ log_debug ("accepting packet with data after udp payload.");
+ if (len + data > buf + bufix + buflen) {
+ log_debug ("dropping packet with bogus uh_ulen %ld",
+ (long)(len + sizeof *udp));
+ return -1;
}
usum = udp -> uh_sum;
@@ -323,8 +312,8 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
sum = wrapsum (checksum ((unsigned char *)udp, sizeof *udp,
checksum (data, len,
checksum ((unsigned char *)
- &ip -> ip_src,
- 2 * sizeof ip -> ip_src,
+ &ip.ip_src,
+ 2 * sizeof ip.ip_src,
IPPROTO_UDP +
(u_int32_t)ulen))));
diff --git a/common/parse.c b/common/parse.c
index b840541b..7b425f09 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -3,39 +3,30 @@
Common parser code for dhcpd and dhclient. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.105 2001/06/27 00:29:56 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.106 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -284,8 +275,11 @@ int parse_ip_addr_or_hostname (expr, cfile, uniform)
name = parse_host_name (cfile);
if (!name)
return 0;
- if (!make_host_lookup (expr, name))
+ if (!make_host_lookup (expr, name)) {
+ dfree(name, MDL);
return 0;
+ }
+ dfree(name, MDL);
if (!uniform) {
if (!make_limit (&x, *expr, 4))
return 0;
@@ -329,7 +323,7 @@ int parse_ip_addr (cfile, addr)
/*
* hardware-parameter :== HARDWARE hardware-type colon-seperated-hex-list SEMI
- * hardware-type :== ETHERNET | TOKEN_RING
+ * hardware-type :== ETHERNET | TOKEN_RING | FDDI
*/
void parse_hardware_param (cfile, hardware)
@@ -726,7 +720,7 @@ TIME parse_date (cfile)
return (TIME)0;
}
- /* Month... */
+ /* Day of month... */
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
parse_warn (cfile, "numeric day of month expected.");
@@ -975,7 +969,7 @@ void parse_option_space_decl (cfile)
universes = ua;
}
universes [nu -> index] = nu;
- nu -> hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&nu -> hash, 1, MDL);
if (!nu -> hash)
log_fatal ("Can't allocate %s option hash table.", nu -> name);
universe_hash_add (universe_hash, nu -> name, 0, nu, MDL);
@@ -1804,7 +1798,11 @@ int parse_executable_statement (result, cfile, lose, case_context)
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
}
break;
@@ -1828,7 +1826,11 @@ int parse_executable_statement (result, cfile, lose, case_context)
if (!(*result)->data.unset)
log_fatal ("can't allocate variable name");
strcpy ((*result) -> data.unset, val);
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
case EVAL:
@@ -1850,7 +1852,10 @@ int parse_executable_statement (result, cfile, lose, case_context)
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ }
break;
case RETURN:
@@ -1872,7 +1877,11 @@ int parse_executable_statement (result, cfile, lose, case_context)
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
case LOG:
@@ -1949,8 +1958,8 @@ int parse_executable_statement (result, cfile, lose, case_context)
log_fatal ("no memory for new zone.");
zone -> name = parse_host_name (cfile);
if (!zone -> name) {
- badzone:
parse_warn (cfile, "expecting hostname.");
+ badzone:
*lose = 1;
skip_to_semi (cfile);
dns_zone_dereference (&zone, MDL);
@@ -1959,8 +1968,10 @@ int parse_executable_statement (result, cfile, lose, case_context)
i = strlen (zone -> name);
if (zone -> name [i - 1] != '.') {
s = dmalloc ((unsigned)i + 2, MDL);
- if (!s)
+ if (!s) {
+ parse_warn (cfile, "no trailing '.' on zone");
goto badzone;
+ }
strcpy (s, zone -> name);
s [i] = '.';
s [i + 1] = 0;
@@ -1971,10 +1982,8 @@ int parse_executable_statement (result, cfile, lose, case_context)
goto badzone;
status = enter_dns_zone (zone);
if (status != ISC_R_SUCCESS) {
- if (parse_semi (cfile))
- parse_warn (cfile, "dns zone key %s: %s",
- zone -> name,
- isc_result_totext (status));
+ parse_warn (cfile, "dns zone key %s: %s",
+ zone -> name, isc_result_totext (status));
dns_zone_dereference (&zone, MDL);
return 0;
}
@@ -2024,7 +2033,11 @@ int parse_executable_statement (result, cfile, lose, case_context)
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
}
@@ -2694,6 +2707,7 @@ int parse_data_expression (expr, cfile, lose)
if (!is_data_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
+ expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a data expression.");
*lose = 1;
return 0;
@@ -2720,6 +2734,7 @@ int parse_numeric_expression (expr, cfile, lose)
if (!is_numeric_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
+ expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a numeric expression.");
*lose = 1;
return 0;
@@ -2754,6 +2769,7 @@ int parse_dns_expression (expr, cfile, lose)
if (!is_dns_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
+ expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a dns update subexpression.");
*lose = 1;
return 0;
@@ -3954,83 +3970,51 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
case AND:
next_op = expr_and;
context = expression_context (rhs);
- if (context != context_boolean) {
- needbool:
- parse_warn (cfile, "expecting boolean expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case OR:
next_op = expr_or;
context = expression_context (rhs);
- if (context != context_boolean)
- goto needbool;
break;
case PLUS:
next_op = expr_add;
context = expression_context (rhs);
- if (context != context_numeric) {
- neednum:
- parse_warn (cfile, "expecting numeric expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case MINUS:
next_op = expr_subtract;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case SLASH:
next_op = expr_divide;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case ASTERISK:
next_op = expr_multiply;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PERCENT:
next_op = expr_remainder;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case AMPERSAND:
next_op = expr_binary_and;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PIPE:
next_op = expr_binary_or;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case CARET:
next_op = expr_binary_xor;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
default:
@@ -4052,6 +4036,98 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
goto new_rhs;
}
+ /* If the next binary operator is of greater precedence than the
+ * current operator, then rhs we have parsed so far is actually
+ * the lhs of the next operator. To get this value, we have to
+ * recurse.
+ */
+ if (binop != expr_none && next_op != expr_none &&
+ op_precedence (binop, next_op) < 0) {
+
+ /* Eat the subexpression operator token, which we pass to
+ * parse_expression...we only peek()'d earlier.
+ */
+ token = next_token (&val, (unsigned *)0, cfile);
+
+ /* Continue parsing of the right hand side with that token. */
+ tmp = rhs;
+ rhs = (struct expression *)0;
+ if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
+ &tmp, next_op)) {
+ if (!*lose) {
+ parse_warn (cfile,
+ "expecting a subexpression");
+ *lose = 1;
+ }
+ return 0;
+ }
+ next_op = expr_none;
+ }
+
+ if (binop != expr_none) {
+ rhs_context = expression_context(rhs);
+ lhs_context = expression_context(lhs);
+
+ if ((rhs_context != context_any) && (lhs_context != context_any) &&
+ (rhs_context != lhs_context)) {
+ parse_warn (cfile, "illegal expression relating different types");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ expression_dereference (&lhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+
+ switch(binop) {
+ case expr_not_equal:
+ case expr_equal:
+ if ((rhs_context != context_data_or_numeric) &&
+ (rhs_context != context_data) &&
+ (rhs_context != context_numeric) &&
+ (rhs_context != context_any)) {
+ parse_warn (cfile, "expecting data/numeric expression");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_and:
+ case expr_or:
+ if ((rhs_context != context_boolean) &&
+ (rhs_context != context_any)) {
+ parse_warn (cfile, "expecting boolean expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_add:
+ case expr_subtract:
+ case expr_divide:
+ case expr_multiply:
+ case expr_remainder:
+ case expr_binary_and:
+ case expr_binary_or:
+ case expr_binary_xor:
+ if ((rhs_context != context_numeric) &&
+ (rhs_context != context_any)) {
+ parse_warn (cfile, "expecting numeric expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
/* Now, if we didn't find a binary operator, we're done parsing
this subexpression, so combine it with the preceding binary
operator and return the result. */
@@ -4071,27 +4147,6 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
/* Eat the operator token - we now know it was a binary operator... */
token = next_token (&val, (unsigned *)0, cfile);
- /* If the binary operator we saw previously has a lower precedence
- than the next operator, then the rhs we just parsed for that
- operator is actually the lhs of the operator with the higher
- precedence - to get the real rhs, we need to recurse on the
- new operator. */
- if (binop != expr_none &&
- op_precedence (binop, next_op) < 0) {
- tmp = rhs;
- rhs = (struct expression *)0;
- if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
- &tmp, next_op)) {
- if (!*lose) {
- parse_warn (cfile,
- "expecting a subexpression");
- *lose = 1;
- }
- return 0;
- }
- next_op = expr_none;
- }
-
/* Now combine the LHS and the RHS using binop. */
tmp = (struct expression *)0;
if (!expression_allocate (&tmp, MDL))
@@ -4265,15 +4320,15 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
switch (**fmt) {
case 'U':
- token = peek_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, &len, cfile);
if (!is_identifier (token)) {
if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting identifier.");
- skip_to_semi (cfile);
+ if (token != SEMI)
+ skip_to_semi (cfile);
}
return 0;
}
- token = next_token (&val, &len, cfile);
if (!make_const_data (&t, (const unsigned char *)val,
len, 1, 1, MDL))
log_fatal ("No memory for %s", val);
@@ -4298,18 +4353,21 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
return 0;
}
t -> op = expr_const_data;
- } else if (token == STRING) {
- token = next_token (&val, &len, cfile);
- if (!make_const_data (&t, (const unsigned char *)val,
- len, 1, 1, MDL))
- log_fatal ("No memory for \"%s\"", val);
} else {
- if ((*fmt) [1] != 'o') {
+ token = next_token (&val, &len, cfile);
+
+ if(token == STRING) {
+ if (!make_const_data (&t,
+ (const unsigned char *)val,
+ len, 1, 1, MDL))
+ log_fatal ("No memory for \"%s\"", val);
+ } else if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting string %s.",
"or hexadecimal data");
skip_to_semi (cfile);
+ } else {
+ return 0;
}
- return 0;
}
break;
@@ -4324,7 +4382,7 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
goto make_string;
case 't': /* Text string... */
- token = peek_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, &len, cfile);
if (token != STRING && !is_identifier (token)) {
if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting string.");
@@ -4333,7 +4391,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
return 0;
}
- token = next_token (&val, &len, cfile);
make_string:
if (!make_const_data (&t, (const unsigned char *)val,
len, 1, 1, MDL))
@@ -4380,10 +4437,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
break;
case 'T': /* Lease interval. */
- token = peek_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, (unsigned *)0, cfile);
if (token != INFINITE)
goto check_number;
- token = next_token (&val, (unsigned *)0, cfile);
putLong (buf, -1);
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
return 0;
@@ -4391,9 +4447,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 'L': /* Unsigned 32-bit integer... */
case 'l': /* Signed 32-bit integer... */
- token = peek_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, (unsigned *)0, cfile);
check_number:
- if (token != NUMBER) {
+ if ((token != NUMBER) && (token != NUMBER_OR_NAME)) {
need_number:
if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting number.");
@@ -4402,7 +4458,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
return 0;
}
- token = next_token (&val, (unsigned *)0, cfile);
convert_num (cfile, buf, val, 0, 32);
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
return 0;
@@ -4410,10 +4465,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 's': /* Signed 16-bit integer. */
case 'S': /* Unsigned 16-bit integer. */
- token = peek_token (&val, (unsigned *)0, cfile);
- if (token != NUMBER)
- goto need_number;
token = next_token (&val, (unsigned *)0, cfile);
+ if ((token != NUMBER) && (token != NUMBER_OR_NAME))
+ goto need_number;
convert_num (cfile, buf, val, 0, 16);
if (!make_const_data (&t, buf, 2, 0, 1, MDL))
return 0;
@@ -4421,17 +4475,16 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 'b': /* Signed 8-bit integer. */
case 'B': /* Unsigned 8-bit integer. */
- token = peek_token (&val, (unsigned *)0, cfile);
- if (token != NUMBER)
- goto need_number;
token = next_token (&val, (unsigned *)0, cfile);
+ if ((token != NUMBER) && (token != NUMBER_OR_NAME))
+ goto need_number;
convert_num (cfile, buf, val, 0, 8);
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
return 0;
break;
case 'f': /* Boolean flag. */
- token = peek_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, (unsigned *)0, cfile);
if (!is_identifier (token)) {
if ((*fmt) [1] != 'o')
parse_warn (cfile, "expecting identifier.");
@@ -4455,7 +4508,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
parse_warn (cfile, "expecting boolean.");
goto bad_flag;
}
- token = next_token (&val, (unsigned *)0, cfile);
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
return 0;
break;
@@ -4595,7 +4647,8 @@ int parse_option_decl (oc, cfile)
case 'l': /* Signed 32-bit integer... */
token = next_token (&val,
(unsigned *)0, cfile);
- if (token != NUMBER) {
+ if ((token != NUMBER) &&
+ (token != NUMBER_OR_NAME)) {
need_number:
parse_warn (cfile,
"expecting number.");
@@ -4612,7 +4665,8 @@ int parse_option_decl (oc, cfile)
case 'S': /* Unsigned 16-bit integer. */
token = next_token (&val,
(unsigned *)0, cfile);
- if (token != NUMBER)
+ if ((token != NUMBER) &&
+ (token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 16);
len = 2;
@@ -4623,7 +4677,8 @@ int parse_option_decl (oc, cfile)
case 'B': /* Unsigned 8-bit integer. */
token = next_token (&val,
(unsigned *)0, cfile);
- if (token != NUMBER)
+ if ((token != NUMBER) &&
+ (token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 8);
len = 1;
@@ -4751,13 +4806,11 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
unsigned i, lix;
do_percentm (mbuf, fmt);
-#ifndef NO_SNPRINTF
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
snprintf (fbuf, sizeof fbuf, "%s line %d: %s",
cfile -> tlname, cfile -> lexline, mbuf);
-#else
- sprintf (fbuf, "%s line %d: %s",
- cfile -> tlname, cfile -> lexline, mbuf);
-#endif
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
@@ -4784,13 +4837,14 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
- write (2, cfile -> token_line, strlen (cfile -> token_line));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
+ write (STDERR_FILENO, cfile -> token_line,
+ strlen (cfile -> token_line));
+ write (STDERR_FILENO, "\n", 1);
if (cfile -> lexchar < 81)
- write (2, lexbuf, lix);
- write (2, "^\n", 2);
+ write (STDERR_FILENO, lexbuf, lix);
+ write (STDERR_FILENO, "^\n", 2);
}
cfile -> warnings_occurred = 1;
diff --git a/common/print.c b/common/print.c
index ef90aded..f46d8c55 100644
--- a/common/print.c
+++ b/common/print.c
@@ -3,39 +3,30 @@
Turn data structures into printable text. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: print.c,v 1.56 2002/04/30 06:18:39 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.57 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -223,7 +214,7 @@ void print_lease (lease)
lease -> host ? lease -> host -> name : "<none>");
}
-#if defined (DEBUG)
+#if defined (DEBUG_PACKET)
void dump_packet_option (struct option_cache *oc,
struct packet *packet,
struct lease *lease,
@@ -304,19 +295,46 @@ void dump_raw (buf, len)
char lbuf [80];
int lbix = 0;
- lbuf [0] = 0;
+/*
+ 1 2 3 4 5 6 7
+01234567890123456789012345678901234567890123456789012345678901234567890123
+280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .................
+*/
+
+ memset(lbuf, ' ', 79);
+ lbuf [79] = 0;
for (i = 0; i < len; i++) {
if ((i & 15) == 0) {
- if (lbix)
- log_info (lbuf);
- sprintf (lbuf, "%03x:", i);
- lbix = 4;
+ if (lbix) {
+ lbuf[53]=' ';
+ lbuf[54]=' ';
+ lbuf[55]=' ';
+ lbuf[73]='\0';
+ log_info (lbuf);
+ }
+ memset(lbuf, ' ', 79);
+ lbuf [79] = 0;
+ sprintf (lbuf, "%03x:", i);
+ lbix = 4;
} else if ((i & 7) == 0)
lbuf [lbix++] = ' ';
+
+ if(isprint(buf[i])) {
+ lbuf[56+(i%16)]=buf[i];
+ } else {
+ lbuf[56+(i%16)]='.';
+ }
+
sprintf (&lbuf [lbix], " %02x", buf [i]);
lbix += 3;
+ lbuf[lbix]=' ';
+
}
+ lbuf[53]=' ';
+ lbuf[54]=' ';
+ lbuf[55]=' ';
+ lbuf[73]='\0';
log_info (lbuf);
}
@@ -337,7 +355,7 @@ void hash_dump (table)
if (bp -> len)
dump_raw (bp -> name, bp -> len);
else
- log_info ((const char *)bp -> name);
+ log_info ("%s", (const char *)bp -> name);
}
}
}
@@ -396,8 +414,13 @@ char *print_dotted_quads (len, data)
i = 0;
+ /* %Audit% Loop bounds checks to 21 bytes. %2004.06.17,Safe%
+ * The sprintf can't exceed 18 bytes, and since the loop enforces
+ * 21 bytes of space per iteration at no time can we exit the
+ * loop without at least 3 bytes spare.
+ */
do {
- sprintf (s, "%d.%d.%d.%d, ",
+ sprintf (s, "%u.%u.%u.%u, ",
data [i], data [i + 1], data [i + 2], data [i + 3]);
s += strlen (s);
i += 4;
@@ -1248,6 +1271,9 @@ void print_dns_status (int status, ns_updque *uq)
case T_TXT:
en = "TXT";
break;
+ case T_KEY:
+ en = "KEY";
+ break;
case T_CNAME:
en = "CNAME";
break;
@@ -1268,13 +1294,19 @@ void print_dns_status (int status, ns_updque *uq)
if (s + 1 < end)
*s++ = '"';
}
- if (s + u -> r_size < end) {
- memcpy (s, u -> r_data, u -> r_size);
- s += u -> r_size;
- if (u -> r_type == T_TXT) {
- if (s + 1 < end)
- *s++ = '"';
- }
+ if(u->r_type == T_KEY) {
+ strcat(s, "<keydata>");
+ s+=strlen("<keydata>");
+ }
+ else {
+ if (s + u -> r_size < end) {
+ memcpy (s, u -> r_data, u -> r_size);
+ s += u -> r_size;
+ if (u -> r_type == T_TXT) {
+ if (s + 1 < end)
+ *s++ = '"';
+ }
+ }
}
}
if (position) {
diff --git a/common/raw.c b/common/raw.c
index c56b6816..734c7000 100644
--- a/common/raw.c
+++ b/common/raw.c
@@ -16,39 +16,30 @@
Sigh. */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -56,7 +47,7 @@
#ifndef lint
static char copyright[] =
-"$Id: raw.c,v 1.17 2000/03/17 03:59:01 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: raw.c,v 1.18 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/resolv.c b/common/resolv.c
index 396f9ef7..61ff3a7d 100644
--- a/common/resolv.c
+++ b/common/resolv.c
@@ -3,39 +3,30 @@
Parser for /etc/resolv.conf file. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: resolv.c,v 1.16 2001/05/02 06:39:43 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: resolv.c,v 1.17 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/socket.c b/common/socket.c
index 9e1c89da..714321a5 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -3,39 +3,30 @@
BSD socket interface code... */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -51,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.57 2002/06/09 22:19:37 murray Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.58 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/tables.c b/common/tables.c
index d7c7b6c8..66021bb8 100644
--- a/common/tables.c
+++ b/common/tables.c
@@ -3,39 +3,30 @@
Tables of information... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,16 +34,17 @@
#ifndef lint
static char copyright[] =
-"$Id: tables.c,v 1.52 2001/06/27 00:29:58 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tables.c,v 1.53 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* XXXDPN: Moved here from hash.c, when it moved to libomapi. Not sure
where these really belong. */
-HASH_FUNCTIONS (group, const char *, struct group_object)
-HASH_FUNCTIONS (universe, const char *, struct universe)
-HASH_FUNCTIONS (option, const char *, struct option)
+HASH_FUNCTIONS (group, const char *, struct group_object, group_hash_t,
+ group_reference, group_dereference)
+HASH_FUNCTIONS (universe, const char *, struct universe, universe_hash_t, 0, 0)
+HASH_FUNCTIONS (option, const char *, struct option, option_hash_t, 0, 0)
/* DHCP Option names, formats and codes, from RFC1533.
@@ -178,181 +170,181 @@ struct option dhcp_options [256] = {
{ "user-class", "t", &dhcp_universe, 77 },
{ "slp-directory-agent", "fIa", &dhcp_universe, 78 },
{ "slp-service-scope", "fto", &dhcp_universe, 79 },
- { "#80", "X", &dhcp_universe, 80 },
+ { "unknown-80", "X", &dhcp_universe, 80 },
{ "fqdn", "Efqdn.", &dhcp_universe, 81 },
{ "relay-agent-information", "Eagent.", &dhcp_universe, 82 },
- { "#83", "X", &dhcp_universe, 83 },
- { "#84", "X", &dhcp_universe, 84 },
+ { "unknown-83", "X", &dhcp_universe, 83 },
+ { "unknown-84", "X", &dhcp_universe, 84 },
{ "nds-servers", "IA", &dhcp_universe, 85 },
{ "nds-tree-name", "X", &dhcp_universe, 86 },
{ "nds-context", "X", &dhcp_universe, 87 },
- { "#88", "X", &dhcp_universe, 88 },
- { "#89", "X", &dhcp_universe, 89 },
- { "#90", "X", &dhcp_universe, 90 },
- { "#91", "X", &dhcp_universe, 91 },
- { "#92", "X", &dhcp_universe, 92 },
- { "#93", "X", &dhcp_universe, 93 },
- { "#94", "X", &dhcp_universe, 94 },
- { "#95", "X", &dhcp_universe, 95 },
- { "#96", "X", &dhcp_universe, 96 },
- { "#97", "X", &dhcp_universe, 97 },
+ { "unknown-88", "X", &dhcp_universe, 88 },
+ { "unknown-89", "X", &dhcp_universe, 89 },
+ { "unknown-90", "X", &dhcp_universe, 90 },
+ { "unknown-91", "X", &dhcp_universe, 91 },
+ { "unknown-92", "X", &dhcp_universe, 92 },
+ { "unknown-93", "X", &dhcp_universe, 93 },
+ { "unknown-94", "X", &dhcp_universe, 94 },
+ { "unknown-95", "X", &dhcp_universe, 95 },
+ { "unknown-96", "X", &dhcp_universe, 96 },
+ { "unknown-97", "X", &dhcp_universe, 97 },
{ "uap-servers", "t", &dhcp_universe, 98 },
- { "#99", "X", &dhcp_universe, 99 },
- { "#100", "X", &dhcp_universe, 100 },
- { "#101", "X", &dhcp_universe, 101 },
- { "#102", "X", &dhcp_universe, 102 },
- { "#103", "X", &dhcp_universe, 103 },
- { "#104", "X", &dhcp_universe, 104 },
- { "#105", "X", &dhcp_universe, 105 },
- { "#106", "X", &dhcp_universe, 106 },
- { "#107", "X", &dhcp_universe, 107 },
- { "#108", "X", &dhcp_universe, 108 },
- { "#109", "X", &dhcp_universe, 109 },
- { "#110", "X", &dhcp_universe, 110 },
- { "#111", "X", &dhcp_universe, 111 },
- { "#112", "X", &dhcp_universe, 112 },
- { "#113", "X", &dhcp_universe, 113 },
- { "#114", "X", &dhcp_universe, 114 },
- { "#115", "X", &dhcp_universe, 115 },
- { "#116", "X", &dhcp_universe, 116 },
- { "#117", "X", &dhcp_universe, 117 },
+ { "unknown-99", "X", &dhcp_universe, 99 },
+ { "unknown-100", "X", &dhcp_universe, 100 },
+ { "unknown-101", "X", &dhcp_universe, 101 },
+ { "unknown-102", "X", &dhcp_universe, 102 },
+ { "unknown-103", "X", &dhcp_universe, 103 },
+ { "unknown-104", "X", &dhcp_universe, 104 },
+ { "unknown-105", "X", &dhcp_universe, 105 },
+ { "unknown-106", "X", &dhcp_universe, 106 },
+ { "unknown-107", "X", &dhcp_universe, 107 },
+ { "unknown-108", "X", &dhcp_universe, 108 },
+ { "unknown-109", "X", &dhcp_universe, 109 },
+ { "unknown-110", "X", &dhcp_universe, 110 },
+ { "unknown-111", "X", &dhcp_universe, 111 },
+ { "unknown-112", "X", &dhcp_universe, 112 },
+ { "unknown-113", "X", &dhcp_universe, 113 },
+ { "unknown-114", "X", &dhcp_universe, 114 },
+ { "unknown-115", "X", &dhcp_universe, 115 },
+ { "unknown-116", "X", &dhcp_universe, 116 },
+ { "unknown-117", "X", &dhcp_universe, 117 },
{ "subnet-selection", "X", &dhcp_universe, 118 },
- { "#119", "X", &dhcp_universe, 119 },
- { "#120", "X", &dhcp_universe, 120 },
- { "#121", "X", &dhcp_universe, 121 },
- { "#122", "X", &dhcp_universe, 122 },
- { "#123", "X", &dhcp_universe, 123 },
- { "#124", "X", &dhcp_universe, 124 },
- { "#125", "X", &dhcp_universe, 125 },
- { "#126", "X", &dhcp_universe, 126 },
- { "#127", "X", &dhcp_universe, 127 },
- { "#128", "X", &dhcp_universe, 128 },
- { "#129", "X", &dhcp_universe, 129 },
- { "#130", "X", &dhcp_universe, 130 },
- { "#131", "X", &dhcp_universe, 131 },
- { "#132", "X", &dhcp_universe, 132 },
- { "#133", "X", &dhcp_universe, 133 },
- { "#134", "X", &dhcp_universe, 134 },
- { "#135", "X", &dhcp_universe, 135 },
- { "#136", "X", &dhcp_universe, 136 },
- { "#137", "X", &dhcp_universe, 137 },
- { "#138", "X", &dhcp_universe, 138 },
- { "#139", "X", &dhcp_universe, 139 },
- { "#140", "X", &dhcp_universe, 140 },
- { "#141", "X", &dhcp_universe, 141 },
- { "#142", "X", &dhcp_universe, 142 },
- { "#143", "X", &dhcp_universe, 143 },
- { "#144", "X", &dhcp_universe, 144 },
- { "#145", "X", &dhcp_universe, 145 },
- { "#146", "X", &dhcp_universe, 146 },
- { "#147", "X", &dhcp_universe, 147 },
- { "#148", "X", &dhcp_universe, 148 },
- { "#149", "X", &dhcp_universe, 149 },
- { "#150", "X", &dhcp_universe, 150 },
- { "#151", "X", &dhcp_universe, 151 },
- { "#152", "X", &dhcp_universe, 152 },
- { "#153", "X", &dhcp_universe, 153 },
- { "#154", "X", &dhcp_universe, 154 },
- { "#155", "X", &dhcp_universe, 155 },
- { "#156", "X", &dhcp_universe, 156 },
- { "#157", "X", &dhcp_universe, 157 },
- { "#158", "X", &dhcp_universe, 158 },
- { "#159", "X", &dhcp_universe, 159 },
- { "#160", "X", &dhcp_universe, 160 },
- { "#161", "X", &dhcp_universe, 161 },
- { "#162", "X", &dhcp_universe, 162 },
- { "#163", "X", &dhcp_universe, 163 },
- { "#164", "X", &dhcp_universe, 164 },
- { "#165", "X", &dhcp_universe, 165 },
- { "#166", "X", &dhcp_universe, 166 },
- { "#167", "X", &dhcp_universe, 167 },
- { "#168", "X", &dhcp_universe, 168 },
- { "#169", "X", &dhcp_universe, 169 },
- { "#170", "X", &dhcp_universe, 170 },
- { "#171", "X", &dhcp_universe, 171 },
- { "#172", "X", &dhcp_universe, 172 },
- { "#173", "X", &dhcp_universe, 173 },
- { "#174", "X", &dhcp_universe, 174 },
- { "#175", "X", &dhcp_universe, 175 },
- { "#176", "X", &dhcp_universe, 176 },
- { "#177", "X", &dhcp_universe, 177 },
- { "#178", "X", &dhcp_universe, 178 },
- { "#179", "X", &dhcp_universe, 179 },
- { "#180", "X", &dhcp_universe, 180 },
- { "#181", "X", &dhcp_universe, 181 },
- { "#182", "X", &dhcp_universe, 182 },
- { "#183", "X", &dhcp_universe, 183 },
- { "#184", "X", &dhcp_universe, 184 },
- { "#185", "X", &dhcp_universe, 185 },
- { "#186", "X", &dhcp_universe, 186 },
- { "#187", "X", &dhcp_universe, 187 },
- { "#188", "X", &dhcp_universe, 188 },
- { "#189", "X", &dhcp_universe, 189 },
- { "#190", "X", &dhcp_universe, 190 },
- { "#191", "X", &dhcp_universe, 191 },
- { "#192", "X", &dhcp_universe, 192 },
- { "#193", "X", &dhcp_universe, 193 },
- { "#194", "X", &dhcp_universe, 194 },
- { "#195", "X", &dhcp_universe, 195 },
- { "#196", "X", &dhcp_universe, 196 },
- { "#197", "X", &dhcp_universe, 197 },
- { "#198", "X", &dhcp_universe, 198 },
- { "#199", "X", &dhcp_universe, 199 },
- { "#200", "X", &dhcp_universe, 200 },
- { "#201", "X", &dhcp_universe, 201 },
- { "#202", "X", &dhcp_universe, 202 },
- { "#203", "X", &dhcp_universe, 203 },
- { "#204", "X", &dhcp_universe, 204 },
- { "#205", "X", &dhcp_universe, 205 },
- { "#206", "X", &dhcp_universe, 206 },
- { "#207", "X", &dhcp_universe, 207 },
- { "#208", "X", &dhcp_universe, 208 },
- { "#209", "X", &dhcp_universe, 209 },
+ { "unknown-119", "X", &dhcp_universe, 119 },
+ { "unknown-120", "X", &dhcp_universe, 120 },
+ { "unknown-121", "X", &dhcp_universe, 121 },
+ { "unknown-122", "X", &dhcp_universe, 122 },
+ { "unknown-123", "X", &dhcp_universe, 123 },
+ { "unknown-124", "X", &dhcp_universe, 124 },
+ { "unknown-125", "X", &dhcp_universe, 125 },
+ { "unknown-126", "X", &dhcp_universe, 126 },
+ { "unknown-127", "X", &dhcp_universe, 127 },
+ { "unknown-128", "X", &dhcp_universe, 128 },
+ { "unknown-129", "X", &dhcp_universe, 129 },
+ { "unknown-130", "X", &dhcp_universe, 130 },
+ { "unknown-131", "X", &dhcp_universe, 131 },
+ { "unknown-132", "X", &dhcp_universe, 132 },
+ { "unknown-133", "X", &dhcp_universe, 133 },
+ { "unknown-134", "X", &dhcp_universe, 134 },
+ { "unknown-135", "X", &dhcp_universe, 135 },
+ { "unknown-136", "X", &dhcp_universe, 136 },
+ { "unknown-137", "X", &dhcp_universe, 137 },
+ { "unknown-138", "X", &dhcp_universe, 138 },
+ { "unknown-139", "X", &dhcp_universe, 139 },
+ { "unknown-140", "X", &dhcp_universe, 140 },
+ { "unknown-141", "X", &dhcp_universe, 141 },
+ { "unknown-142", "X", &dhcp_universe, 142 },
+ { "unknown-143", "X", &dhcp_universe, 143 },
+ { "unknown-144", "X", &dhcp_universe, 144 },
+ { "unknown-145", "X", &dhcp_universe, 145 },
+ { "unknown-146", "X", &dhcp_universe, 146 },
+ { "unknown-147", "X", &dhcp_universe, 147 },
+ { "unknown-148", "X", &dhcp_universe, 148 },
+ { "unknown-149", "X", &dhcp_universe, 149 },
+ { "unknown-150", "X", &dhcp_universe, 150 },
+ { "unknown-151", "X", &dhcp_universe, 151 },
+ { "unknown-152", "X", &dhcp_universe, 152 },
+ { "unknown-153", "X", &dhcp_universe, 153 },
+ { "unknown-154", "X", &dhcp_universe, 154 },
+ { "unknown-155", "X", &dhcp_universe, 155 },
+ { "unknown-156", "X", &dhcp_universe, 156 },
+ { "unknown-157", "X", &dhcp_universe, 157 },
+ { "unknown-158", "X", &dhcp_universe, 158 },
+ { "unknown-159", "X", &dhcp_universe, 159 },
+ { "unknown-160", "X", &dhcp_universe, 160 },
+ { "unknown-161", "X", &dhcp_universe, 161 },
+ { "unknown-162", "X", &dhcp_universe, 162 },
+ { "unknown-163", "X", &dhcp_universe, 163 },
+ { "unknown-164", "X", &dhcp_universe, 164 },
+ { "unknown-165", "X", &dhcp_universe, 165 },
+ { "unknown-166", "X", &dhcp_universe, 166 },
+ { "unknown-167", "X", &dhcp_universe, 167 },
+ { "unknown-168", "X", &dhcp_universe, 168 },
+ { "unknown-169", "X", &dhcp_universe, 169 },
+ { "unknown-170", "X", &dhcp_universe, 170 },
+ { "unknown-171", "X", &dhcp_universe, 171 },
+ { "unknown-172", "X", &dhcp_universe, 172 },
+ { "unknown-173", "X", &dhcp_universe, 173 },
+ { "unknown-174", "X", &dhcp_universe, 174 },
+ { "unknown-175", "X", &dhcp_universe, 175 },
+ { "unknown-176", "X", &dhcp_universe, 176 },
+ { "unknown-177", "X", &dhcp_universe, 177 },
+ { "unknown-178", "X", &dhcp_universe, 178 },
+ { "unknown-179", "X", &dhcp_universe, 179 },
+ { "unknown-180", "X", &dhcp_universe, 180 },
+ { "unknown-181", "X", &dhcp_universe, 181 },
+ { "unknown-182", "X", &dhcp_universe, 182 },
+ { "unknown-183", "X", &dhcp_universe, 183 },
+ { "unknown-184", "X", &dhcp_universe, 184 },
+ { "unknown-185", "X", &dhcp_universe, 185 },
+ { "unknown-186", "X", &dhcp_universe, 186 },
+ { "unknown-187", "X", &dhcp_universe, 187 },
+ { "unknown-188", "X", &dhcp_universe, 188 },
+ { "unknown-189", "X", &dhcp_universe, 189 },
+ { "unknown-190", "X", &dhcp_universe, 190 },
+ { "unknown-191", "X", &dhcp_universe, 191 },
+ { "unknown-192", "X", &dhcp_universe, 192 },
+ { "unknown-193", "X", &dhcp_universe, 193 },
+ { "unknown-194", "X", &dhcp_universe, 194 },
+ { "unknown-195", "X", &dhcp_universe, 195 },
+ { "unknown-196", "X", &dhcp_universe, 196 },
+ { "unknown-197", "X", &dhcp_universe, 197 },
+ { "unknown-198", "X", &dhcp_universe, 198 },
+ { "unknown-199", "X", &dhcp_universe, 199 },
+ { "unknown-200", "X", &dhcp_universe, 200 },
+ { "unknown-201", "X", &dhcp_universe, 201 },
+ { "unknown-202", "X", &dhcp_universe, 202 },
+ { "unknown-203", "X", &dhcp_universe, 203 },
+ { "unknown-204", "X", &dhcp_universe, 204 },
+ { "unknown-205", "X", &dhcp_universe, 205 },
+ { "unknown-206", "X", &dhcp_universe, 206 },
+ { "unknown-207", "X", &dhcp_universe, 207 },
+ { "unknown-208", "X", &dhcp_universe, 208 },
+ { "unknown-209", "X", &dhcp_universe, 209 },
{ "authenticate", "X", &dhcp_universe, 210 },
- { "#211", "X", &dhcp_universe, 211 },
- { "#212", "X", &dhcp_universe, 212 },
- { "#213", "X", &dhcp_universe, 213 },
- { "#214", "X", &dhcp_universe, 214 },
- { "#215", "X", &dhcp_universe, 215 },
- { "#216", "X", &dhcp_universe, 216 },
- { "#217", "X", &dhcp_universe, 217 },
- { "#218", "X", &dhcp_universe, 218 },
- { "#219", "X", &dhcp_universe, 219 },
- { "#220", "X", &dhcp_universe, 220 },
- { "#221", "X", &dhcp_universe, 221 },
- { "#222", "X", &dhcp_universe, 222 },
- { "#223", "X", &dhcp_universe, 223 },
- { "#224", "X", &dhcp_universe, 224 },
- { "#225", "X", &dhcp_universe, 225 },
- { "#226", "X", &dhcp_universe, 226 },
- { "#227", "X", &dhcp_universe, 227 },
- { "#228", "X", &dhcp_universe, 228 },
- { "#229", "X", &dhcp_universe, 229 },
- { "#230", "X", &dhcp_universe, 230 },
- { "#231", "X", &dhcp_universe, 231 },
- { "#232", "X", &dhcp_universe, 232 },
- { "#233", "X", &dhcp_universe, 233 },
- { "#234", "X", &dhcp_universe, 234 },
- { "#235", "X", &dhcp_universe, 235 },
- { "#236", "X", &dhcp_universe, 236 },
- { "#237", "X", &dhcp_universe, 237 },
- { "#238", "X", &dhcp_universe, 238 },
- { "#239", "X", &dhcp_universe, 239 },
- { "#240", "X", &dhcp_universe, 240 },
- { "#241", "X", &dhcp_universe, 241 },
- { "#242", "X", &dhcp_universe, 242 },
- { "#243", "X", &dhcp_universe, 243 },
- { "#244", "X", &dhcp_universe, 244 },
- { "#245", "X", &dhcp_universe, 245 },
- { "#246", "X", &dhcp_universe, 246 },
- { "#247", "X", &dhcp_universe, 247 },
- { "#248", "X", &dhcp_universe, 248 },
- { "#249", "X", &dhcp_universe, 249 },
- { "#250", "X", &dhcp_universe, 250 },
- { "#251", "X", &dhcp_universe, 251 },
- { "#252", "X", &dhcp_universe, 252 },
- { "#253", "X", &dhcp_universe, 253 },
- { "#254", "X", &dhcp_universe, 254 },
+ { "unknown-211", "X", &dhcp_universe, 211 },
+ { "unknown-212", "X", &dhcp_universe, 212 },
+ { "unknown-213", "X", &dhcp_universe, 213 },
+ { "unknown-214", "X", &dhcp_universe, 214 },
+ { "unknown-215", "X", &dhcp_universe, 215 },
+ { "unknown-216", "X", &dhcp_universe, 216 },
+ { "unknown-217", "X", &dhcp_universe, 217 },
+ { "unknown-218", "X", &dhcp_universe, 218 },
+ { "unknown-219", "X", &dhcp_universe, 219 },
+ { "unknown-220", "X", &dhcp_universe, 220 },
+ { "unknown-221", "X", &dhcp_universe, 221 },
+ { "unknown-222", "X", &dhcp_universe, 222 },
+ { "unknown-223", "X", &dhcp_universe, 223 },
+ { "unknown-224", "X", &dhcp_universe, 224 },
+ { "unknown-225", "X", &dhcp_universe, 225 },
+ { "unknown-226", "X", &dhcp_universe, 226 },
+ { "unknown-227", "X", &dhcp_universe, 227 },
+ { "unknown-228", "X", &dhcp_universe, 228 },
+ { "unknown-229", "X", &dhcp_universe, 229 },
+ { "unknown-230", "X", &dhcp_universe, 230 },
+ { "unknown-231", "X", &dhcp_universe, 231 },
+ { "unknown-232", "X", &dhcp_universe, 232 },
+ { "unknown-233", "X", &dhcp_universe, 233 },
+ { "unknown-234", "X", &dhcp_universe, 234 },
+ { "unknown-235", "X", &dhcp_universe, 235 },
+ { "unknown-236", "X", &dhcp_universe, 236 },
+ { "unknown-237", "X", &dhcp_universe, 237 },
+ { "unknown-238", "X", &dhcp_universe, 238 },
+ { "unknown-239", "X", &dhcp_universe, 239 },
+ { "unknown-240", "X", &dhcp_universe, 240 },
+ { "unknown-241", "X", &dhcp_universe, 241 },
+ { "unknown-242", "X", &dhcp_universe, 242 },
+ { "unknown-243", "X", &dhcp_universe, 243 },
+ { "unknown-244", "X", &dhcp_universe, 244 },
+ { "unknown-245", "X", &dhcp_universe, 245 },
+ { "unknown-246", "X", &dhcp_universe, 246 },
+ { "unknown-247", "X", &dhcp_universe, 247 },
+ { "unknown-248", "X", &dhcp_universe, 248 },
+ { "unknown-249", "X", &dhcp_universe, 249 },
+ { "unknown-250", "X", &dhcp_universe, 250 },
+ { "unknown-251", "X", &dhcp_universe, 251 },
+ { "unknown-252", "X", &dhcp_universe, 252 },
+ { "unknown-253", "X", &dhcp_universe, 253 },
+ { "unknown-254", "X", &dhcp_universe, 254 },
{ "option-end", "e", &dhcp_universe, 255 },
};
@@ -370,250 +362,250 @@ struct option nwip_options [256] = {
{ "autoretry-secs", "B", &nwip_universe, 9 },
{ "nwip-1-1", "f", &nwip_universe, 10 },
{ "primary-dss", "I", &nwip_universe, 11 },
- { "#12", "X", &nwip_universe, 12 },
- { "#13", "X", &nwip_universe, 13 },
- { "#14", "X", &nwip_universe, 14 },
- { "#15", "X", &nwip_universe, 15 },
- { "#16", "X", &nwip_universe, 16 },
- { "#17", "X", &nwip_universe, 17 },
- { "#18", "X", &nwip_universe, 18 },
- { "#19", "X", &nwip_universe, 19 },
- { "#20", "X", &nwip_universe, 20 },
- { "#21", "X", &nwip_universe, 21 },
- { "#22", "X", &nwip_universe, 22 },
- { "#23", "X", &nwip_universe, 23 },
- { "#24", "X", &nwip_universe, 24 },
- { "#25", "X", &nwip_universe, 25 },
- { "#26", "X", &nwip_universe, 26 },
- { "#27", "X", &nwip_universe, 27 },
- { "#28", "X", &nwip_universe, 28 },
- { "#29", "X", &nwip_universe, 29 },
- { "#30", "X", &nwip_universe, 30 },
- { "#31", "X", &nwip_universe, 31 },
- { "#32", "X", &nwip_universe, 32 },
- { "#33", "X", &nwip_universe, 33 },
- { "#34", "X", &nwip_universe, 34 },
- { "#35", "X", &nwip_universe, 35 },
- { "#36", "X", &nwip_universe, 36 },
- { "#37", "X", &nwip_universe, 37 },
- { "#38", "X", &nwip_universe, 38 },
- { "#39", "X", &nwip_universe, 39 },
- { "#40", "X", &nwip_universe, 40 },
- { "#41", "X", &nwip_universe, 41 },
- { "#42", "X", &nwip_universe, 42 },
- { "#43", "X", &nwip_universe, 43 },
- { "#44", "X", &nwip_universe, 44 },
- { "#45", "X", &nwip_universe, 45 },
- { "#46", "X", &nwip_universe, 46 },
- { "#47", "X", &nwip_universe, 47 },
- { "#48", "X", &nwip_universe, 48 },
- { "#49", "X", &nwip_universe, 49 },
- { "#50", "X", &nwip_universe, 50 },
- { "#51", "X", &nwip_universe, 51 },
- { "#52", "X", &nwip_universe, 52 },
- { "#53", "X", &nwip_universe, 53 },
- { "#54", "X", &nwip_universe, 54 },
- { "#55", "X", &nwip_universe, 55 },
- { "#56", "X", &nwip_universe, 56 },
- { "#57", "X", &nwip_universe, 57 },
- { "#58", "X", &nwip_universe, 58 },
- { "#59", "X", &nwip_universe, 59 },
- { "#60", "X", &nwip_universe, 60 },
- { "#61", "X", &nwip_universe, 61 },
- { "#62", "X", &nwip_universe, 62 },
- { "#63", "X", &nwip_universe, 63 },
- { "#64", "X", &nwip_universe, 64 },
- { "#65", "X", &nwip_universe, 65 },
- { "#66", "X", &nwip_universe, 66 },
- { "#67", "X", &nwip_universe, 67 },
- { "#68", "X", &nwip_universe, 68 },
- { "#69", "X", &nwip_universe, 69 },
- { "#70", "X", &nwip_universe, 70 },
- { "#71", "X", &nwip_universe, 71 },
- { "#72", "X", &nwip_universe, 72 },
- { "#73", "X", &nwip_universe, 73 },
- { "#74", "X", &nwip_universe, 74 },
- { "#75", "X", &nwip_universe, 75 },
- { "#76", "X", &nwip_universe, 76 },
- { "#77", "X", &nwip_universe, 77 },
- { "#78", "X", &nwip_universe, 78 },
- { "#79", "X", &nwip_universe, 79 },
- { "#80", "X", &nwip_universe, 80 },
- { "#81", "X", &nwip_universe, 81 },
- { "#82", "X", &nwip_universe, 82 },
- { "#83", "X", &nwip_universe, 83 },
- { "#84", "X", &nwip_universe, 84 },
- { "#85", "X", &nwip_universe, 85 },
- { "#86", "X", &nwip_universe, 86 },
- { "#87", "X", &nwip_universe, 87 },
- { "#88", "X", &nwip_universe, 88 },
- { "#89", "X", &nwip_universe, 89 },
- { "#90", "X", &nwip_universe, 90 },
- { "#91", "X", &nwip_universe, 91 },
- { "#92", "X", &nwip_universe, 92 },
- { "#93", "X", &nwip_universe, 93 },
- { "#94", "X", &nwip_universe, 94 },
- { "#95", "X", &nwip_universe, 95 },
- { "#96", "X", &nwip_universe, 96 },
- { "#97", "X", &nwip_universe, 97 },
- { "#98", "X", &nwip_universe, 98 },
- { "#99", "X", &nwip_universe, 99 },
- { "#100", "X", &nwip_universe, 100 },
- { "#101", "X", &nwip_universe, 101 },
- { "#102", "X", &nwip_universe, 102 },
- { "#103", "X", &nwip_universe, 103 },
- { "#104", "X", &nwip_universe, 104 },
- { "#105", "X", &nwip_universe, 105 },
- { "#106", "X", &nwip_universe, 106 },
- { "#107", "X", &nwip_universe, 107 },
- { "#108", "X", &nwip_universe, 108 },
- { "#109", "X", &nwip_universe, 109 },
- { "#110", "X", &nwip_universe, 110 },
- { "#111", "X", &nwip_universe, 111 },
- { "#112", "X", &nwip_universe, 112 },
- { "#113", "X", &nwip_universe, 113 },
- { "#114", "X", &nwip_universe, 114 },
- { "#115", "X", &nwip_universe, 115 },
- { "#116", "X", &nwip_universe, 116 },
- { "#117", "X", &nwip_universe, 117 },
- { "#118", "X", &nwip_universe, 118 },
- { "#119", "X", &nwip_universe, 119 },
- { "#120", "X", &nwip_universe, 120 },
- { "#121", "X", &nwip_universe, 121 },
- { "#122", "X", &nwip_universe, 122 },
- { "#123", "X", &nwip_universe, 123 },
- { "#124", "X", &nwip_universe, 124 },
- { "#125", "X", &nwip_universe, 125 },
- { "#126", "X", &nwip_universe, 126 },
- { "#127", "X", &nwip_universe, 127 },
- { "#128", "X", &nwip_universe, 128 },
- { "#129", "X", &nwip_universe, 129 },
- { "#130", "X", &nwip_universe, 130 },
- { "#131", "X", &nwip_universe, 131 },
- { "#132", "X", &nwip_universe, 132 },
- { "#133", "X", &nwip_universe, 133 },
- { "#134", "X", &nwip_universe, 134 },
- { "#135", "X", &nwip_universe, 135 },
- { "#136", "X", &nwip_universe, 136 },
- { "#137", "X", &nwip_universe, 137 },
- { "#138", "X", &nwip_universe, 138 },
- { "#139", "X", &nwip_universe, 139 },
- { "#140", "X", &nwip_universe, 140 },
- { "#141", "X", &nwip_universe, 141 },
- { "#142", "X", &nwip_universe, 142 },
- { "#143", "X", &nwip_universe, 143 },
- { "#144", "X", &nwip_universe, 144 },
- { "#145", "X", &nwip_universe, 145 },
- { "#146", "X", &nwip_universe, 146 },
- { "#147", "X", &nwip_universe, 147 },
- { "#148", "X", &nwip_universe, 148 },
- { "#149", "X", &nwip_universe, 149 },
- { "#150", "X", &nwip_universe, 150 },
- { "#151", "X", &nwip_universe, 151 },
- { "#152", "X", &nwip_universe, 152 },
- { "#153", "X", &nwip_universe, 153 },
- { "#154", "X", &nwip_universe, 154 },
- { "#155", "X", &nwip_universe, 155 },
- { "#156", "X", &nwip_universe, 156 },
- { "#157", "X", &nwip_universe, 157 },
- { "#158", "X", &nwip_universe, 158 },
- { "#159", "X", &nwip_universe, 159 },
- { "#160", "X", &nwip_universe, 160 },
- { "#161", "X", &nwip_universe, 161 },
- { "#162", "X", &nwip_universe, 162 },
- { "#163", "X", &nwip_universe, 163 },
- { "#164", "X", &nwip_universe, 164 },
- { "#165", "X", &nwip_universe, 165 },
- { "#166", "X", &nwip_universe, 166 },
- { "#167", "X", &nwip_universe, 167 },
- { "#168", "X", &nwip_universe, 168 },
- { "#169", "X", &nwip_universe, 169 },
- { "#170", "X", &nwip_universe, 170 },
- { "#171", "X", &nwip_universe, 171 },
- { "#172", "X", &nwip_universe, 172 },
- { "#173", "X", &nwip_universe, 173 },
- { "#174", "X", &nwip_universe, 174 },
- { "#175", "X", &nwip_universe, 175 },
- { "#176", "X", &nwip_universe, 176 },
- { "#177", "X", &nwip_universe, 177 },
- { "#178", "X", &nwip_universe, 178 },
- { "#179", "X", &nwip_universe, 179 },
- { "#180", "X", &nwip_universe, 180 },
- { "#181", "X", &nwip_universe, 181 },
- { "#182", "X", &nwip_universe, 182 },
- { "#183", "X", &nwip_universe, 183 },
- { "#184", "X", &nwip_universe, 184 },
- { "#185", "X", &nwip_universe, 185 },
- { "#186", "X", &nwip_universe, 186 },
- { "#187", "X", &nwip_universe, 187 },
- { "#188", "X", &nwip_universe, 188 },
- { "#189", "X", &nwip_universe, 189 },
- { "#190", "X", &nwip_universe, 190 },
- { "#191", "X", &nwip_universe, 191 },
- { "#192", "X", &nwip_universe, 192 },
- { "#193", "X", &nwip_universe, 193 },
- { "#194", "X", &nwip_universe, 194 },
- { "#195", "X", &nwip_universe, 195 },
- { "#196", "X", &nwip_universe, 196 },
- { "#197", "X", &nwip_universe, 197 },
- { "#198", "X", &nwip_universe, 198 },
- { "#199", "X", &nwip_universe, 199 },
- { "#200", "X", &nwip_universe, 200 },
- { "#201", "X", &nwip_universe, 201 },
- { "#202", "X", &nwip_universe, 202 },
- { "#203", "X", &nwip_universe, 203 },
- { "#204", "X", &nwip_universe, 204 },
- { "#205", "X", &nwip_universe, 205 },
- { "#206", "X", &nwip_universe, 206 },
- { "#207", "X", &nwip_universe, 207 },
- { "#208", "X", &nwip_universe, 208 },
- { "#209", "X", &nwip_universe, 209 },
- { "#210", "X", &nwip_universe, 210 },
- { "#211", "X", &nwip_universe, 211 },
- { "#212", "X", &nwip_universe, 212 },
- { "#213", "X", &nwip_universe, 213 },
- { "#214", "X", &nwip_universe, 214 },
- { "#215", "X", &nwip_universe, 215 },
- { "#216", "X", &nwip_universe, 216 },
- { "#217", "X", &nwip_universe, 217 },
- { "#218", "X", &nwip_universe, 218 },
- { "#219", "X", &nwip_universe, 219 },
- { "#220", "X", &nwip_universe, 220 },
- { "#221", "X", &nwip_universe, 221 },
- { "#222", "X", &nwip_universe, 222 },
- { "#223", "X", &nwip_universe, 223 },
- { "#224", "X", &nwip_universe, 224 },
- { "#225", "X", &nwip_universe, 225 },
- { "#226", "X", &nwip_universe, 226 },
- { "#227", "X", &nwip_universe, 227 },
- { "#228", "X", &nwip_universe, 228 },
- { "#229", "X", &nwip_universe, 229 },
- { "#230", "X", &nwip_universe, 230 },
- { "#231", "X", &nwip_universe, 231 },
- { "#232", "X", &nwip_universe, 232 },
- { "#233", "X", &nwip_universe, 233 },
- { "#234", "X", &nwip_universe, 234 },
- { "#235", "X", &nwip_universe, 235 },
- { "#236", "X", &nwip_universe, 236 },
- { "#237", "X", &nwip_universe, 237 },
- { "#238", "X", &nwip_universe, 238 },
- { "#239", "X", &nwip_universe, 239 },
- { "#240", "X", &nwip_universe, 240 },
- { "#241", "X", &nwip_universe, 241 },
- { "#242", "X", &nwip_universe, 242 },
- { "#243", "X", &nwip_universe, 243 },
- { "#244", "X", &nwip_universe, 244 },
- { "#245", "X", &nwip_universe, 245 },
- { "#246", "X", &nwip_universe, 246 },
- { "#247", "X", &nwip_universe, 247 },
- { "#248", "X", &nwip_universe, 248 },
- { "#249", "X", &nwip_universe, 249 },
- { "#250", "X", &nwip_universe, 250 },
- { "#251", "X", &nwip_universe, 251 },
- { "#252", "X", &nwip_universe, 252 },
- { "#253", "X", &nwip_universe, 253 },
- { "#254", "X", &nwip_universe, 254 },
- { "#end", "e", &nwip_universe, 255 },
+ { "unknown-12", "X", &nwip_universe, 12 },
+ { "unknown-13", "X", &nwip_universe, 13 },
+ { "unknown-14", "X", &nwip_universe, 14 },
+ { "unknown-15", "X", &nwip_universe, 15 },
+ { "unknown-16", "X", &nwip_universe, 16 },
+ { "unknown-17", "X", &nwip_universe, 17 },
+ { "unknown-18", "X", &nwip_universe, 18 },
+ { "unknown-19", "X", &nwip_universe, 19 },
+ { "unknown-20", "X", &nwip_universe, 20 },
+ { "unknown-21", "X", &nwip_universe, 21 },
+ { "unknown-22", "X", &nwip_universe, 22 },
+ { "unknown-23", "X", &nwip_universe, 23 },
+ { "unknown-24", "X", &nwip_universe, 24 },
+ { "unknown-25", "X", &nwip_universe, 25 },
+ { "unknown-26", "X", &nwip_universe, 26 },
+ { "unknown-27", "X", &nwip_universe, 27 },
+ { "unknown-28", "X", &nwip_universe, 28 },
+ { "unknown-29", "X", &nwip_universe, 29 },
+ { "unknown-30", "X", &nwip_universe, 30 },
+ { "unknown-31", "X", &nwip_universe, 31 },
+ { "unknown-32", "X", &nwip_universe, 32 },
+ { "unknown-33", "X", &nwip_universe, 33 },
+ { "unknown-34", "X", &nwip_universe, 34 },
+ { "unknown-35", "X", &nwip_universe, 35 },
+ { "unknown-36", "X", &nwip_universe, 36 },
+ { "unknown-37", "X", &nwip_universe, 37 },
+ { "unknown-38", "X", &nwip_universe, 38 },
+ { "unknown-39", "X", &nwip_universe, 39 },
+ { "unknown-40", "X", &nwip_universe, 40 },
+ { "unknown-41", "X", &nwip_universe, 41 },
+ { "unknown-42", "X", &nwip_universe, 42 },
+ { "unknown-43", "X", &nwip_universe, 43 },
+ { "unknown-44", "X", &nwip_universe, 44 },
+ { "unknown-45", "X", &nwip_universe, 45 },
+ { "unknown-46", "X", &nwip_universe, 46 },
+ { "unknown-47", "X", &nwip_universe, 47 },
+ { "unknown-48", "X", &nwip_universe, 48 },
+ { "unknown-49", "X", &nwip_universe, 49 },
+ { "unknown-50", "X", &nwip_universe, 50 },
+ { "unknown-51", "X", &nwip_universe, 51 },
+ { "unknown-52", "X", &nwip_universe, 52 },
+ { "unknown-53", "X", &nwip_universe, 53 },
+ { "unknown-54", "X", &nwip_universe, 54 },
+ { "unknown-55", "X", &nwip_universe, 55 },
+ { "unknown-56", "X", &nwip_universe, 56 },
+ { "unknown-57", "X", &nwip_universe, 57 },
+ { "unknown-58", "X", &nwip_universe, 58 },
+ { "unknown-59", "X", &nwip_universe, 59 },
+ { "unknown-60", "X", &nwip_universe, 60 },
+ { "unknown-61", "X", &nwip_universe, 61 },
+ { "unknown-62", "X", &nwip_universe, 62 },
+ { "unknown-63", "X", &nwip_universe, 63 },
+ { "unknown-64", "X", &nwip_universe, 64 },
+ { "unknown-65", "X", &nwip_universe, 65 },
+ { "unknown-66", "X", &nwip_universe, 66 },
+ { "unknown-67", "X", &nwip_universe, 67 },
+ { "unknown-68", "X", &nwip_universe, 68 },
+ { "unknown-69", "X", &nwip_universe, 69 },
+ { "unknown-70", "X", &nwip_universe, 70 },
+ { "unknown-71", "X", &nwip_universe, 71 },
+ { "unknown-72", "X", &nwip_universe, 72 },
+ { "unknown-73", "X", &nwip_universe, 73 },
+ { "unknown-74", "X", &nwip_universe, 74 },
+ { "unknown-75", "X", &nwip_universe, 75 },
+ { "unknown-76", "X", &nwip_universe, 76 },
+ { "unknown-77", "X", &nwip_universe, 77 },
+ { "unknown-78", "X", &nwip_universe, 78 },
+ { "unknown-79", "X", &nwip_universe, 79 },
+ { "unknown-80", "X", &nwip_universe, 80 },
+ { "unknown-81", "X", &nwip_universe, 81 },
+ { "unknown-82", "X", &nwip_universe, 82 },
+ { "unknown-83", "X", &nwip_universe, 83 },
+ { "unknown-84", "X", &nwip_universe, 84 },
+ { "unknown-85", "X", &nwip_universe, 85 },
+ { "unknown-86", "X", &nwip_universe, 86 },
+ { "unknown-87", "X", &nwip_universe, 87 },
+ { "unknown-88", "X", &nwip_universe, 88 },
+ { "unknown-89", "X", &nwip_universe, 89 },
+ { "unknown-90", "X", &nwip_universe, 90 },
+ { "unknown-91", "X", &nwip_universe, 91 },
+ { "unknown-92", "X", &nwip_universe, 92 },
+ { "unknown-93", "X", &nwip_universe, 93 },
+ { "unknown-94", "X", &nwip_universe, 94 },
+ { "unknown-95", "X", &nwip_universe, 95 },
+ { "unknown-96", "X", &nwip_universe, 96 },
+ { "unknown-97", "X", &nwip_universe, 97 },
+ { "unknown-98", "X", &nwip_universe, 98 },
+ { "unknown-99", "X", &nwip_universe, 99 },
+ { "unknown-100", "X", &nwip_universe, 100 },
+ { "unknown-101", "X", &nwip_universe, 101 },
+ { "unknown-102", "X", &nwip_universe, 102 },
+ { "unknown-103", "X", &nwip_universe, 103 },
+ { "unknown-104", "X", &nwip_universe, 104 },
+ { "unknown-105", "X", &nwip_universe, 105 },
+ { "unknown-106", "X", &nwip_universe, 106 },
+ { "unknown-107", "X", &nwip_universe, 107 },
+ { "unknown-108", "X", &nwip_universe, 108 },
+ { "unknown-109", "X", &nwip_universe, 109 },
+ { "unknown-110", "X", &nwip_universe, 110 },
+ { "unknown-111", "X", &nwip_universe, 111 },
+ { "unknown-112", "X", &nwip_universe, 112 },
+ { "unknown-113", "X", &nwip_universe, 113 },
+ { "unknown-114", "X", &nwip_universe, 114 },
+ { "unknown-115", "X", &nwip_universe, 115 },
+ { "unknown-116", "X", &nwip_universe, 116 },
+ { "unknown-117", "X", &nwip_universe, 117 },
+ { "unknown-118", "X", &nwip_universe, 118 },
+ { "unknown-119", "X", &nwip_universe, 119 },
+ { "unknown-120", "X", &nwip_universe, 120 },
+ { "unknown-121", "X", &nwip_universe, 121 },
+ { "unknown-122", "X", &nwip_universe, 122 },
+ { "unknown-123", "X", &nwip_universe, 123 },
+ { "unknown-124", "X", &nwip_universe, 124 },
+ { "unknown-125", "X", &nwip_universe, 125 },
+ { "unknown-126", "X", &nwip_universe, 126 },
+ { "unknown-127", "X", &nwip_universe, 127 },
+ { "unknown-128", "X", &nwip_universe, 128 },
+ { "unknown-129", "X", &nwip_universe, 129 },
+ { "unknown-130", "X", &nwip_universe, 130 },
+ { "unknown-131", "X", &nwip_universe, 131 },
+ { "unknown-132", "X", &nwip_universe, 132 },
+ { "unknown-133", "X", &nwip_universe, 133 },
+ { "unknown-134", "X", &nwip_universe, 134 },
+ { "unknown-135", "X", &nwip_universe, 135 },
+ { "unknown-136", "X", &nwip_universe, 136 },
+ { "unknown-137", "X", &nwip_universe, 137 },
+ { "unknown-138", "X", &nwip_universe, 138 },
+ { "unknown-139", "X", &nwip_universe, 139 },
+ { "unknown-140", "X", &nwip_universe, 140 },
+ { "unknown-141", "X", &nwip_universe, 141 },
+ { "unknown-142", "X", &nwip_universe, 142 },
+ { "unknown-143", "X", &nwip_universe, 143 },
+ { "unknown-144", "X", &nwip_universe, 144 },
+ { "unknown-145", "X", &nwip_universe, 145 },
+ { "unknown-146", "X", &nwip_universe, 146 },
+ { "unknown-147", "X", &nwip_universe, 147 },
+ { "unknown-148", "X", &nwip_universe, 148 },
+ { "unknown-149", "X", &nwip_universe, 149 },
+ { "unknown-150", "X", &nwip_universe, 150 },
+ { "unknown-151", "X", &nwip_universe, 151 },
+ { "unknown-152", "X", &nwip_universe, 152 },
+ { "unknown-153", "X", &nwip_universe, 153 },
+ { "unknown-154", "X", &nwip_universe, 154 },
+ { "unknown-155", "X", &nwip_universe, 155 },
+ { "unknown-156", "X", &nwip_universe, 156 },
+ { "unknown-157", "X", &nwip_universe, 157 },
+ { "unknown-158", "X", &nwip_universe, 158 },
+ { "unknown-159", "X", &nwip_universe, 159 },
+ { "unknown-160", "X", &nwip_universe, 160 },
+ { "unknown-161", "X", &nwip_universe, 161 },
+ { "unknown-162", "X", &nwip_universe, 162 },
+ { "unknown-163", "X", &nwip_universe, 163 },
+ { "unknown-164", "X", &nwip_universe, 164 },
+ { "unknown-165", "X", &nwip_universe, 165 },
+ { "unknown-166", "X", &nwip_universe, 166 },
+ { "unknown-167", "X", &nwip_universe, 167 },
+ { "unknown-168", "X", &nwip_universe, 168 },
+ { "unknown-169", "X", &nwip_universe, 169 },
+ { "unknown-170", "X", &nwip_universe, 170 },
+ { "unknown-171", "X", &nwip_universe, 171 },
+ { "unknown-172", "X", &nwip_universe, 172 },
+ { "unknown-173", "X", &nwip_universe, 173 },
+ { "unknown-174", "X", &nwip_universe, 174 },
+ { "unknown-175", "X", &nwip_universe, 175 },
+ { "unknown-176", "X", &nwip_universe, 176 },
+ { "unknown-177", "X", &nwip_universe, 177 },
+ { "unknown-178", "X", &nwip_universe, 178 },
+ { "unknown-179", "X", &nwip_universe, 179 },
+ { "unknown-180", "X", &nwip_universe, 180 },
+ { "unknown-181", "X", &nwip_universe, 181 },
+ { "unknown-182", "X", &nwip_universe, 182 },
+ { "unknown-183", "X", &nwip_universe, 183 },
+ { "unknown-184", "X", &nwip_universe, 184 },
+ { "unknown-185", "X", &nwip_universe, 185 },
+ { "unknown-186", "X", &nwip_universe, 186 },
+ { "unknown-187", "X", &nwip_universe, 187 },
+ { "unknown-188", "X", &nwip_universe, 188 },
+ { "unknown-189", "X", &nwip_universe, 189 },
+ { "unknown-190", "X", &nwip_universe, 190 },
+ { "unknown-191", "X", &nwip_universe, 191 },
+ { "unknown-192", "X", &nwip_universe, 192 },
+ { "unknown-193", "X", &nwip_universe, 193 },
+ { "unknown-194", "X", &nwip_universe, 194 },
+ { "unknown-195", "X", &nwip_universe, 195 },
+ { "unknown-196", "X", &nwip_universe, 196 },
+ { "unknown-197", "X", &nwip_universe, 197 },
+ { "unknown-198", "X", &nwip_universe, 198 },
+ { "unknown-199", "X", &nwip_universe, 199 },
+ { "unknown-200", "X", &nwip_universe, 200 },
+ { "unknown-201", "X", &nwip_universe, 201 },
+ { "unknown-202", "X", &nwip_universe, 202 },
+ { "unknown-203", "X", &nwip_universe, 203 },
+ { "unknown-204", "X", &nwip_universe, 204 },
+ { "unknown-205", "X", &nwip_universe, 205 },
+ { "unknown-206", "X", &nwip_universe, 206 },
+ { "unknown-207", "X", &nwip_universe, 207 },
+ { "unknown-208", "X", &nwip_universe, 208 },
+ { "unknown-209", "X", &nwip_universe, 209 },
+ { "unknown-210", "X", &nwip_universe, 210 },
+ { "unknown-211", "X", &nwip_universe, 211 },
+ { "unknown-212", "X", &nwip_universe, 212 },
+ { "unknown-213", "X", &nwip_universe, 213 },
+ { "unknown-214", "X", &nwip_universe, 214 },
+ { "unknown-215", "X", &nwip_universe, 215 },
+ { "unknown-216", "X", &nwip_universe, 216 },
+ { "unknown-217", "X", &nwip_universe, 217 },
+ { "unknown-218", "X", &nwip_universe, 218 },
+ { "unknown-219", "X", &nwip_universe, 219 },
+ { "unknown-220", "X", &nwip_universe, 220 },
+ { "unknown-221", "X", &nwip_universe, 221 },
+ { "unknown-222", "X", &nwip_universe, 222 },
+ { "unknown-223", "X", &nwip_universe, 223 },
+ { "unknown-224", "X", &nwip_universe, 224 },
+ { "unknown-225", "X", &nwip_universe, 225 },
+ { "unknown-226", "X", &nwip_universe, 226 },
+ { "unknown-227", "X", &nwip_universe, 227 },
+ { "unknown-228", "X", &nwip_universe, 228 },
+ { "unknown-229", "X", &nwip_universe, 229 },
+ { "unknown-230", "X", &nwip_universe, 230 },
+ { "unknown-231", "X", &nwip_universe, 231 },
+ { "unknown-232", "X", &nwip_universe, 232 },
+ { "unknown-233", "X", &nwip_universe, 233 },
+ { "unknown-234", "X", &nwip_universe, 234 },
+ { "unknown-235", "X", &nwip_universe, 235 },
+ { "unknown-236", "X", &nwip_universe, 236 },
+ { "unknown-237", "X", &nwip_universe, 237 },
+ { "unknown-238", "X", &nwip_universe, 238 },
+ { "unknown-239", "X", &nwip_universe, 239 },
+ { "unknown-240", "X", &nwip_universe, 240 },
+ { "unknown-241", "X", &nwip_universe, 241 },
+ { "unknown-242", "X", &nwip_universe, 242 },
+ { "unknown-243", "X", &nwip_universe, 243 },
+ { "unknown-244", "X", &nwip_universe, 244 },
+ { "unknown-245", "X", &nwip_universe, 245 },
+ { "unknown-246", "X", &nwip_universe, 246 },
+ { "unknown-247", "X", &nwip_universe, 247 },
+ { "unknown-248", "X", &nwip_universe, 248 },
+ { "unknown-249", "X", &nwip_universe, 249 },
+ { "unknown-250", "X", &nwip_universe, 250 },
+ { "unknown-251", "X", &nwip_universe, 251 },
+ { "unknown-252", "X", &nwip_universe, 252 },
+ { "unknown-253", "X", &nwip_universe, 253 },
+ { "unknown-254", "X", &nwip_universe, 254 },
+ { "unknown-end", "e", &nwip_universe, 255 },
};
struct universe fqdn_universe;
@@ -627,253 +619,253 @@ struct option fqdn_options [256] = {
{ "hostname", "t", &fqdn_universe, 6 },
{ "domainname", "t", &fqdn_universe, 7 },
{ "fqdn", "t", &fqdn_universe, 8 },
- { "#9", "X", &fqdn_universe, 9 },
- { "#10", "X", &fqdn_universe, 10 },
- { "#11", "X", &fqdn_universe, 11 },
- { "#12", "X", &fqdn_universe, 12 },
- { "#13", "X", &fqdn_universe, 13 },
- { "#14", "X", &fqdn_universe, 14 },
- { "#15", "X", &fqdn_universe, 15 },
- { "#16", "X", &fqdn_universe, 16 },
- { "#17", "X", &fqdn_universe, 17 },
- { "#18", "X", &fqdn_universe, 18 },
- { "#19", "X", &fqdn_universe, 19 },
- { "#20", "X", &fqdn_universe, 20 },
- { "#21", "X", &fqdn_universe, 21 },
- { "#22", "X", &fqdn_universe, 22 },
- { "#23", "X", &fqdn_universe, 23 },
- { "#24", "X", &fqdn_universe, 24 },
- { "#25", "X", &fqdn_universe, 25 },
- { "#26", "X", &fqdn_universe, 26 },
- { "#27", "X", &fqdn_universe, 27 },
- { "#28", "X", &fqdn_universe, 28 },
- { "#29", "X", &fqdn_universe, 29 },
- { "#30", "X", &fqdn_universe, 30 },
- { "#31", "X", &fqdn_universe, 31 },
- { "#32", "X", &fqdn_universe, 32 },
- { "#33", "X", &fqdn_universe, 33 },
- { "#34", "X", &fqdn_universe, 34 },
- { "#35", "X", &fqdn_universe, 35 },
- { "#36", "X", &fqdn_universe, 36 },
- { "#37", "X", &fqdn_universe, 37 },
- { "#38", "X", &fqdn_universe, 38 },
- { "#39", "X", &fqdn_universe, 39 },
- { "#40", "X", &fqdn_universe, 40 },
- { "#41", "X", &fqdn_universe, 41 },
- { "#42", "X", &fqdn_universe, 42 },
- { "#43", "X", &fqdn_universe, 43 },
- { "#44", "X", &fqdn_universe, 44 },
- { "#45", "X", &fqdn_universe, 45 },
- { "#46", "X", &fqdn_universe, 46 },
- { "#47", "X", &fqdn_universe, 47 },
- { "#48", "X", &fqdn_universe, 48 },
- { "#49", "X", &fqdn_universe, 49 },
- { "#50", "X", &fqdn_universe, 50 },
- { "#51", "X", &fqdn_universe, 51 },
- { "#52", "X", &fqdn_universe, 52 },
- { "#53", "X", &fqdn_universe, 53 },
- { "#54", "X", &fqdn_universe, 54 },
- { "#55", "X", &fqdn_universe, 55 },
- { "#56", "X", &fqdn_universe, 56 },
- { "#57", "X", &fqdn_universe, 57 },
- { "#58", "X", &fqdn_universe, 58 },
- { "#59", "X", &fqdn_universe, 59 },
- { "#60", "X", &fqdn_universe, 60 },
- { "#61", "X", &fqdn_universe, 61 },
- { "#62", "X", &fqdn_universe, 62 },
- { "#63", "X", &fqdn_universe, 63 },
- { "#64", "X", &fqdn_universe, 64 },
- { "#65", "X", &fqdn_universe, 65 },
- { "#66", "X", &fqdn_universe, 66 },
- { "#67", "X", &fqdn_universe, 67 },
- { "#68", "X", &fqdn_universe, 68 },
- { "#69", "X", &fqdn_universe, 69 },
- { "#70", "X", &fqdn_universe, 70 },
- { "#71", "X", &fqdn_universe, 71 },
- { "#72", "X", &fqdn_universe, 72 },
- { "#73", "X", &fqdn_universe, 73 },
- { "#74", "X", &fqdn_universe, 74 },
- { "#75", "X", &fqdn_universe, 75 },
- { "#76", "X", &fqdn_universe, 76 },
- { "#77", "X", &fqdn_universe, 77 },
- { "#78", "X", &fqdn_universe, 78 },
- { "#79", "X", &fqdn_universe, 79 },
- { "#80", "X", &fqdn_universe, 80 },
- { "#81", "X", &fqdn_universe, 81 },
- { "#82", "X", &fqdn_universe, 82 },
- { "#83", "X", &fqdn_universe, 83 },
- { "#84", "X", &fqdn_universe, 84 },
- { "#85", "X", &fqdn_universe, 85 },
- { "#86", "X", &fqdn_universe, 86 },
- { "#87", "X", &fqdn_universe, 87 },
- { "#88", "X", &fqdn_universe, 88 },
- { "#89", "X", &fqdn_universe, 89 },
- { "#90", "X", &fqdn_universe, 90 },
- { "#91", "X", &fqdn_universe, 91 },
- { "#92", "X", &fqdn_universe, 92 },
- { "#93", "X", &fqdn_universe, 93 },
- { "#94", "X", &fqdn_universe, 94 },
- { "#95", "X", &fqdn_universe, 95 },
- { "#96", "X", &fqdn_universe, 96 },
- { "#97", "X", &fqdn_universe, 97 },
- { "#98", "X", &fqdn_universe, 98 },
- { "#99", "X", &fqdn_universe, 99 },
- { "#100", "X", &fqdn_universe, 100 },
- { "#101", "X", &fqdn_universe, 101 },
- { "#102", "X", &fqdn_universe, 102 },
- { "#103", "X", &fqdn_universe, 103 },
- { "#104", "X", &fqdn_universe, 104 },
- { "#105", "X", &fqdn_universe, 105 },
- { "#106", "X", &fqdn_universe, 106 },
- { "#107", "X", &fqdn_universe, 107 },
- { "#108", "X", &fqdn_universe, 108 },
- { "#109", "X", &fqdn_universe, 109 },
- { "#110", "X", &fqdn_universe, 110 },
- { "#111", "X", &fqdn_universe, 111 },
- { "#112", "X", &fqdn_universe, 112 },
- { "#113", "X", &fqdn_universe, 113 },
- { "#114", "X", &fqdn_universe, 114 },
- { "#115", "X", &fqdn_universe, 115 },
- { "#116", "X", &fqdn_universe, 116 },
- { "#117", "X", &fqdn_universe, 117 },
- { "#118", "X", &fqdn_universe, 118 },
- { "#119", "X", &fqdn_universe, 119 },
- { "#120", "X", &fqdn_universe, 120 },
- { "#121", "X", &fqdn_universe, 121 },
- { "#122", "X", &fqdn_universe, 122 },
- { "#123", "X", &fqdn_universe, 123 },
- { "#124", "X", &fqdn_universe, 124 },
- { "#125", "X", &fqdn_universe, 125 },
- { "#126", "X", &fqdn_universe, 126 },
- { "#127", "X", &fqdn_universe, 127 },
- { "#128", "X", &fqdn_universe, 128 },
- { "#129", "X", &fqdn_universe, 129 },
- { "#130", "X", &fqdn_universe, 130 },
- { "#131", "X", &fqdn_universe, 131 },
- { "#132", "X", &fqdn_universe, 132 },
- { "#133", "X", &fqdn_universe, 133 },
- { "#134", "X", &fqdn_universe, 134 },
- { "#135", "X", &fqdn_universe, 135 },
- { "#136", "X", &fqdn_universe, 136 },
- { "#137", "X", &fqdn_universe, 137 },
- { "#138", "X", &fqdn_universe, 138 },
- { "#139", "X", &fqdn_universe, 139 },
- { "#140", "X", &fqdn_universe, 140 },
- { "#141", "X", &fqdn_universe, 141 },
- { "#142", "X", &fqdn_universe, 142 },
- { "#143", "X", &fqdn_universe, 143 },
- { "#144", "X", &fqdn_universe, 144 },
- { "#145", "X", &fqdn_universe, 145 },
- { "#146", "X", &fqdn_universe, 146 },
- { "#147", "X", &fqdn_universe, 147 },
- { "#148", "X", &fqdn_universe, 148 },
- { "#149", "X", &fqdn_universe, 149 },
- { "#150", "X", &fqdn_universe, 150 },
- { "#151", "X", &fqdn_universe, 151 },
- { "#152", "X", &fqdn_universe, 152 },
- { "#153", "X", &fqdn_universe, 153 },
- { "#154", "X", &fqdn_universe, 154 },
- { "#155", "X", &fqdn_universe, 155 },
- { "#156", "X", &fqdn_universe, 156 },
- { "#157", "X", &fqdn_universe, 157 },
- { "#158", "X", &fqdn_universe, 158 },
- { "#159", "X", &fqdn_universe, 159 },
- { "#160", "X", &fqdn_universe, 160 },
- { "#161", "X", &fqdn_universe, 161 },
- { "#162", "X", &fqdn_universe, 162 },
- { "#163", "X", &fqdn_universe, 163 },
- { "#164", "X", &fqdn_universe, 164 },
- { "#165", "X", &fqdn_universe, 165 },
- { "#166", "X", &fqdn_universe, 166 },
- { "#167", "X", &fqdn_universe, 167 },
- { "#168", "X", &fqdn_universe, 168 },
- { "#169", "X", &fqdn_universe, 169 },
- { "#170", "X", &fqdn_universe, 170 },
- { "#171", "X", &fqdn_universe, 171 },
- { "#172", "X", &fqdn_universe, 172 },
- { "#173", "X", &fqdn_universe, 173 },
- { "#174", "X", &fqdn_universe, 174 },
- { "#175", "X", &fqdn_universe, 175 },
- { "#176", "X", &fqdn_universe, 176 },
- { "#177", "X", &fqdn_universe, 177 },
- { "#178", "X", &fqdn_universe, 178 },
- { "#179", "X", &fqdn_universe, 179 },
- { "#180", "X", &fqdn_universe, 180 },
- { "#181", "X", &fqdn_universe, 181 },
- { "#182", "X", &fqdn_universe, 182 },
- { "#183", "X", &fqdn_universe, 183 },
- { "#184", "X", &fqdn_universe, 184 },
- { "#185", "X", &fqdn_universe, 185 },
- { "#186", "X", &fqdn_universe, 186 },
- { "#187", "X", &fqdn_universe, 187 },
- { "#188", "X", &fqdn_universe, 188 },
- { "#189", "X", &fqdn_universe, 189 },
- { "#190", "X", &fqdn_universe, 190 },
- { "#191", "X", &fqdn_universe, 191 },
- { "#192", "X", &fqdn_universe, 192 },
- { "#193", "X", &fqdn_universe, 193 },
- { "#194", "X", &fqdn_universe, 194 },
- { "#195", "X", &fqdn_universe, 195 },
- { "#196", "X", &fqdn_universe, 196 },
- { "#197", "X", &fqdn_universe, 197 },
- { "#198", "X", &fqdn_universe, 198 },
- { "#199", "X", &fqdn_universe, 199 },
- { "#200", "X", &fqdn_universe, 200 },
- { "#201", "X", &fqdn_universe, 201 },
- { "#202", "X", &fqdn_universe, 202 },
- { "#203", "X", &fqdn_universe, 203 },
- { "#204", "X", &fqdn_universe, 204 },
- { "#205", "X", &fqdn_universe, 205 },
- { "#206", "X", &fqdn_universe, 206 },
- { "#207", "X", &fqdn_universe, 207 },
- { "#208", "X", &fqdn_universe, 208 },
- { "#209", "X", &fqdn_universe, 209 },
- { "#210", "X", &fqdn_universe, 210 },
- { "#211", "X", &fqdn_universe, 211 },
- { "#212", "X", &fqdn_universe, 212 },
- { "#213", "X", &fqdn_universe, 213 },
- { "#214", "X", &fqdn_universe, 214 },
- { "#215", "X", &fqdn_universe, 215 },
- { "#216", "X", &fqdn_universe, 216 },
- { "#217", "X", &fqdn_universe, 217 },
- { "#218", "X", &fqdn_universe, 218 },
- { "#219", "X", &fqdn_universe, 219 },
- { "#220", "X", &fqdn_universe, 220 },
- { "#221", "X", &fqdn_universe, 221 },
- { "#222", "X", &fqdn_universe, 222 },
- { "#223", "X", &fqdn_universe, 223 },
- { "#224", "X", &fqdn_universe, 224 },
- { "#225", "X", &fqdn_universe, 225 },
- { "#226", "X", &fqdn_universe, 226 },
- { "#227", "X", &fqdn_universe, 227 },
- { "#228", "X", &fqdn_universe, 228 },
- { "#229", "X", &fqdn_universe, 229 },
- { "#230", "X", &fqdn_universe, 230 },
- { "#231", "X", &fqdn_universe, 231 },
- { "#232", "X", &fqdn_universe, 232 },
- { "#233", "X", &fqdn_universe, 233 },
- { "#234", "X", &fqdn_universe, 234 },
- { "#235", "X", &fqdn_universe, 235 },
- { "#236", "X", &fqdn_universe, 236 },
- { "#237", "X", &fqdn_universe, 237 },
- { "#238", "X", &fqdn_universe, 238 },
- { "#239", "X", &fqdn_universe, 239 },
- { "#240", "X", &fqdn_universe, 240 },
- { "#241", "X", &fqdn_universe, 241 },
- { "#242", "X", &fqdn_universe, 242 },
- { "#243", "X", &fqdn_universe, 243 },
- { "#244", "X", &fqdn_universe, 244 },
- { "#245", "X", &fqdn_universe, 245 },
- { "#246", "X", &fqdn_universe, 246 },
- { "#247", "X", &fqdn_universe, 247 },
- { "#248", "X", &fqdn_universe, 248 },
- { "#249", "X", &fqdn_universe, 249 },
- { "#250", "X", &fqdn_universe, 250 },
- { "#251", "X", &fqdn_universe, 251 },
- { "#252", "X", &fqdn_universe, 252 },
- { "#253", "X", &fqdn_universe, 253 },
- { "#254", "X", &fqdn_universe, 254 },
- { "#end", "e", &fqdn_universe, 255 },
+ { "unknown-9", "X", &fqdn_universe, 9 },
+ { "unknown-10", "X", &fqdn_universe, 10 },
+ { "unknown-11", "X", &fqdn_universe, 11 },
+ { "unknown-12", "X", &fqdn_universe, 12 },
+ { "unknown-13", "X", &fqdn_universe, 13 },
+ { "unknown-14", "X", &fqdn_universe, 14 },
+ { "unknown-15", "X", &fqdn_universe, 15 },
+ { "unknown-16", "X", &fqdn_universe, 16 },
+ { "unknown-17", "X", &fqdn_universe, 17 },
+ { "unknown-18", "X", &fqdn_universe, 18 },
+ { "unknown-19", "X", &fqdn_universe, 19 },
+ { "unknown-20", "X", &fqdn_universe, 20 },
+ { "unknown-21", "X", &fqdn_universe, 21 },
+ { "unknown-22", "X", &fqdn_universe, 22 },
+ { "unknown-23", "X", &fqdn_universe, 23 },
+ { "unknown-24", "X", &fqdn_universe, 24 },
+ { "unknown-25", "X", &fqdn_universe, 25 },
+ { "unknown-26", "X", &fqdn_universe, 26 },
+ { "unknown-27", "X", &fqdn_universe, 27 },
+ { "unknown-28", "X", &fqdn_universe, 28 },
+ { "unknown-29", "X", &fqdn_universe, 29 },
+ { "unknown-30", "X", &fqdn_universe, 30 },
+ { "unknown-31", "X", &fqdn_universe, 31 },
+ { "unknown-32", "X", &fqdn_universe, 32 },
+ { "unknown-33", "X", &fqdn_universe, 33 },
+ { "unknown-34", "X", &fqdn_universe, 34 },
+ { "unknown-35", "X", &fqdn_universe, 35 },
+ { "unknown-36", "X", &fqdn_universe, 36 },
+ { "unknown-37", "X", &fqdn_universe, 37 },
+ { "unknown-38", "X", &fqdn_universe, 38 },
+ { "unknown-39", "X", &fqdn_universe, 39 },
+ { "unknown-40", "X", &fqdn_universe, 40 },
+ { "unknown-41", "X", &fqdn_universe, 41 },
+ { "unknown-42", "X", &fqdn_universe, 42 },
+ { "unknown-43", "X", &fqdn_universe, 43 },
+ { "unknown-44", "X", &fqdn_universe, 44 },
+ { "unknown-45", "X", &fqdn_universe, 45 },
+ { "unknown-46", "X", &fqdn_universe, 46 },
+ { "unknown-47", "X", &fqdn_universe, 47 },
+ { "unknown-48", "X", &fqdn_universe, 48 },
+ { "unknown-49", "X", &fqdn_universe, 49 },
+ { "unknown-50", "X", &fqdn_universe, 50 },
+ { "unknown-51", "X", &fqdn_universe, 51 },
+ { "unknown-52", "X", &fqdn_universe, 52 },
+ { "unknown-53", "X", &fqdn_universe, 53 },
+ { "unknown-54", "X", &fqdn_universe, 54 },
+ { "unknown-55", "X", &fqdn_universe, 55 },
+ { "unknown-56", "X", &fqdn_universe, 56 },
+ { "unknown-57", "X", &fqdn_universe, 57 },
+ { "unknown-58", "X", &fqdn_universe, 58 },
+ { "unknown-59", "X", &fqdn_universe, 59 },
+ { "unknown-60", "X", &fqdn_universe, 60 },
+ { "unknown-61", "X", &fqdn_universe, 61 },
+ { "unknown-62", "X", &fqdn_universe, 62 },
+ { "unknown-63", "X", &fqdn_universe, 63 },
+ { "unknown-64", "X", &fqdn_universe, 64 },
+ { "unknown-65", "X", &fqdn_universe, 65 },
+ { "unknown-66", "X", &fqdn_universe, 66 },
+ { "unknown-67", "X", &fqdn_universe, 67 },
+ { "unknown-68", "X", &fqdn_universe, 68 },
+ { "unknown-69", "X", &fqdn_universe, 69 },
+ { "unknown-70", "X", &fqdn_universe, 70 },
+ { "unknown-71", "X", &fqdn_universe, 71 },
+ { "unknown-72", "X", &fqdn_universe, 72 },
+ { "unknown-73", "X", &fqdn_universe, 73 },
+ { "unknown-74", "X", &fqdn_universe, 74 },
+ { "unknown-75", "X", &fqdn_universe, 75 },
+ { "unknown-76", "X", &fqdn_universe, 76 },
+ { "unknown-77", "X", &fqdn_universe, 77 },
+ { "unknown-78", "X", &fqdn_universe, 78 },
+ { "unknown-79", "X", &fqdn_universe, 79 },
+ { "unknown-80", "X", &fqdn_universe, 80 },
+ { "unknown-81", "X", &fqdn_universe, 81 },
+ { "unknown-82", "X", &fqdn_universe, 82 },
+ { "unknown-83", "X", &fqdn_universe, 83 },
+ { "unknown-84", "X", &fqdn_universe, 84 },
+ { "unknown-85", "X", &fqdn_universe, 85 },
+ { "unknown-86", "X", &fqdn_universe, 86 },
+ { "unknown-87", "X", &fqdn_universe, 87 },
+ { "unknown-88", "X", &fqdn_universe, 88 },
+ { "unknown-89", "X", &fqdn_universe, 89 },
+ { "unknown-90", "X", &fqdn_universe, 90 },
+ { "unknown-91", "X", &fqdn_universe, 91 },
+ { "unknown-92", "X", &fqdn_universe, 92 },
+ { "unknown-93", "X", &fqdn_universe, 93 },
+ { "unknown-94", "X", &fqdn_universe, 94 },
+ { "unknown-95", "X", &fqdn_universe, 95 },
+ { "unknown-96", "X", &fqdn_universe, 96 },
+ { "unknown-97", "X", &fqdn_universe, 97 },
+ { "unknown-98", "X", &fqdn_universe, 98 },
+ { "unknown-99", "X", &fqdn_universe, 99 },
+ { "unknown-100", "X", &fqdn_universe, 100 },
+ { "unknown-101", "X", &fqdn_universe, 101 },
+ { "unknown-102", "X", &fqdn_universe, 102 },
+ { "unknown-103", "X", &fqdn_universe, 103 },
+ { "unknown-104", "X", &fqdn_universe, 104 },
+ { "unknown-105", "X", &fqdn_universe, 105 },
+ { "unknown-106", "X", &fqdn_universe, 106 },
+ { "unknown-107", "X", &fqdn_universe, 107 },
+ { "unknown-108", "X", &fqdn_universe, 108 },
+ { "unknown-109", "X", &fqdn_universe, 109 },
+ { "unknown-110", "X", &fqdn_universe, 110 },
+ { "unknown-111", "X", &fqdn_universe, 111 },
+ { "unknown-112", "X", &fqdn_universe, 112 },
+ { "unknown-113", "X", &fqdn_universe, 113 },
+ { "unknown-114", "X", &fqdn_universe, 114 },
+ { "unknown-115", "X", &fqdn_universe, 115 },
+ { "unknown-116", "X", &fqdn_universe, 116 },
+ { "unknown-117", "X", &fqdn_universe, 117 },
+ { "unknown-118", "X", &fqdn_universe, 118 },
+ { "unknown-119", "X", &fqdn_universe, 119 },
+ { "unknown-120", "X", &fqdn_universe, 120 },
+ { "unknown-121", "X", &fqdn_universe, 121 },
+ { "unknown-122", "X", &fqdn_universe, 122 },
+ { "unknown-123", "X", &fqdn_universe, 123 },
+ { "unknown-124", "X", &fqdn_universe, 124 },
+ { "unknown-125", "X", &fqdn_universe, 125 },
+ { "unknown-126", "X", &fqdn_universe, 126 },
+ { "unknown-127", "X", &fqdn_universe, 127 },
+ { "unknown-128", "X", &fqdn_universe, 128 },
+ { "unknown-129", "X", &fqdn_universe, 129 },
+ { "unknown-130", "X", &fqdn_universe, 130 },
+ { "unknown-131", "X", &fqdn_universe, 131 },
+ { "unknown-132", "X", &fqdn_universe, 132 },
+ { "unknown-133", "X", &fqdn_universe, 133 },
+ { "unknown-134", "X", &fqdn_universe, 134 },
+ { "unknown-135", "X", &fqdn_universe, 135 },
+ { "unknown-136", "X", &fqdn_universe, 136 },
+ { "unknown-137", "X", &fqdn_universe, 137 },
+ { "unknown-138", "X", &fqdn_universe, 138 },
+ { "unknown-139", "X", &fqdn_universe, 139 },
+ { "unknown-140", "X", &fqdn_universe, 140 },
+ { "unknown-141", "X", &fqdn_universe, 141 },
+ { "unknown-142", "X", &fqdn_universe, 142 },
+ { "unknown-143", "X", &fqdn_universe, 143 },
+ { "unknown-144", "X", &fqdn_universe, 144 },
+ { "unknown-145", "X", &fqdn_universe, 145 },
+ { "unknown-146", "X", &fqdn_universe, 146 },
+ { "unknown-147", "X", &fqdn_universe, 147 },
+ { "unknown-148", "X", &fqdn_universe, 148 },
+ { "unknown-149", "X", &fqdn_universe, 149 },
+ { "unknown-150", "X", &fqdn_universe, 150 },
+ { "unknown-151", "X", &fqdn_universe, 151 },
+ { "unknown-152", "X", &fqdn_universe, 152 },
+ { "unknown-153", "X", &fqdn_universe, 153 },
+ { "unknown-154", "X", &fqdn_universe, 154 },
+ { "unknown-155", "X", &fqdn_universe, 155 },
+ { "unknown-156", "X", &fqdn_universe, 156 },
+ { "unknown-157", "X", &fqdn_universe, 157 },
+ { "unknown-158", "X", &fqdn_universe, 158 },
+ { "unknown-159", "X", &fqdn_universe, 159 },
+ { "unknown-160", "X", &fqdn_universe, 160 },
+ { "unknown-161", "X", &fqdn_universe, 161 },
+ { "unknown-162", "X", &fqdn_universe, 162 },
+ { "unknown-163", "X", &fqdn_universe, 163 },
+ { "unknown-164", "X", &fqdn_universe, 164 },
+ { "unknown-165", "X", &fqdn_universe, 165 },
+ { "unknown-166", "X", &fqdn_universe, 166 },
+ { "unknown-167", "X", &fqdn_universe, 167 },
+ { "unknown-168", "X", &fqdn_universe, 168 },
+ { "unknown-169", "X", &fqdn_universe, 169 },
+ { "unknown-170", "X", &fqdn_universe, 170 },
+ { "unknown-171", "X", &fqdn_universe, 171 },
+ { "unknown-172", "X", &fqdn_universe, 172 },
+ { "unknown-173", "X", &fqdn_universe, 173 },
+ { "unknown-174", "X", &fqdn_universe, 174 },
+ { "unknown-175", "X", &fqdn_universe, 175 },
+ { "unknown-176", "X", &fqdn_universe, 176 },
+ { "unknown-177", "X", &fqdn_universe, 177 },
+ { "unknown-178", "X", &fqdn_universe, 178 },
+ { "unknown-179", "X", &fqdn_universe, 179 },
+ { "unknown-180", "X", &fqdn_universe, 180 },
+ { "unknown-181", "X", &fqdn_universe, 181 },
+ { "unknown-182", "X", &fqdn_universe, 182 },
+ { "unknown-183", "X", &fqdn_universe, 183 },
+ { "unknown-184", "X", &fqdn_universe, 184 },
+ { "unknown-185", "X", &fqdn_universe, 185 },
+ { "unknown-186", "X", &fqdn_universe, 186 },
+ { "unknown-187", "X", &fqdn_universe, 187 },
+ { "unknown-188", "X", &fqdn_universe, 188 },
+ { "unknown-189", "X", &fqdn_universe, 189 },
+ { "unknown-190", "X", &fqdn_universe, 190 },
+ { "unknown-191", "X", &fqdn_universe, 191 },
+ { "unknown-192", "X", &fqdn_universe, 192 },
+ { "unknown-193", "X", &fqdn_universe, 193 },
+ { "unknown-194", "X", &fqdn_universe, 194 },
+ { "unknown-195", "X", &fqdn_universe, 195 },
+ { "unknown-196", "X", &fqdn_universe, 196 },
+ { "unknown-197", "X", &fqdn_universe, 197 },
+ { "unknown-198", "X", &fqdn_universe, 198 },
+ { "unknown-199", "X", &fqdn_universe, 199 },
+ { "unknown-200", "X", &fqdn_universe, 200 },
+ { "unknown-201", "X", &fqdn_universe, 201 },
+ { "unknown-202", "X", &fqdn_universe, 202 },
+ { "unknown-203", "X", &fqdn_universe, 203 },
+ { "unknown-204", "X", &fqdn_universe, 204 },
+ { "unknown-205", "X", &fqdn_universe, 205 },
+ { "unknown-206", "X", &fqdn_universe, 206 },
+ { "unknown-207", "X", &fqdn_universe, 207 },
+ { "unknown-208", "X", &fqdn_universe, 208 },
+ { "unknown-209", "X", &fqdn_universe, 209 },
+ { "unknown-210", "X", &fqdn_universe, 210 },
+ { "unknown-211", "X", &fqdn_universe, 211 },
+ { "unknown-212", "X", &fqdn_universe, 212 },
+ { "unknown-213", "X", &fqdn_universe, 213 },
+ { "unknown-214", "X", &fqdn_universe, 214 },
+ { "unknown-215", "X", &fqdn_universe, 215 },
+ { "unknown-216", "X", &fqdn_universe, 216 },
+ { "unknown-217", "X", &fqdn_universe, 217 },
+ { "unknown-218", "X", &fqdn_universe, 218 },
+ { "unknown-219", "X", &fqdn_universe, 219 },
+ { "unknown-220", "X", &fqdn_universe, 220 },
+ { "unknown-221", "X", &fqdn_universe, 221 },
+ { "unknown-222", "X", &fqdn_universe, 222 },
+ { "unknown-223", "X", &fqdn_universe, 223 },
+ { "unknown-224", "X", &fqdn_universe, 224 },
+ { "unknown-225", "X", &fqdn_universe, 225 },
+ { "unknown-226", "X", &fqdn_universe, 226 },
+ { "unknown-227", "X", &fqdn_universe, 227 },
+ { "unknown-228", "X", &fqdn_universe, 228 },
+ { "unknown-229", "X", &fqdn_universe, 229 },
+ { "unknown-230", "X", &fqdn_universe, 230 },
+ { "unknown-231", "X", &fqdn_universe, 231 },
+ { "unknown-232", "X", &fqdn_universe, 232 },
+ { "unknown-233", "X", &fqdn_universe, 233 },
+ { "unknown-234", "X", &fqdn_universe, 234 },
+ { "unknown-235", "X", &fqdn_universe, 235 },
+ { "unknown-236", "X", &fqdn_universe, 236 },
+ { "unknown-237", "X", &fqdn_universe, 237 },
+ { "unknown-238", "X", &fqdn_universe, 238 },
+ { "unknown-239", "X", &fqdn_universe, 239 },
+ { "unknown-240", "X", &fqdn_universe, 240 },
+ { "unknown-241", "X", &fqdn_universe, 241 },
+ { "unknown-242", "X", &fqdn_universe, 242 },
+ { "unknown-243", "X", &fqdn_universe, 243 },
+ { "unknown-244", "X", &fqdn_universe, 244 },
+ { "unknown-245", "X", &fqdn_universe, 245 },
+ { "unknown-246", "X", &fqdn_universe, 246 },
+ { "unknown-247", "X", &fqdn_universe, 247 },
+ { "unknown-248", "X", &fqdn_universe, 248 },
+ { "unknown-249", "X", &fqdn_universe, 249 },
+ { "unknown-250", "X", &fqdn_universe, 250 },
+ { "unknown-251", "X", &fqdn_universe, 251 },
+ { "unknown-252", "X", &fqdn_universe, 252 },
+ { "unknown-253", "X", &fqdn_universe, 253 },
+ { "unknown-254", "X", &fqdn_universe, 254 },
+ { "unknown-end", "e", &fqdn_universe, 255 },
};
const char *hardware_types [] = {
@@ -1134,7 +1126,7 @@ const char *hardware_types [] = {
"unknown-254",
"unknown-255" };
-struct hash_table *universe_hash;
+universe_hash_t *universe_hash;
struct universe **universes;
int universe_count, universe_max;
@@ -1171,8 +1163,7 @@ void initialize_common_option_spaces()
dhcp_universe.store_length = putUChar;
dhcp_universe.index = universe_count++;
universes [dhcp_universe.index] = &dhcp_universe;
- dhcp_universe.hash = new_hash (0, 0, 1, MDL);
- if (!dhcp_universe.hash)
+ if (!option_new_hash (&dhcp_universe.hash, 1, MDL))
log_fatal ("Can't allocate dhcp option hash table.");
for (i = 0; i < 256; i++) {
dhcp_universe.options [i] = &dhcp_options [i];
@@ -1195,10 +1186,10 @@ void initialize_common_option_spaces()
nwip_universe.tag_size = 1;
nwip_universe.store_tag = putUChar;
nwip_universe.store_length = putUChar;
- fqdn_universe.enc_opt = &dhcp_options [DHO_NWIP_SUBOPTIONS];
+ nwip_universe.enc_opt = &dhcp_options [DHO_NWIP_SUBOPTIONS];
nwip_universe.index = universe_count++;
universes [nwip_universe.index] = &nwip_universe;
- nwip_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&nwip_universe.hash, 1, MDL);
if (!nwip_universe.hash)
log_fatal ("Can't allocate nwip option hash table.");
for (i = 0; i < 256; i++) {
@@ -1225,7 +1216,7 @@ void initialize_common_option_spaces()
fqdn_universe.index = universe_count++;
fqdn_universe.enc_opt = &dhcp_options [DHO_FQDN];
universes [fqdn_universe.index] = &fqdn_universe;
- fqdn_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&fqdn_universe.hash, 1, MDL);
if (!fqdn_universe.hash)
log_fatal ("Can't allocate fqdn option hash table.");
for (i = 0; i < 256; i++) {
@@ -1236,7 +1227,7 @@ void initialize_common_option_spaces()
}
/* Set up the hash of universes. */
- universe_hash = new_hash (0, 0, 1, MDL);
+ universe_new_hash (&universe_hash, 1, MDL);
universe_hash_add (universe_hash,
dhcp_universe.name, 0,
&dhcp_universe, MDL);
diff --git a/common/tr.c b/common/tr.c
index 3352d0a6..f653ed6c 100644
--- a/common/tr.c
+++ b/common/tr.c
@@ -4,40 +4,31 @@
Contributed in May of 1999 by Andrew Chittenden */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
static char copyright[] =
-"$Id: tr.c,v 1.7 2001/04/27 22:23:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tr.c,v 1.8 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/common/tree.c b/common/tree.c
index 0c5fb64d..b302a363 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -3,39 +3,30 @@
Routines for manipulating parse trees... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.102 2001/06/27 00:30:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.103 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -101,6 +92,7 @@ int make_const_option_cache (oc, buffer, data, len, option, file, line)
}
(*oc) -> data.len = len;
+ (*oc) -> data.buffer = bp;
(*oc) -> data.data = &bp -> data [0];
(*oc) -> data.terminated = 0;
if (data)
@@ -595,7 +587,7 @@ int binding_value_dereference (struct binding_value **v,
/* Decrement the reference count. If it's nonzero, we're
done. */
--(bv -> refcnt);
- rc_register (file, line, v, bv, bv -> refcnt, 1);
+ rc_register (file, line, v, bv, bv -> refcnt, 1, RC_MISC);
if (bv -> refcnt > 0)
return 1;
if (bv -> refcnt < 0) {
@@ -710,8 +702,10 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
in_options, cfg_options, scope,
expr -> data.ns_add.rrdata, MDL);
}
- } else
+ } else {
r2 = 0;
+ tname = NULL;
+ }
if (r0 && r1 && (r2 || expr -> op != expr_ns_add)) {
*result = minires_mkupdrec (((expr -> op == expr_ns_add ||
expr -> op == expr_ns_delete)
@@ -743,10 +737,13 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
goto dpngood;
(*result) -> r_data =
(*result) -> r_data_ephem;
+ /*%Audit% 16 bytes max. %2004.06.17,Safe%*/
sprintf ((char *)(*result) -> r_data_ephem,
- "%d.%d.%d.%d",
- data.data [0], data.data [1],
- data.data [2], data.data [3]);
+ "%u.%u.%u.%u",
+ data.data [0] & 0xff,
+ data.data [1] & 0xff,
+ data.data [2] & 0xff,
+ data.data [3] & 0xff);
(*result) -> r_size =
strlen ((const char *)
(*result) -> r_data);
@@ -1718,6 +1715,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
if (len != 8 && len != 16 && len != 32) {
log_info ("binary_to_ascii: %s %ld!",
"invalid width", len);
+ status = 0;
goto b2a_out;
}
len /= 8;
@@ -2740,7 +2738,7 @@ void expression_dereference (eptr, file, line)
/* Decrement the reference count. If it's nonzero, we're
done. */
--(expr -> refcnt);
- rc_register (file, line, eptr, expr, expr -> refcnt, 1);
+ rc_register (file, line, eptr, expr, expr -> refcnt, 1, RC_MISC);
if (expr -> refcnt > 0)
return;
if (expr -> refcnt < 0) {
@@ -3106,18 +3104,20 @@ static int op_val (op)
case expr_equal:
case expr_not_equal:
- return 3;
+ return 4;
+ case expr_or:
case expr_and:
- case expr_multiply:
- case expr_divide:
- case expr_remainder:
- return 1;
+ return 3;
- case expr_or:
case expr_add:
case expr_subtract:
return 2;
+
+ case expr_multiply:
+ case expr_divide:
+ case expr_remainder:
+ return 1;
}
return 100;
}
@@ -3756,7 +3756,7 @@ int binding_scope_dereference (ptr, file, line)
*ptr = (struct binding_scope *)0;
--binding_scope -> refcnt;
rc_register (file, line, ptr,
- binding_scope, binding_scope -> refcnt, 1);
+ binding_scope, binding_scope -> refcnt, 1, RC_MISC);
if (binding_scope -> refcnt > 0)
return 1;
@@ -3806,7 +3806,7 @@ int fundef_dereference (ptr, file, line)
}
bp -> refcnt--;
- rc_register (file, line, ptr, bp, bp -> refcnt, 1);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 1, RC_MISC);
if (bp -> refcnt < 0) {
log_error ("%s(%d): negative refcnt!", file, line);
#if defined (DEBUG_RC_HISTORY)
diff --git a/common/upf.c b/common/upf.c
index a737d57a..3cae8db2 100644
--- a/common/upf.c
+++ b/common/upf.c
@@ -3,39 +3,30 @@
Ultrix PacketFilter interface code. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.21 2000/09/01 23:03:39 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.22 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -88,11 +79,9 @@ int if_register_upf (info)
/* Open a UPF device */
for (b = 0; 1; b++) {
-#ifndef NO_SNPRINTF
- snprintf(filename, sizeof(filename), "/dev/pf/pfilt%d", b);
-#else
+ /* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
sprintf(filename, "/dev/pf/pfilt%d", b);
-#endif
+
sock = open (filename, O_RDWR, 0);
if (sock < 0) {
if (errno == EBUSY) {
@@ -332,7 +321,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
- from, (unsigned char *)0, length);
+ from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)
diff --git a/configure b/configure
index 3f504beb..eeb62ac0 100755
--- a/configure
+++ b/configure
@@ -70,6 +70,26 @@ if [ "$sysname" = "" ]; then
OSF1)
if [ $machine = 'alpha' ]; then
sysname=alphaosf
+ # OSF1 has libc snprintf/vsnprintf support as of 4.0F. There is
+ # no v4 & v5 portable compile-time way of knowing the system's
+ # version (we can #include a version-identing file, but it is only
+ # present in v5).
+ #
+ # So we rely on a system command, 'sizer', and default to
+ # no-snprintf if we can't find it.
+ if [ -x /usr/sbin/sizer ] ; then
+ release=`/usr/sbin/sizer -v | cut -d ' ' -f 4 | cut -c 2-`
+ major=`echo $release | cut -d . -f 1`
+ minor=`echo $release | cut -d . -f 2`
+ incr=`echo $minor | sed 's/[0-9]//g' | tr '[A-Z]' '[0-9]'`
+ minor=`echo $minor | sed 's/[A-Z]//g'`
+
+ if [ $major -gt 4 -o \
+ $major -eq 4 -a $minor -gt 0 -o \
+ $major -eq 4 -a $minor -eq 0 -a $incr -gt 5 ]; then
+ copts="$copts -DHAVE_SNPRINTF"
+ fi
+ fi
fi;;
Linux)
release=`uname -r`
@@ -114,12 +134,7 @@ if [ "$sysname" = "" ]; then
fi;;
esac;;
NetBSD)
- hw=`uname -m`
- case $hw in
- arm32) sysname=netbsd-nocast;;
- alpha) sysname=netbsd-nocast;;
- *) sysname=netbsd;;
- esac;;
+ sysname=netbsd;;
OpenBSD)
sysname=openbsd;;
FreeBSD)
diff --git a/contrib/dhcp.spec b/contrib/dhcp.spec
index 0e176024..0eb7201e 100644
--- a/contrib/dhcp.spec
+++ b/contrib/dhcp.spec
@@ -1,6 +1,6 @@
-Summary: The Internet Software Consortium (ISC) DHCP server
+Summary: The Internet Systems Consortium (ISC) DHCP server
Name: dhcp
-%define version 3.1
+%define version 3.0.2
Version: %{version}
Release: 2tac
Group: System Environment/Daemons
diff --git a/dhcpctl/Makefile.dist b/dhcpctl/Makefile.dist
index 8686ecf6..e024dc33 100644
--- a/dhcpctl/Makefile.dist
+++ b/dhcpctl/Makefile.dist
@@ -1,20 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-1999 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:
+# Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
#
CATMANPAGES = dhcpctl.cat3 omshell.cat1
@@ -73,7 +78,7 @@ depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
- -rm -f $(OBJ) test.o svtest cltest.o cltest
+ -rm -f $(OBJ) omshell.o omshell cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
diff --git a/dhcpctl/callback.c b/dhcpctl/callback.c
index 8b9fb854..3f63616c 100644
--- a/dhcpctl/callback.c
+++ b/dhcpctl/callback.c
@@ -3,44 +3,40 @@
The dhcpctl callback object. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: callback.c,v 1.6 2005/03/17 20:15:02 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
diff --git a/dhcpctl/cltest.c b/dhcpctl/cltest.c
index 4589ecd1..561f6a0f 100644
--- a/dhcpctl/cltest.c
+++ b/dhcpctl/cltest.c
@@ -2,40 +2,37 @@
Example program that uses the dhcpctl library. */
-/* Copyright (C) 2000-2001 Internet Software Consortium
- * All rights reserved.
+/*
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2000-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software was contributed to the Internet Software Consortium
+ * This software was contributed to Internet Systems Consortium
* by Brian Murrell.
*/
+#ifndef lint
+static char ocopyright[] =
+"$Id: cltest.c,v 1.13 2005/03/17 20:15:03 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
diff --git a/dhcpctl/dhcpctl.3 b/dhcpctl/dhcpctl.3
index 0111a0c1..13187f8d 100644
--- a/dhcpctl/dhcpctl.3
+++ b/dhcpctl/dhcpctl.3
@@ -2,9 +2,29 @@
.\"
.\" Project: DHCP
.\" File: dhcpctl.3
-.\" RCSId: $Id: dhcpctl.3,v 1.4 2001/06/27 00:30:03 mellon Exp $
+.\" RCSId: $Id: dhcpctl.3,v 1.5 2005/03/17 20:15:03 dhankins Exp $
.\"
-.\" Copyright (C) 2000 Nominum, Inc.
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2000-2003 by Internet Software Consortium
+.\" Copyright (c) 2000 Nominum, Inc.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
.\" Description: dhcpctl man page.
.\"
@@ -24,7 +44,6 @@
.\"
.Sh SYNOPSIS
.Fd #include <dhcpctl/dhcpctl.h>
-.Fd
.Ft dhcpctl_status
.Fo dhcpctl_initialize
.Fa void
@@ -325,6 +344,8 @@ values must all match what the server uses and are defined in its
configuration file. The created object is returned through the first parameter
and must be used as the 4th parameter to
.Fn dhcpctl_connect .
+Note that the 'secret' value must not be base64 encoded, which is different
+from how the value appears in the dhcpd.conf file.
.\"
.\"
.\"
@@ -460,11 +481,8 @@ int main (int argc, char **argv) {
}
.Ed
.Sh SEE ALSO
-.SH SEE ALSO
omapi(3), omshell(3), dhcpd(8), dhclient(8), dhcpd.conf(5), dhclient.conf(5).
-.SH AUTHOR
-.B dhcpctl
-was written by Ted Lemon of Nominum, Inc. Information about Nominum
-and support contracts for DHCP and BIND can be found at
-.B http://www.nominum.com. This preliminary documentation was
-written by James Brister of Nominum, Inc.
+.Sh AUTHOR
+.Em dhcpctl
+was written by Ted Lemon of Nominum, Inc.
+This preliminary documentation was written by James Brister of Nominum, Inc.
diff --git a/dhcpctl/dhcpctl.c b/dhcpctl/dhcpctl.c
index 4560b84d..27ee6df9 100644
--- a/dhcpctl/dhcpctl.c
+++ b/dhcpctl/dhcpctl.c
@@ -3,44 +3,40 @@
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: dhcpctl.c,v 1.25 2005/03/17 20:15:03 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
@@ -68,7 +64,8 @@ dhcpctl_status dhcpctl_initialize ()
dhcpctl_callback_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof
- (dhcpctl_callback_object_t), 0);
+ (dhcpctl_callback_object_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -81,7 +78,7 @@ dhcpctl_status dhcpctl_initialize ()
dhcpctl_remote_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (dhcpctl_remote_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
diff --git a/dhcpctl/dhcpctl.h b/dhcpctl/dhcpctl.h
index 398f0ead..052b0f8b 100644
--- a/dhcpctl/dhcpctl.h
+++ b/dhcpctl/dhcpctl.h
@@ -1,41 +1,32 @@
-/* dhcpctl.h
+/* $Id: dhcpctl.h,v 1.16 2005/03/17 20:15:03 dhankins Exp $
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/dhcpctl/omshell.1 b/dhcpctl/omshell.1
index 3df2b033..d5f009a5 100644
--- a/dhcpctl/omshell.1
+++ b/dhcpctl/omshell.1
@@ -1,36 +1,29 @@
-.\" omshell.1
+.\" $Id: omshell.1,v 1.3 2005/03/17 20:15:03 dhankins Exp $
.\"
-.\" Copyright (c) 2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2001-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
diff --git a/dhcpctl/omshell.c b/dhcpctl/omshell.c
index cdff29b6..bf28ed49 100644
--- a/dhcpctl/omshell.c
+++ b/dhcpctl/omshell.c
@@ -3,44 +3,40 @@
Examine and modify omapi objects. */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: omshell.c,v 1.10 2005/03/17 20:15:04 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@@ -209,6 +205,10 @@ int main (int argc, char **argv, char **envp)
printf (" set <name> = <value>\n");
printf (" create\n");
printf (" open\n");
+ printf (" update\n");
+ printf (" unset <name>\n");
+ printf (" refresh\n");
+ printf (" remove\n");
skip_to_semi (cfile);
break;
@@ -425,6 +425,11 @@ int main (int argc, char **argv, char **envp)
break;
}
+ if (!oh) {
+ printf ("not open.\n");
+ skip_to_semi (cfile);
+ break;
+ }
omapi_object_dereference (&oh, MDL);
break;
@@ -476,6 +481,7 @@ int main (int argc, char **argv, char **envp)
val = buf;
do {
int intval = atoi (val);
+ dotiszero:
if (intval > 255) {
parse_warn (cfile,
"dotted octet > 255: %s",
@@ -488,8 +494,10 @@ int main (int argc, char **argv, char **envp)
(unsigned *)0, cfile);
if (token != DOT)
break;
- token = next_token (&val,
- (unsigned *)0, cfile);
+ /* DOT is zero. */
+ while ((token = next_token (&val,
+ (unsigned *)0, cfile)) == DOT)
+ *s++ = 0;
} while (token == NUMBER);
dhcpctl_set_data_value (oh, buf,
(unsigned)(s - buf),
@@ -703,6 +711,7 @@ int main (int argc, char **argv, char **envp)
break;
}
+ end_parse (&cfile);
} while (1);
exit (0);
diff --git a/dhcpctl/remote.c b/dhcpctl/remote.c
index 308c8758..875951cf 100644
--- a/dhcpctl/remote.c
+++ b/dhcpctl/remote.c
@@ -3,44 +3,40 @@
The dhcpctl remote object. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: remote.c,v 1.14 2005/03/17 20:15:04 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
@@ -248,9 +244,16 @@ dhcpctl_status dhcpctl_open_object (dhcpctl_handle h,
omapi_object_dereference (&message, MDL);
return status;
}
- return omapi_protocol_send_message (connection -> outer,
+
+ status = omapi_protocol_send_message (connection -> outer,
(omapi_object_t *)0,
message, (omapi_object_t *)0);
+
+ if (status != ISC_R_SUCCESS)
+ omapi_message_unregister (message);
+
+ omapi_object_dereference (&message, MDL);
+ return status;
}
/* Callback methods (not meant to be called directly) */
@@ -338,6 +341,9 @@ isc_result_t dhcpctl_remote_destroy (omapi_object_t *h,
if (p -> handle)
omapi_object_dereference ((omapi_object_t **)&p -> handle,
file, line);
+ if (p -> rtype)
+ omapi_typed_data_dereference ((omapi_typed_data_t **)&p->rtype,
+ file, line);
return ISC_R_SUCCESS;
}
diff --git a/doc/ja_JP.eucJP/dhclient-script.8 b/doc/ja_JP.eucJP/dhclient-script.8
index cd9c8549..f6ca4e5c 100644
--- a/doc/ja_JP.eucJP/dhclient-script.8
+++ b/doc/ja_JP.eucJP/dhclient-script.8
@@ -1,36 +1,29 @@
-.\" dhclient-script.8
+.\" $Id: dhclient-script.8,v 1.2 2005/03/17 20:15:04 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -220,7 +213,7 @@ $new_routers ¤ËÎóµó¤µ¤ì¤Æ¤¤¤ëÁ´¥ë¡¼¥¿¤Ë ping ¤ò»î¤¹¤è¤¦¤Ë¤Ê¤ì¤Ð¡¢
Îà»÷¤·¤¿¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤ËÂФ¹¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï
»÷¤Æ¤¤¤¿¤êÁ´¤¯Æ±¤¸¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢°ìÈ̤ˤϡ¢
³Æ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥àÍѤ˳ơ¹¤Î¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¤Ù¤­¤Ç¤¹¡£
-Internet Software Consortium ¤Î DHCP ÇÛÉۤ˴ޤޤì¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï¡¢
+Internet Systems Consortium ¤Î DHCP ÇÛÉۤ˴ޤޤì¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï¡¢
client/scripts °Ê²¼¤ÎÇÛÉۥĥ꡼¤Ë¤¢¤ê¡¢
Æ°ºîÂоݥª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à̾¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.SH ¥Ð¥°
@@ -239,9 +232,9 @@ dhclient.conf(5), dhclient.leases(5), dhclient(8)
.SH ºî¼Ô
.B dhclient-script(8)
¤Ï Ted Lemon ¤¬
-Vixie Enterprises ¤È¶¨ÎϤ·¤Æ Internet Software Consortium ¤Î¤¿¤á¤Ë
+Vixie Enterprises ¤È¶¨ÎϤ·¤Æ Internet Systems Consortium ¤Î¤¿¤á¤Ë
½ñ¤­¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
+Internet Systems Consortium ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
.B http://www.isc.org
¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
Vixie Enterprises ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
diff --git a/doc/ja_JP.eucJP/dhclient.8 b/doc/ja_JP.eucJP/dhclient.8
index 78a3fe8c..d57cd3f4 100644
--- a/doc/ja_JP.eucJP/dhclient.8
+++ b/doc/ja_JP.eucJP/dhclient.8
@@ -1,20 +1,25 @@
-.\" dhclient.8
+.\" $Id: dhclient.8,v 1.2 2005/03/17 20:15:05 dhankins Exp $
.\"
-.\" Copyright (c) 1996-1999 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:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" http://www.isc.org/isc-license-1.0.html.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" 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.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" Support and other services are available for ISC products - see
-.\" http://www.isc.org for more information.
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
.\" Portions copyright (c) 2000 David E. O'Brien.
.\" All rights reserved.
@@ -91,7 +96,7 @@ relay
]
]
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë dhclient
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë dhclient
¤ÏưŪ¥Û¥¹¥ÈÀßÄê¥×¥í¥È¥³¥ë (DHCP: Dynamic Host Configuration Protocol)
¤Þ¤¿¤Ï BOOTP ¥×¥í¥È¥³¥ë¤òÍѤ¤¤Æ¡¢¤¢¤ë¤¤¤Ï
¤³¤ì¤é¤Î¥×¥í¥È¥³¥ë¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤Ë¤Ï¥¢¥É¥ì¥¹¤òÀÅŪ¤Ë³ä¤êÅö¤Æ¤Æ¡¢
@@ -334,9 +339,9 @@ dhclient.conf(5), dhclient.leases(5), dhclient-script(8)
.SH ºî¼Ô
.B dhclient(8)
¤Ï Ted Lemon ¤¬
-Vixie Enterprises ¤È¶¨ÎϤ·¤Æ Internet Software Consortium ¤Î¤¿¤á¤Ë
+Vixie Enterprises ¤È¶¨ÎϤ·¤Æ Internet Systems Consortium ¤Î¤¿¤á¤Ë
½ñ¤­¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
+Internet Systems Consortium ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
.B http://www.isc.org
¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
Vixie Enterprises ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
@@ -348,7 +353,7 @@ Stanford Âç³Ø¤Î MosquitoNet ¥×¥í¥¸¥§¥¯¥È¤Ë»²²Ã¤·¤Æ¤¤¤ë´Ö¤Ë¡¢
Linux ¤Ç¤ÎÍøÍѤ˺ݤ·ÂçÉý¤Ë½¤Àµ¡¢²þÎɤò¹Ô¤¤¤Þ¤·¤¿¡£
.PP
¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢Elliot ¤Ë¤è¤ë Linux ¤Ç¤Î²þÎɤËÉ餦¤È¤³¤í¤¬Â礭¤¤¤Ç¤¹¤¬¡¢
-Internet Software Consortium ¤Î DHCP ¥µ¡¼¥Ð¤¬»È¤¦¤â¤Î¤ÈƱ¤¸
+Internet Systems Consortium ¤Î DHCP ¥µ¡¼¥Ð¤¬»È¤¦¤â¤Î¤ÈƱ¤¸
¥Í¥Ã¥È¥ï¡¼¥­¥ó¥°¥Õ¥ì¡¼¥à¥ï¡¼¥¯¤òÍѤ¤¤ë¤è¤¦¤Ë¡¢Ted Lemon ¤¬
ÂçÉý¤ÊºÆÊÔÀ®¤äÉôʬŪ¤Ê½ñ¤­´¹¤¨¤ò¹Ô¤¤¤Þ¤·¤¿¡£
¥·¥¹¥Æ¥àÆÃÍ­¤ÎÀßÄꥳ¡¼¥É¤ÎÂçÉôʬ¤Ï¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤Ë°Ü¤µ¤ì¤¿¤Î¤Ç¡¢
diff --git a/doc/ja_JP.eucJP/dhclient.conf.5 b/doc/ja_JP.eucJP/dhclient.conf.5
index a16f814e..db6bfaa4 100644
--- a/doc/ja_JP.eucJP/dhclient.conf.5
+++ b/doc/ja_JP.eucJP/dhclient.conf.5
@@ -1,36 +1,29 @@
-.\" dhclient.conf.5
+.\" $Id: dhclient.conf.5,v 1.2 2005/03/17 20:15:05 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -45,7 +38,7 @@
dhclient.conf - DHCP ¥¯¥é¥¤¥¢¥ó¥ÈÀßÄê¥Õ¥¡¥¤¥ë
.SH ²òÀâ
dhclient.conf ¥Õ¥¡¥¤¥ë¤Ë¤Ï
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë
.IR dhclient
¤ÎÀßÄê¾ðÊ󤬴ޤޤì¤Þ¤¹¡£
.PP
@@ -495,7 +488,7 @@ day ¤ÏƱÍÍ¤Ë 1 ¤«¤é»Ï¤Þ¤ë (·î¤Ë¤ª¤±¤ë) Æü¤È¤·¤Æ»ØÄꤷ¤Þ¤¹¡£hour ¤Ï¡¢
DHCP ¥¯¥é¥¤¥¢¥ó¥È¤¬ TCP/IP ¥í¡¼¥ß¥ó¥° (roaming) ¥×¥í¥È¥³¥ë¤ò¼Â¹Ô¤·¤Æ
¤¤¤ë¾ì¹ç¡¢DHCP ¤òÍѤ¤¤ÆÆÀ¤é¤ì¤ë¥ê¡¼¥¹¤À¤±¤Ç¤Ê¤¯¡¢»öÁ°¤ËÄêµÁ¤µ¤ì¤¿
IP ¥¨¥¤¥ê¥¢¥¹¤â¡¢¼«Ê¬¤¬»ÈÍѤ¹¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÀßÄꤹ¤ëɬÍפ¬¤¢¤ë
-¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£Internet Software Consortium ÈÇ DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
+¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£Internet Systems Consortium ÈÇ DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
¸ÇÄꥢ¥É¥ì¥¹Ä¾ÀÜ»ØÄê¤Î¥í¡¼¥ß¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤½¤Î¼ï¤Î¼Â¸³
¤¬¤Ç¤­¤ë¤è¤¦¤Ë¡¢¤³¤Î dhcp ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
.B alias
@@ -626,7 +619,7 @@ RFC2131
.SH ºî¼Ô
.B dhclient(8)
¤Ï Vixie Labs ¤È¤Î·ÀÌó¤Î¤â¤È¤Ç Ted Lemon ¤¬½ñ¤­¤Þ¤·¤¿¡£
-ËÜ¥×¥í¥¸¥§¥¯¥È¤Î´ð¶â¤Ï Internet Software Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
+ËÜ¥×¥í¥¸¥§¥¯¥È¤Î´ð¶â¤Ï Internet Systems Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
+Internet Systems Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
.B http://www.isc.org
¤Ë¤¢¤ê¤Þ¤¹¡£
diff --git a/doc/ja_JP.eucJP/dhclient.leases.5 b/doc/ja_JP.eucJP/dhclient.leases.5
index 183195e5..48dbaebc 100644
--- a/doc/ja_JP.eucJP/dhclient.leases.5
+++ b/doc/ja_JP.eucJP/dhclient.leases.5
@@ -1,38 +1,29 @@
-.\" dhclient.conf.5
-.\"
-.\" Copyright (c) 1997 The Internet Software Consortium.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" This software has been written for the Internet Software Consortium
+.\" $Id: dhclient.leases.5,v 1.2 2005/03/17 20:15:05 dhankins Exp $
+.\"
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1997-2003 by Internet Software Consortium
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie
-.\" Enterprises. To learn more about the Internet Software Consortium,
+.\" Enterprises. To learn more about Internet Systems Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
@@ -44,7 +35,7 @@
.SH ̾¾Î
dhclient.leases - DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Î¥ê¡¼¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
³ÍÆÀ¤·¤¿¥ê¡¼¥¹¤Î¤¦¤Á¤Þ¤ÀÍ­¸ú¤Ç¤¢¤ë¤â¤Î¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î¡¢
±Ê³Ū¤Ê¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÊÝ»ý¤·¤Þ¤¹¡£
¤³¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï¡¢¼«Í³·Á¼°¤Î ASCII ¥Õ¥¡¥¤¥ë¤Ç¤¢¤ê¡¢
@@ -65,7 +56,7 @@ RFC2132, RFC2131
.SH ºî¼Ô
.B dhclient(8)
¤Ï¡¢Vixie Labs ¤È¤Î·ÀÌó¤Î¤â¤È¤Ç¡¢Ted Lemon ¤¬µ­½Ò¤·¤Þ¤·¤¿¡£
-ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Software Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
+ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Systems Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
+Internet Systems Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
.B http://www.isc.org
¤Ë¤¢¤ê¤Þ¤¹¡£
diff --git a/doc/ja_JP.eucJP/dhcp-eval.5 b/doc/ja_JP.eucJP/dhcp-eval.5
index 18320ade..60134f58 100644
--- a/doc/ja_JP.eucJP/dhcp-eval.5
+++ b/doc/ja_JP.eucJP/dhcp-eval.5
@@ -1,36 +1,29 @@
-.\" dhcp-eval.5
+.\" $Id: dhcp-eval.5,v 1.2 2005/03/17 20:15:05 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -39,7 +32,7 @@
.SH ̾¾Î
dhcp-eval - ISC DHCP ¤Ë¤ª¤±¤ë¾ò·ïÉÕ¤­É¾²Á
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢¤É¤Á¤é¤â
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢¤É¤Á¤é¤â
¼õ¿®¤¹¤ë¥Ñ¥±¥Ã¥È¤Ë°Í¸¤·¤¿¾ò·ïÉÕ¤­Æ°ºî¤ò¹Ô¤¦Ç½ÎϤò»ý¤Á¤Þ¤¹¡£
¾ò·ïÉÕ¤­Æ°ºî¤Îʸˡ¤ò¤³¤³¤Ë¼¨¤·¤Þ¤¹¡£
.SH »²¾È: ¾ò·ïÉÕ¤­Æ°ºî
@@ -487,9 +480,9 @@ PTR ¥ì¥³¡¼¥É¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ï¡¢A RR ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤ÈƱÍͤǤ¹¤¬¡¢
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
dhclient(8), RFC2132, RFC2131
.SH ºî¼Ô
-Internet Software Consortium DHCP Distribution
+Internet Systems Consortium DHCP Distribution
¤Ï¡¢Vixie Labs ¤È¤Î·ÀÌó¤Î¤â¤È¤Ç¡¢Ted Lemon ¤¬µ­½Ò¤·¤Þ¤·¤¿¡£
-ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Software Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
+ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Systems Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
+Internet Systems Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
.B http://www.isc.org
¤Ë¤¢¤ê¤Þ¤¹¡£
diff --git a/doc/ja_JP.eucJP/dhcp-options.5 b/doc/ja_JP.eucJP/dhcp-options.5
index 59032b7c..8c5ed881 100644
--- a/doc/ja_JP.eucJP/dhcp-options.5
+++ b/doc/ja_JP.eucJP/dhcp-options.5
@@ -1,36 +1,29 @@
-.\" dhcp-options.5
+.\" $Id: dhcp-options.5,v 1.2 2005/03/17 20:15:06 dhankins Exp $
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -1275,7 +1268,7 @@ NetWare/IP ¥É¥á¥¤¥ó¤Î¥×¥é¥¤¥Þ¥ê¥É¥á¥¤¥ó SAP/RIP ¥µ¡¼¥Ó¥¹¥µ¡¼¥Ð
.RE
.SH ¿·µ¬¥ª¥×¥·¥ç¥ó¤ÎÄêµÁ
.\" metal
-Internet Software Consortium DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢
+Internet Systems Consortium DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢
¿·µ¬¥ª¥×¥·¥ç¥ó¤òÄêµÁ¤¹¤ëµ¡¹½¤âÄ󶡤·¤Æ¤¤¤Þ¤¹¡£
¤½¤ì¤¾¤ì¤Î DHCP ¥ª¥×¥·¥ç¥ó¤Ï¡¢Ì¾Á°¤È¥³¡¼¥É¡¢¹½Â¤¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£
̾Á°¤Ï¡¢»ÈÍѼԤ¬¥ª¥×¥·¥ç¥ó¤ò»²¾È¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤Þ¤¹¡£
@@ -1580,9 +1573,9 @@ DHCP ¥µ¡¼¥Ð¤Ë»Ø¼¨¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
dhclient.conf(5), dhcp-eval(5),
dhclient(8), RFC2132, RFC2131
.SH ºî¼Ô
-Internet Software Consortium DHCP Distribution
+Internet Systems Consortium DHCP Distribution
¤Ï¡¢Vixie Labs ¤È¤Î·ÀÌó¤Î¤â¤È¤Ç¡¢Ted Lemon ¤¬µ­½Ò¤·¤Þ¤·¤¿¡£
-ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Software Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
-Internet Software Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
+ËÜ¥×¥í¥¸¥§¥¯¥È¤Î»ñ¶â¤Ï¡¢Internet Systems Consortium ¤¬Ä󶡤·¤Þ¤·¤¿¡£
+Internet Systems Consortium ¤Ë´Ø¤¹¤ë¾ðÊó¤Ï¡¢
.B http://www.isc.org
¤Ë¤¢¤ê¤Þ¤¹¡£
diff --git a/dst/Makefile.dist b/dst/Makefile.dist
index 2bd3369d..ffe7e4eb 100644
--- a/dst/Makefile.dist
+++ b/dst/Makefile.dist
@@ -1,21 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-2000 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
SRC = dst_support.c dst_api.c hmac_link.c md5_dgst.c base64.c prandom.c
OBJ = dst_support.o dst_api.o hmac_link.o md5_dgst.o base64.o prandom.o
diff --git a/dst/base64.c b/dst/base64.c
index dff9412f..9a216ccb 100644
--- a/dst/base64.c
+++ b/dst/base64.c
@@ -1,18 +1,24 @@
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
@@ -41,7 +47,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: base64.c,v 1.1 2001/02/22 07:22:08 mellon Exp $";
+static const char rcsid[] = "$Id: base64.c,v 1.2 2005/03/17 20:15:06 dhankins Exp $";
#endif /* not lint */
#include <sys/types.h>
diff --git a/dst/md5_dgst.c b/dst/md5_dgst.c
index 2a714ce5..25dd51b7 100644
--- a/dst/md5_dgst.c
+++ b/dst/md5_dgst.c
@@ -224,73 +224,73 @@ register ULONG *X;
D=c->D;
/* Round 0 */
- R0(A,B,C,D,X[ 0], 7,0xd76aa478L);
- R0(D,A,B,C,X[ 1],12,0xe8c7b756L);
- R0(C,D,A,B,X[ 2],17,0x242070dbL);
- R0(B,C,D,A,X[ 3],22,0xc1bdceeeL);
- R0(A,B,C,D,X[ 4], 7,0xf57c0fafL);
- R0(D,A,B,C,X[ 5],12,0x4787c62aL);
- R0(C,D,A,B,X[ 6],17,0xa8304613L);
- R0(B,C,D,A,X[ 7],22,0xfd469501L);
- R0(A,B,C,D,X[ 8], 7,0x698098d8L);
- R0(D,A,B,C,X[ 9],12,0x8b44f7afL);
- R0(C,D,A,B,X[10],17,0xffff5bb1L);
- R0(B,C,D,A,X[11],22,0x895cd7beL);
- R0(A,B,C,D,X[12], 7,0x6b901122L);
- R0(D,A,B,C,X[13],12,0xfd987193L);
- R0(C,D,A,B,X[14],17,0xa679438eL);
- R0(B,C,D,A,X[15],22,0x49b40821L);
+ LOCL_R0(A,B,C,D,X[ 0], 7,0xd76aa478L);
+ LOCL_R0(D,A,B,C,X[ 1],12,0xe8c7b756L);
+ LOCL_R0(C,D,A,B,X[ 2],17,0x242070dbL);
+ LOCL_R0(B,C,D,A,X[ 3],22,0xc1bdceeeL);
+ LOCL_R0(A,B,C,D,X[ 4], 7,0xf57c0fafL);
+ LOCL_R0(D,A,B,C,X[ 5],12,0x4787c62aL);
+ LOCL_R0(C,D,A,B,X[ 6],17,0xa8304613L);
+ LOCL_R0(B,C,D,A,X[ 7],22,0xfd469501L);
+ LOCL_R0(A,B,C,D,X[ 8], 7,0x698098d8L);
+ LOCL_R0(D,A,B,C,X[ 9],12,0x8b44f7afL);
+ LOCL_R0(C,D,A,B,X[10],17,0xffff5bb1L);
+ LOCL_R0(B,C,D,A,X[11],22,0x895cd7beL);
+ LOCL_R0(A,B,C,D,X[12], 7,0x6b901122L);
+ LOCL_R0(D,A,B,C,X[13],12,0xfd987193L);
+ LOCL_R0(C,D,A,B,X[14],17,0xa679438eL);
+ LOCL_R0(B,C,D,A,X[15],22,0x49b40821L);
/* Round 1 */
- R1(A,B,C,D,X[ 1], 5,0xf61e2562L);
- R1(D,A,B,C,X[ 6], 9,0xc040b340L);
- R1(C,D,A,B,X[11],14,0x265e5a51L);
- R1(B,C,D,A,X[ 0],20,0xe9b6c7aaL);
- R1(A,B,C,D,X[ 5], 5,0xd62f105dL);
- R1(D,A,B,C,X[10], 9,0x02441453L);
- R1(C,D,A,B,X[15],14,0xd8a1e681L);
- R1(B,C,D,A,X[ 4],20,0xe7d3fbc8L);
- R1(A,B,C,D,X[ 9], 5,0x21e1cde6L);
- R1(D,A,B,C,X[14], 9,0xc33707d6L);
- R1(C,D,A,B,X[ 3],14,0xf4d50d87L);
- R1(B,C,D,A,X[ 8],20,0x455a14edL);
- R1(A,B,C,D,X[13], 5,0xa9e3e905L);
- R1(D,A,B,C,X[ 2], 9,0xfcefa3f8L);
- R1(C,D,A,B,X[ 7],14,0x676f02d9L);
- R1(B,C,D,A,X[12],20,0x8d2a4c8aL);
+ LOCL_R1(A,B,C,D,X[ 1], 5,0xf61e2562L);
+ LOCL_R1(D,A,B,C,X[ 6], 9,0xc040b340L);
+ LOCL_R1(C,D,A,B,X[11],14,0x265e5a51L);
+ LOCL_R1(B,C,D,A,X[ 0],20,0xe9b6c7aaL);
+ LOCL_R1(A,B,C,D,X[ 5], 5,0xd62f105dL);
+ LOCL_R1(D,A,B,C,X[10], 9,0x02441453L);
+ LOCL_R1(C,D,A,B,X[15],14,0xd8a1e681L);
+ LOCL_R1(B,C,D,A,X[ 4],20,0xe7d3fbc8L);
+ LOCL_R1(A,B,C,D,X[ 9], 5,0x21e1cde6L);
+ LOCL_R1(D,A,B,C,X[14], 9,0xc33707d6L);
+ LOCL_R1(C,D,A,B,X[ 3],14,0xf4d50d87L);
+ LOCL_R1(B,C,D,A,X[ 8],20,0x455a14edL);
+ LOCL_R1(A,B,C,D,X[13], 5,0xa9e3e905L);
+ LOCL_R1(D,A,B,C,X[ 2], 9,0xfcefa3f8L);
+ LOCL_R1(C,D,A,B,X[ 7],14,0x676f02d9L);
+ LOCL_R1(B,C,D,A,X[12],20,0x8d2a4c8aL);
/* Round 2 */
- R2(A,B,C,D,X[ 5], 4,0xfffa3942L);
- R2(D,A,B,C,X[ 8],11,0x8771f681L);
- R2(C,D,A,B,X[11],16,0x6d9d6122L);
- R2(B,C,D,A,X[14],23,0xfde5380cL);
- R2(A,B,C,D,X[ 1], 4,0xa4beea44L);
- R2(D,A,B,C,X[ 4],11,0x4bdecfa9L);
- R2(C,D,A,B,X[ 7],16,0xf6bb4b60L);
- R2(B,C,D,A,X[10],23,0xbebfbc70L);
- R2(A,B,C,D,X[13], 4,0x289b7ec6L);
- R2(D,A,B,C,X[ 0],11,0xeaa127faL);
- R2(C,D,A,B,X[ 3],16,0xd4ef3085L);
- R2(B,C,D,A,X[ 6],23,0x04881d05L);
- R2(A,B,C,D,X[ 9], 4,0xd9d4d039L);
- R2(D,A,B,C,X[12],11,0xe6db99e5L);
- R2(C,D,A,B,X[15],16,0x1fa27cf8L);
- R2(B,C,D,A,X[ 2],23,0xc4ac5665L);
+ LOCL_R2(A,B,C,D,X[ 5], 4,0xfffa3942L);
+ LOCL_R2(D,A,B,C,X[ 8],11,0x8771f681L);
+ LOCL_R2(C,D,A,B,X[11],16,0x6d9d6122L);
+ LOCL_R2(B,C,D,A,X[14],23,0xfde5380cL);
+ LOCL_R2(A,B,C,D,X[ 1], 4,0xa4beea44L);
+ LOCL_R2(D,A,B,C,X[ 4],11,0x4bdecfa9L);
+ LOCL_R2(C,D,A,B,X[ 7],16,0xf6bb4b60L);
+ LOCL_R2(B,C,D,A,X[10],23,0xbebfbc70L);
+ LOCL_R2(A,B,C,D,X[13], 4,0x289b7ec6L);
+ LOCL_R2(D,A,B,C,X[ 0],11,0xeaa127faL);
+ LOCL_R2(C,D,A,B,X[ 3],16,0xd4ef3085L);
+ LOCL_R2(B,C,D,A,X[ 6],23,0x04881d05L);
+ LOCL_R2(A,B,C,D,X[ 9], 4,0xd9d4d039L);
+ LOCL_R2(D,A,B,C,X[12],11,0xe6db99e5L);
+ LOCL_R2(C,D,A,B,X[15],16,0x1fa27cf8L);
+ LOCL_R2(B,C,D,A,X[ 2],23,0xc4ac5665L);
/* Round 3 */
- R3(A,B,C,D,X[ 0], 6,0xf4292244L);
- R3(D,A,B,C,X[ 7],10,0x432aff97L);
- R3(C,D,A,B,X[14],15,0xab9423a7L);
- R3(B,C,D,A,X[ 5],21,0xfc93a039L);
- R3(A,B,C,D,X[12], 6,0x655b59c3L);
- R3(D,A,B,C,X[ 3],10,0x8f0ccc92L);
- R3(C,D,A,B,X[10],15,0xffeff47dL);
- R3(B,C,D,A,X[ 1],21,0x85845dd1L);
- R3(A,B,C,D,X[ 8], 6,0x6fa87e4fL);
- R3(D,A,B,C,X[15],10,0xfe2ce6e0L);
- R3(C,D,A,B,X[ 6],15,0xa3014314L);
- R3(B,C,D,A,X[13],21,0x4e0811a1L);
- R3(A,B,C,D,X[ 4], 6,0xf7537e82L);
- R3(D,A,B,C,X[11],10,0xbd3af235L);
- R3(C,D,A,B,X[ 2],15,0x2ad7d2bbL);
- R3(B,C,D,A,X[ 9],21,0xeb86d391L);
+ LOCL_R3(A,B,C,D,X[ 0], 6,0xf4292244L);
+ LOCL_R3(D,A,B,C,X[ 7],10,0x432aff97L);
+ LOCL_R3(C,D,A,B,X[14],15,0xab9423a7L);
+ LOCL_R3(B,C,D,A,X[ 5],21,0xfc93a039L);
+ LOCL_R3(A,B,C,D,X[12], 6,0x655b59c3L);
+ LOCL_R3(D,A,B,C,X[ 3],10,0x8f0ccc92L);
+ LOCL_R3(C,D,A,B,X[10],15,0xffeff47dL);
+ LOCL_R3(B,C,D,A,X[ 1],21,0x85845dd1L);
+ LOCL_R3(A,B,C,D,X[ 8], 6,0x6fa87e4fL);
+ LOCL_R3(D,A,B,C,X[15],10,0xfe2ce6e0L);
+ LOCL_R3(C,D,A,B,X[ 6],15,0xa3014314L);
+ LOCL_R3(B,C,D,A,X[13],21,0x4e0811a1L);
+ LOCL_R3(A,B,C,D,X[ 4], 6,0xf7537e82L);
+ LOCL_R3(D,A,B,C,X[11],10,0xbd3af235L);
+ LOCL_R3(C,D,A,B,X[ 2],15,0x2ad7d2bbL);
+ LOCL_R3(B,C,D,A,X[ 9],21,0xeb86d391L);
c->A+=A&0xffffffffL;
c->B+=B&0xffffffffL;
diff --git a/dst/md5_locl.h b/dst/md5_locl.h
index b2f0028f..c52d7337 100644
--- a/dst/md5_locl.h
+++ b/dst/md5_locl.h
@@ -168,23 +168,22 @@
#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
#endif
-
-#define R0(a,b,c,d,k,s,t) { \
+#define LOCL_R0(a,b,c,d,k,s,t) { \
a+=((k)+(t)+F((b),(c),(d))); \
a=ROTATE(a,s); \
a+=b; };\
-#define R1(a,b,c,d,k,s,t) { \
+#define LOCL_R1(a,b,c,d,k,s,t) { \
a+=((k)+(t)+G((b),(c),(d))); \
a=ROTATE(a,s); \
a+=b; };
-#define R2(a,b,c,d,k,s,t) { \
+#define LOCL_R2(a,b,c,d,k,s,t) { \
a+=((k)+(t)+H((b),(c),(d))); \
a=ROTATE(a,s); \
a+=b; };
-#define R3(a,b,c,d,k,s,t) { \
+#define LOCL_R3(a,b,c,d,k,s,t) { \
a+=((k)+(t)+I((b),(c),(d))); \
a=ROTATE(a,s); \
a+=b; };
diff --git a/includes/arpa/nameser.h b/includes/arpa/nameser.h
index 19c9d5df..be80e572 100644
--- a/includes/arpa/nameser.h
+++ b/includes/arpa/nameser.h
@@ -32,24 +32,30 @@
*/
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
- * $Id: nameser.h,v 1.4 2000/02/02 07:23:18 mellon Exp $
+ * $Id: nameser.h,v 1.5 2005/03/17 20:15:10 dhankins Exp $
*/
#ifndef _ARPA_NAMESER_H_
diff --git a/includes/cdefs.h b/includes/cdefs.h
index 4aadc0af..3e344c91 100644
--- a/includes/cdefs.h
+++ b/includes/cdefs.h
@@ -4,39 +4,30 @@
/*
* Copyright (c) 1995 RadioMail Corporation. All rights reserved.
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
* This software was written for RadioMail Corporation by Ted Lemon
* under a contract with Vixie Enterprises. Further modifications have
- * been made for the Internet Software Consortium under a contract
+ * been made for Internet Systems Consortium under a contract
* with Vixie Laboratories.
*/
diff --git a/includes/cf/aix.h b/includes/cf/aix.h
index 444d5ebe..202e8572 100644
--- a/includes/cf/aix.h
+++ b/includes/cf/aix.h
@@ -3,39 +3,30 @@
Configuration file for IBM's AIX operating system. */
/*
- * Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -85,8 +76,13 @@ extern int h_errno;
#define VA_start(list, last) va_start (list)
#define va_dcl
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
+/* The vsnprint function definition in /usr/include/ appears to use this
+ * as a key for wether or not it should be declared. Seems reasoanble for
+ * us to use the same key.
+ */
+#if (_XOPEN_SOURCE != 500)
#define NO_SNPRINTF
+#endif
#define EOL '\n'
#define VOIDPTR void *
diff --git a/includes/cf/alphaosf.h b/includes/cf/alphaosf.h
index 0a5858e9..625e4a92 100644
--- a/includes/cf/alphaosf.h
+++ b/includes/cf/alphaosf.h
@@ -3,39 +3,30 @@
System dependencies for DEC Alpha/OSF1... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -78,6 +69,14 @@ typedef unsigned long u_int64_t;
#define va_dcl
#define VA_start(list, last) va_start (list, last)
+/* Our reports say that OSF/1 versions 4.0G and later have v/snprintf
+ * implementations. 4.0F and previous do not. This is detected at
+ * ./configure time from 'sizer -v'.
+ */
+#ifndef HAVE_SNPRINTF
+# define NO_SNPRINTF
+#endif
+
#ifndef _PATH_DHCPD_PID
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
#endif
@@ -100,10 +99,6 @@ typedef unsigned long u_int64_t;
#define jdref(x) (x)
#define jrefproto jmp_buf
-/* OSF/1 doesn't support limited sprintfs. */
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
-#define NO_SNPRINTF
-
#define NEED_OSF_PFILT_HACKS
#define BPF_FORMAT "/dev/pf/pfilt%d"
diff --git a/includes/cf/bsdos.h b/includes/cf/bsdos.h
index ca4dbcce..9f9234b5 100644
--- a/includes/cf/bsdos.h
+++ b/includes/cf/bsdos.h
@@ -3,39 +3,30 @@
System dependencies for BSDI BSD/OS... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/cf/cygwin32.h b/includes/cf/cygwin32.h
index 55dbd875..812180ae 100644
--- a/includes/cf/cygwin32.h
+++ b/includes/cf/cygwin32.h
@@ -4,39 +4,30 @@
doesn't work yet, so don't get too excited! */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -77,7 +68,8 @@
#define VA_DOTDOTDOT ...
#define va_dcl
#define VA_start(list, last) va_start (list, last)
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
+
+/* XXX: System is not believed to have vsnprintf. Someone please verify. */
#define NO_SNPRINTF
#ifndef _PATH_DHCPD_PID
diff --git a/includes/cf/freebsd.h b/includes/cf/freebsd.h
index 590d0e81..75804de7 100644
--- a/includes/cf/freebsd.h
+++ b/includes/cf/freebsd.h
@@ -3,46 +3,35 @@
System dependencies for FreeBSD... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
-#define _ANSI_SOURCE
-
#include <syslog.h>
#include <sys/types.h>
#include <string.h>
@@ -70,6 +59,11 @@ extern int h_errno;
#define va_dcl
#define VA_start(list, last) va_start (list, last)
+#if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || \
+ defined(__sparc64__)
+# define PTRSIZE_64BIT
+#endif
+
#ifndef _PATH_DHCPD_PID
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
#endif
diff --git a/includes/cf/hpux.h b/includes/cf/hpux.h
index 9dadf503..bd3cf1f9 100644
--- a/includes/cf/hpux.h
+++ b/includes/cf/hpux.h
@@ -3,39 +3,30 @@
Configuration file for HP-UX */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -90,9 +81,6 @@ extern int h_errno;
#define VA_start(list, last) va_start (list)
#endif
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
-#define NO_SNPRINTF
-
#define USE_SOCKETS 1
#define EOL '\n'
#define VOIDPTR void *
@@ -139,3 +127,8 @@ const char *files[] = {
NULL
};
#endif /* NEED_PRAND_CONF */
+
+/* these are #defined somewhere in /usr/include headers. */
+#undef NO
+#undef SERVER
+
diff --git a/includes/cf/irix.h b/includes/cf/irix.h
index 2cfd749a..d03a9177 100644
--- a/includes/cf/irix.h
+++ b/includes/cf/irix.h
@@ -1,34 +1,26 @@
/* irix.h */
/*
- * Copyright (c) 1996, 1999 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#define int8_t char
@@ -75,7 +67,7 @@ extern int h_errno;
#define VA_start(list, last) va_start (list, last)
#define va_dcl
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
+/* XXX: System is not believed to have snprintf/vsnprintf. Please verify. */
#define NO_SNPRINTF
#if defined (USE_DEFAULT_NETWORK)
diff --git a/includes/cf/linux.h b/includes/cf/linux.h
index 808fe846..6cefbd0e 100644
--- a/includes/cf/linux.h
+++ b/includes/cf/linux.h
@@ -5,39 +5,30 @@
Based on a configuration originally supplied by Jonathan Stone. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -105,9 +96,6 @@ extern int h_errno;
#define VA_start(list, last) va_start (list, last)
#define va_dcl
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
-#define NO_SNPRINTF
-
#define VOIDPTR void *
#define EOL '\n'
@@ -134,9 +122,6 @@ extern int h_errno;
# endif
# define HAVE_ARPHRD_METRICOM
# define HAVE_ARPHRD_IEEE802
-# if (LINUX_MINOR >= 4)
-# define HAVE_ARPHRD_IEEE802_TR
-# endif
# define HAVE_ARPHRD_LOOPBACK
# define HAVE_SO_BINDTODEVICE
# define HAVE_SIOCGIFHWADDR
diff --git a/includes/cf/netbsd.h b/includes/cf/netbsd.h
index facc38f5..fcd95577 100644
--- a/includes/cf/netbsd.h
+++ b/includes/cf/netbsd.h
@@ -3,39 +3,30 @@
System dependencies for NetBSD... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -97,7 +88,7 @@ extern int h_errno;
# define USE_BPF
#endif
-#ifdef __alpha__
+#if defined (__alpha__) || defined (__sparc64__)
#define PTRSIZE_64BIT
#endif
diff --git a/includes/cf/nextstep.h b/includes/cf/nextstep.h
index 9ac38c89..38517230 100644
--- a/includes/cf/nextstep.h
+++ b/includes/cf/nextstep.h
@@ -3,39 +3,30 @@
System dependencies for NEXTSTEP 3 & 4 (tested on 4.2PR2)... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -97,9 +88,10 @@ extern int h_errno;
#define VA_DOTDOTDOT ...
#define VA_start(list, last) va_start (list, last)
#define va_dcl
+
/* NeXT lacks snprintf */
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
+
/* Porting::
You must define the default network API for your port. This
will depend on whether one of the existing APIs will work for
diff --git a/includes/cf/openbsd.h b/includes/cf/openbsd.h
index b1ec1175..dc29bf3b 100644
--- a/includes/cf/openbsd.h
+++ b/includes/cf/openbsd.h
@@ -3,39 +3,30 @@
System dependencies for OpenBSD... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/cf/qnx.h b/includes/cf/qnx.h
index 17a54995..5bd6673e 100644
--- a/includes/cf/qnx.h
+++ b/includes/cf/qnx.h
@@ -3,39 +3,30 @@
System dependencies for QNX... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -117,7 +108,6 @@ typedef int socklen_t;
#ifndef __QNXNTO__
# define NO_SNPRINTF
-# define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
#endif
#ifdef __QNXNTO__
diff --git a/includes/cf/rhapsody.h b/includes/cf/rhapsody.h
index 2622004f..d99a7c67 100644
--- a/includes/cf/rhapsody.h
+++ b/includes/cf/rhapsody.h
@@ -3,39 +3,30 @@
System dependencies for NetBSD... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/cf/sample.h b/includes/cf/sample.h
index cb5d7549..0f793184 100644
--- a/includes/cf/sample.h
+++ b/includes/cf/sample.h
@@ -9,39 +9,30 @@
probably worth looking at the config files for working ports as well. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -180,10 +171,10 @@ extern int h_errno;
sprintf functions which will deposit a limited number of characters
into the buffer; that limit is provided in an extra argument.
If your system doesn't support this functionality, you must include
- the definitions below: */
+ the definition below for a dhcp-distribution-local version to be
+ built and used: */
#if 0
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
#endif
diff --git a/includes/cf/sco.h b/includes/cf/sco.h
index ccd132e8..ce844e48 100644
--- a/includes/cf/sco.h
+++ b/includes/cf/sco.h
@@ -5,39 +5,30 @@
Based on changes contributed by Gerald Rosenberg. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -114,7 +105,6 @@ extern int h_errno;
#define va_dcl
/* SCO doesn't support limited sprintfs. */
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
/* By default, use BSD Socket API for receiving and sending packets.
diff --git a/includes/cf/sunos4.h b/includes/cf/sunos4.h
index 26a5c397..f6fa5578 100644
--- a/includes/cf/sunos4.h
+++ b/includes/cf/sunos4.h
@@ -3,39 +3,30 @@
System dependencies for SunOS 4 (tested on 4.1.4)... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -129,7 +120,6 @@ extern int h_errno;
#endif /* !__GNUC__*/
/* SunOS doesn't support limited sprintfs. */
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
/* SunOS doesn't supply strerror... */
diff --git a/includes/cf/sunos5-5.h b/includes/cf/sunos5-5.h
index cf138ae3..8a1e416b 100644
--- a/includes/cf/sunos5-5.h
+++ b/includes/cf/sunos5-5.h
@@ -3,53 +3,40 @@
System dependencies for Solaris 2.x (tested on 2.5 with gcc)... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
-/* Basic Integer Types not defined in SunOS headers... */
+/* SunOS defines uint*_t and int*_t, but not u_int*_t. */
-#define int8_t char
-#define int16_t short
-#define int32_t long
-
-#define u_int8_t unsigned char
-#define u_int16_t unsigned short
-#define u_int32_t unsigned long
+typedef uint8_t u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
/* The jmp_buf type is an array on Solaris, so we can't dereference it
and must declare it differently. */
@@ -116,10 +103,6 @@ extern int h_errno;
#define VA_start(list, last) va_start (list)
#endif /* !__GNUC__*/
-/* Solaris doesn't support limited sprintfs. */
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
-#define NO_SNPRINTF
-
#define NEED_INET_ATON
#if defined (USE_DEFAULT_NETWORK)
diff --git a/includes/cf/ultrix.h b/includes/cf/ultrix.h
index 8b3a859e..176d4f48 100644
--- a/includes/cf/ultrix.h
+++ b/includes/cf/ultrix.h
@@ -3,39 +3,30 @@
System dependencies for Ultrix 4.2 (tested on 4.2a+multicast)... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -93,8 +84,10 @@ extern int h_errno;
#include <varargs.h>
#define VA_DOTDOTDOT va_alist
#define VA_start(list, last) va_start (list)
-#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
+
+/* XXX: System is not thought to support snprintf/vsnprintf. Please verify. */
#define NO_SNPRINTF
+
#define NEED_INET_ATON
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
diff --git a/includes/ctrace.h b/includes/ctrace.h
index a0a7ef84..6b0ad756 100644
--- a/includes/ctrace.h
+++ b/includes/ctrace.h
@@ -3,39 +3,30 @@
Definitions for dhcp tracing facility... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about the Internet Software Consortium, see http://www.isc.org/. To
+ * about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
diff --git a/includes/dhcp.h b/includes/dhcp.h
index 382acde5..76dd07bb 100644
--- a/includes/dhcp.h
+++ b/includes/dhcp.h
@@ -3,41 +3,31 @@
Protocol structures... */
/*
- * Copyright (c) 1995-2001 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
- * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
- * Enterprises. To learn more about the Internet Software Consortium,
- * see ``http://www.vix.com/isc''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''.
+ * This software has been written for Internet Systems Consortium
+ * by Ted Lemon in cooperation with Vixie Enterprises. To learn more
+ * about Internet Systems Consortium, see ``http://www.isc.org''.
+ * To learn more about Vixie Enterprises, see ``http://www.vix.com''.
*/
#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index b4b8ac69..e12bc9c8 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -3,39 +3,30 @@
Definitions for dhcpd... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -70,6 +61,15 @@
# include "minires/minires.h"
#endif
+struct hash_table;
+typedef struct hash_table group_hash_t;
+typedef struct hash_table universe_hash_t;
+typedef struct hash_table option_hash_t;
+typedef struct hash_table dns_zone_hash_t;
+typedef struct hash_table lease_hash_t;
+typedef struct hash_table host_hash_t;
+typedef struct hash_table class_hash_t;
+
#include "dhcp.h"
#include "statement.h"
#include "tree.h"
@@ -255,17 +255,19 @@ typedef struct {
} dhcp_control_object_t;
/* Lease states: */
-typedef enum {
- FTS_FREE = 1,
- FTS_ACTIVE = 2,
- FTS_EXPIRED = 3,
- FTS_RELEASED = 4,
- FTS_ABANDONED = 5,
- FTS_RESET = 6,
- FTS_BACKUP = 7,
- FTS_RESERVED = 8,
- FTS_BOOTP = 9
-} binding_state_t;
+#define FTS_FREE 1
+#define FTS_ACTIVE 2
+#define FTS_EXPIRED 3
+#define FTS_RELEASED 4
+#define FTS_ABANDONED 5
+#define FTS_RESET 6
+#define FTS_BACKUP 7
+#define FTS_RESERVED 8
+#define FTS_BOOTP 9
+typedef u_int8_t binding_state_t;
+
+/* FTS_LAST is the highest value that is valid for a lease binding state. */
+#define FTS_LAST FTS_BOOTP
/* A dhcp lease declaration structure. */
struct lease {
@@ -295,16 +297,19 @@ struct lease {
u_int8_t flags;
# define STATIC_LEASE 1
+# define BOOTP_LEASE 2
# define PERSISTENT_FLAGS (ON_ACK_QUEUE | ON_UPDATE_QUEUE)
# define MS_NULL_TERMINATION 8
# define ON_UPDATE_QUEUE 16
# define ON_ACK_QUEUE 32
# define UNICAST_BROADCAST_HACK 64
+# define ON_DEFERRED_QUEUE 128
# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
UNICAST_BROADCAST_HACK)
- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
+ binding_state_t binding_state;
+ binding_state_t next_binding_state;
+ binding_state_t desired_binding_state;
struct lease_state *state;
@@ -406,6 +411,12 @@ struct lease_state {
#define SV_PING_CHECKS 42
#define SV_UPDATE_STATIC_LEASES 43
#define SV_LOG_FACILITY 44
+#define SV_DO_FORWARD_UPDATES 45
+#define SV_PING_TIMEOUT 46
+
+#if !defined (DEFAULT_PING_TIMEOUT)
+# define DEFAULT_PING_TIMEOUT 1
+#endif
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
# define DEFAULT_DEFAULT_LEASE_TIME 43200
@@ -606,7 +617,7 @@ struct class {
int dirty;
/* Hash table containing subclasses. */
- struct hash_table *hash;
+ class_hash_t *hash;
struct data_string hash_string;
/* Expression used to match class. */
@@ -619,7 +630,6 @@ struct class {
struct group *group;
-
/* Statements to execute if class matches. */
struct executable_statement *statements;
@@ -642,7 +652,7 @@ struct client_lease {
struct auth_key *key; /* Key used in basic DHCP authentication. */
unsigned int is_static : 1; /* If set, lease is from config file. */
- unsigned int is_bootp: 1; /* If set, lease was aquired with BOOTP. */
+ unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
struct option_state *options; /* Options supplied with lease. */
};
@@ -716,6 +726,9 @@ struct client_config {
int omapi_port; /* port on which to accept OMAPI
connections, or -1 for no
listener. */
+ int do_forward_update; /* If nonzero, and if we have the
+ information we need, update the
+ A record for the address we get. */
};
/* Per-interface state used in the dhcp client... */
@@ -736,6 +749,7 @@ struct client_state {
u_int16_t secs; /* secs value from DHCPDISCOVER. */
TIME first_sending; /* When was first copy sent? */
TIME interval; /* What's the current resend interval? */
+ int dns_update_timeout; /* Last timeout set for DNS update. */
struct string_list *medium; /* Last media type tried. */
struct dhcp_packet packet; /* Outgoing DHCP packet. */
unsigned packet_length; /* Actual length of generated packet. */
@@ -773,7 +787,7 @@ struct interface_info {
int wfdesc; /* Its write file descriptor, if
different. */
unsigned char *rbuf; /* Read buffer, if required. */
- size_t rbuf_max; /* Size of read buffer. */
+ unsigned int rbuf_max; /* Size of read buffer. */
size_t rbuf_offset; /* Current offset into buffer. */
size_t rbuf_len; /* Length of data in buffer. */
@@ -893,6 +907,8 @@ typedef unsigned char option_mask [16];
#define _PATH_DHCPD_CONF "dhcpd.conf"
#undef _PATH_DHCPD_DB
#define _PATH_DHCPD_DB "dhcpd.leases"
+#undef _PATH_DHCPD_PID
+#define _PATH_DHCPD_PID "dhcpd.pid"
#else
#ifndef _PATH_DHCPD_CONF
#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
@@ -940,6 +956,14 @@ typedef unsigned char option_mask [16];
/* External definitions... */
+HASH_FUNCTIONS_DECL (group, const char *, struct group_object, group_hash_t)
+HASH_FUNCTIONS_DECL (universe, const char *, struct universe, universe_hash_t)
+HASH_FUNCTIONS_DECL (option, const char *, struct option, option_hash_t)
+HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone, dns_zone_hash_t)
+HASH_FUNCTIONS_DECL (lease, const unsigned char *, struct lease, lease_hash_t)
+HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl, host_hash_t)
+HASH_FUNCTIONS_DECL (class, const char *, struct class, class_hash_t)
+
/* options.c */
extern struct option *vendor_cfg_option;
@@ -957,7 +981,7 @@ int cons_options PROTO ((struct packet *, struct dhcp_packet *, struct lease *,
int, int, int, struct data_string *, const char *));
int fqdn_universe_decode (struct option_state *,
const unsigned char *, unsigned, struct universe *);
-int store_options PROTO ((unsigned char *, unsigned, struct packet *,
+int store_options PROTO ((int *, unsigned char *, unsigned, struct packet *,
struct lease *, struct client_state *,
struct option_state *,
struct option_state *, struct binding_scope **,
@@ -1148,6 +1172,7 @@ void parse_failover_state_declaration (struct parse *,
void parse_failover_state PROTO ((struct parse *,
enum failover_state *, TIME *));
#endif
+int permit_list_match (struct permit *, struct permit *);
void parse_pool_statement PROTO ((struct parse *, struct group *, int));
int parse_boolean PROTO ((struct parse *));
int parse_lbrace PROTO ((struct parse *));
@@ -1161,8 +1186,8 @@ void parse_group_declaration PROTO ((struct parse *, struct group *));
int parse_fixed_addr_param PROTO ((struct option_cache **, struct parse *));
TIME parse_timestamp PROTO ((struct parse *));
int parse_lease_declaration PROTO ((struct lease **, struct parse *));
-void parse_address_range PROTO ((struct parse *,
- struct group *, int, struct pool *));
+void parse_address_range PROTO ((struct parse *, struct group *, int,
+ struct pool *, struct lease **));
/* ddns.c */
int ddns_updates PROTO ((struct packet *, struct lease *, struct lease *,
@@ -1376,7 +1401,7 @@ void bootp PROTO ((struct packet *));
/* memory.c */
int (*group_write_hook) (struct group_object *);
extern struct group *root_group;
-extern struct hash_table *group_name_hash;
+extern group_hash_t *group_name_hash;
isc_result_t delete_group (struct group_object *, int);
isc_result_t supersede_group (struct group_object *, int);
int clone_group (struct group **, struct group *, const char *, int);
@@ -1780,12 +1805,9 @@ extern int dhcp_option_default_priority_list_count;
extern const char *hardware_types [256];
int universe_count, universe_max;
struct universe **universes;
-extern struct hash_table *universe_hash;
+extern universe_hash_t *universe_hash;
void initialize_common_option_spaces PROTO ((void));
struct universe *config_universe;
-HASH_FUNCTIONS_DECL (group, const char *, struct group_object)
-HASH_FUNCTIONS_DECL (universe, const char *, struct universe)
-HASH_FUNCTIONS_DECL (option, const char *, struct option)
/* stables.c */
#if defined (FAILOVER_PROTOCOL)
@@ -1815,7 +1837,6 @@ u_int32_t host_addr PROTO ((struct iaddr, struct iaddr));
int addr_eq PROTO ((struct iaddr, struct iaddr));
char *piaddr PROTO ((struct iaddr));
char *piaddrmask (struct iaddr, struct iaddr, const char *, int);
-char *piaddr1 PROTO ((struct iaddr));
/* dhclient.c */
extern const char *path_dhclient_conf;
@@ -1885,7 +1906,8 @@ void do_release PROTO ((struct client_state *));
int dhclient_interface_shutdown_hook (struct interface_info *);
int dhclient_interface_discovery_hook (struct interface_info *);
isc_result_t dhclient_interface_startup_hook (struct interface_info *);
-void client_dns_update (struct client_state *client, int);
+void client_dns_update_timeout (void *cp);
+isc_result_t client_dns_update (struct client_state *client, int, int);
/* db.c */
int write_lease PROTO ((struct lease *));
@@ -1898,6 +1920,7 @@ int db_printable_len PROTO ((const unsigned char *, unsigned));
void write_named_billing_class (const char *, unsigned, struct class *);
void write_billing_classes (void);
int write_billing_class PROTO ((struct class *));
+void commit_leases_timeout PROTO ((void *));
int commit_leases PROTO ((void));
void db_startup PROTO ((int));
int new_lease_file PROTO ((void));
@@ -1915,7 +1938,7 @@ ssize_t decode_hw_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
- unsigned char *, unsigned));
+ unsigned));
/* ethernet.c */
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
@@ -2037,7 +2060,6 @@ isc_result_t ddns_update_a (struct data_string *, struct iaddr,
isc_result_t ddns_remove_a (struct data_string *,
struct iaddr, struct data_string *);
#endif /* NSUPDATE */
-HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone)
/* resolv.c */
extern char path_resolv_conf [];
@@ -2381,12 +2403,12 @@ isc_result_t binding_scope_stuff_values (omapi_object_t *,
extern struct subnet *subnets;
extern struct shared_network *shared_networks;
-extern struct hash_table *host_hw_addr_hash;
-extern struct hash_table *host_uid_hash;
-extern struct hash_table *host_name_hash;
-extern struct hash_table *lease_uid_hash;
-extern struct hash_table *lease_ip_addr_hash;
-extern struct hash_table *lease_hw_addr_hash;
+extern host_hash_t *host_hw_addr_hash;
+extern host_hash_t *host_uid_hash;
+extern host_hash_t *host_name_hash;
+extern lease_hash_t *lease_uid_hash;
+extern lease_hash_t *lease_ip_addr_hash;
+extern lease_hash_t *lease_hw_addr_hash;
extern omapi_object_type_t *dhcp_type_host;
@@ -2404,8 +2426,9 @@ int find_hosts_by_uid PROTO ((struct host_decl **, const unsigned char *,
unsigned, const char *, int));
int find_host_for_network PROTO ((struct subnet **, struct host_decl **,
struct iaddr *, struct shared_network *));
-void new_address_range PROTO ((struct iaddr, struct iaddr,
- struct subnet *, struct pool *));
+void new_address_range PROTO ((struct parse *, struct iaddr, struct iaddr,
+ struct subnet *, struct pool *,
+ struct lease **));
isc_result_t dhcp_lease_free (omapi_object_t *, const char *, int);
isc_result_t dhcp_lease_get (omapi_object_t **, const char *, int);
int find_grouped_subnet PROTO ((struct subnet **, struct shared_network *,
@@ -2444,9 +2467,6 @@ void dump_subnets PROTO ((void));
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
void free_everything (void);
#endif
-HASH_FUNCTIONS_DECL (lease, const unsigned char *, struct lease)
-HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl)
-HASH_FUNCTIONS_DECL (class, const char *, struct class)
/* nsupdate.c */
char *ddns_rev_name (struct lease *, struct lease_state *, struct packet *);
diff --git a/includes/dhctoken.h b/includes/dhctoken.h
index 876d8f39..858e3c98 100644
--- a/includes/dhctoken.h
+++ b/includes/dhctoken.h
@@ -3,39 +3,30 @@
Tokens for config file lexer and parser. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -315,10 +306,12 @@ enum dhcp_token {
CONNECT = 610,
REMOVE = 611,
REFRESH = 612,
- DOMAIN_NAME = 613
+ DOMAIN_NAME = 613,
+ DO_FORWARD_UPDATE = 614,
+ KNOWN_CLIENTS = 615
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \
(x) != NUMBER && \
- (x) != EOF)
+ (x) != END_OF_FILE)
diff --git a/includes/failover.h b/includes/failover.h
index e27a9115..f4ff7e9e 100644
--- a/includes/failover.h
+++ b/includes/failover.h
@@ -3,39 +3,30 @@
Definitions for address trees... */
/*
- * Copyright (c) 2000-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2000-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -316,6 +307,8 @@ typedef struct _dhcp_failover_state {
queue. */
int pool_count; /* Number of pools referencing this
failover state object. */
+ int curUPD; /* If an UPDREQ* message is in motion,
+ this value indicates which one. */
} dhcp_failover_state_t;
#define DHCP_FAILOVER_VERSION 1
diff --git a/includes/inet.h b/includes/inet.h
index 01541724..d037d78b 100644
--- a/includes/inet.h
+++ b/includes/inet.h
@@ -3,39 +3,30 @@
Portable definitions for internet addresses */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/isc-dhcp/boolean.h b/includes/isc-dhcp/boolean.h
index 08d8c245..e0dd968c 100644
--- a/includes/isc-dhcp/boolean.h
+++ b/includes/isc-dhcp/boolean.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1998, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_BOOLEAN_H
diff --git a/includes/isc-dhcp/int.h b/includes/isc-dhcp/int.h
index 98159f53..c5deef5d 100644
--- a/includes/isc-dhcp/int.h
+++ b/includes/isc-dhcp/int.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_INT_H
diff --git a/includes/isc-dhcp/lang.h b/includes/isc-dhcp/lang.h
index 3edeb72d..00de9bfc 100644
--- a/includes/isc-dhcp/lang.h
+++ b/includes/isc-dhcp/lang.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_LANG_H
diff --git a/includes/isc-dhcp/list.h b/includes/isc-dhcp/list.h
index d9660088..0d06244e 100644
--- a/includes/isc-dhcp/list.h
+++ b/includes/isc-dhcp/list.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1997, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1997-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_LIST_H
diff --git a/includes/isc-dhcp/result.h b/includes/isc-dhcp/result.h
index a2de1fcd..0590f86a 100644
--- a/includes/isc-dhcp/result.h
+++ b/includes/isc-dhcp/result.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1998, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_RESULT_H
diff --git a/includes/isc-dhcp/types.h b/includes/isc-dhcp/types.h
index 862bd376..5da4e2e8 100644
--- a/includes/isc-dhcp/types.h
+++ b/includes/isc-dhcp/types.h
@@ -1,18 +1,24 @@
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef ISC_TYPES_H
diff --git a/includes/minires/minires.h b/includes/minires/minires.h
index 2a6a1336..19d21318 100644
--- a/includes/minires/minires.h
+++ b/includes/minires/minires.h
@@ -1,23 +1,31 @@
/*
- * Copyright (c) 2001 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#include "cdefs.h"
#include "osdep.h"
+#define _ns_flagdata MR_ns_flagdata
+
#include "minires/resolv.h"
#include "minires/res_update.h"
#include "isc-dhcp/result.h"
@@ -151,7 +159,7 @@ isc_result_t res_nmkquery (res_state, int, const char *, ns_class, ns_type,
const unsigned char *, unsigned,
const unsigned char *, double *,
unsigned, unsigned *);
-int ns_initparse (const unsigned char *, unsigned, ns_msg *);
+isc_result_t ns_initparse (const unsigned char *, unsigned, ns_msg *);
isc_result_t res_nquery(res_state, const char *,
ns_class, ns_type, double *, unsigned, unsigned *);
isc_result_t res_nsearch(res_state, const char *,
@@ -161,7 +169,8 @@ isc_result_t res_nquerydomain(res_state, const char *, const char *,
ns_class class, ns_type type,
double *, unsigned, unsigned *);
-int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
+isc_result_t ns_skiprr(const unsigned char *,
+ const unsigned char *, ns_sect, int, int *);
int dn_skipname (const unsigned char *, const unsigned char *);
u_int32_t getULong (const unsigned char *);
int32_t getLong (const unsigned char *);
diff --git a/includes/minires/res_update.h b/includes/minires/res_update.h
index 634c11a9..74b2e6ee 100644
--- a/includes/minires/res_update.h
+++ b/includes/minires/res_update.h
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1999 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
- * $Id: res_update.h,v 1.3 2001/06/27 00:30:24 mellon Exp $
+ * $Id: res_update.h,v 1.4 2005/03/17 20:15:15 dhankins Exp $
*/
#ifndef __RES_UPDATE_H
diff --git a/includes/minires/resolv.h b/includes/minires/resolv.h
index 233971d8..ad7759c5 100644
--- a/includes/minires/resolv.h
+++ b/includes/minires/resolv.h
@@ -32,25 +32,31 @@
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.3 2000/07/17 20:54:12 mellon Exp $
+ * $Id: resolv.h,v 1.4 2005/03/17 20:15:15 dhankins Exp $
*/
#ifndef _RESOLV_H_
diff --git a/includes/netinet/udp.h b/includes/netinet/udp.h
index 95bc044f..350f1ece 100644
--- a/includes/netinet/udp.h
+++ b/includes/netinet/udp.h
@@ -36,6 +36,29 @@
*/
/*
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 2000-2003 by Internet Software Consortium
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
+ */
+
+/*
* Udp protocol header.
* Per RFC 768, September, 1981.
*/
diff --git a/includes/omapip/alloc.h b/includes/omapip/alloc.h
index a130a203..5d1dec0f 100644
--- a/includes/omapip/alloc.h
+++ b/includes/omapip/alloc.h
@@ -3,39 +3,30 @@
Definitions for the object management API protocol memory allocation... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -66,11 +57,19 @@ struct dmalloc_preamble {
#define DMDSIZE 0
#endif
+/* rc_history flags... */
+#define RC_LEASE 1
+#define RC_MISC 2
+
#if defined (DEBUG_RC_HISTORY)
#if !defined (RC_HISTORY_MAX)
# define RC_HISTORY_MAX 256
#endif
+#if !defined (RC_HISTORY_FLAGS)
+# define RC_HISTORY_FLAGS (RC_LEASE | RC_MISC)
+#endif
+
struct rc_history_entry {
const char *file;
int line;
@@ -79,19 +78,21 @@ struct rc_history_entry {
int refcnt;
};
-#define rc_register(x, l, r, y, z, d) do { \
- rc_history [rc_history_index].file = (x); \
- rc_history [rc_history_index].line = (l); \
- rc_history [rc_history_index].reference = (r); \
- rc_history [rc_history_index].addr = (y); \
- rc_history [rc_history_index].refcnt = (z); \
- rc_history_next (d); \
+#define rc_register(x, l, r, y, z, d, f) do { \
+ if (RC_HISTORY_FLAGS & ~(f)) { \
+ rc_history [rc_history_index].file = (x); \
+ rc_history [rc_history_index].line = (l); \
+ rc_history [rc_history_index].reference = (r); \
+ rc_history [rc_history_index].addr = (y); \
+ rc_history [rc_history_index].refcnt = (z); \
+ rc_history_next (d); \
+ } \
} while (0)
-#define rc_register_mdl(r, y, z, d) \
- rc_register (__FILE__, __LINE__, r, y, z, d)
+#define rc_register_mdl(r, y, z, d, f) \
+ rc_register (__FILE__, __LINE__, r, y, z, d, f)
#else
-#define rc_register(file, line, reference, addr, refcnt, d)
-#define rc_register_mdl(reference, addr, refcnt, d)
+#define rc_register(file, line, reference, addr, refcnt, d, f)
+#define rc_register_mdl(reference, addr, refcnt, d, f)
#endif
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
diff --git a/includes/omapip/buffer.h b/includes/omapip/buffer.h
index 16705559..cc6b6a98 100644
--- a/includes/omapip/buffer.h
+++ b/includes/omapip/buffer.h
@@ -3,39 +3,30 @@
Definitions for the object management API protocol buffering... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/omapip/convert.h b/includes/omapip/convert.h
index b6d2d9fb..3fbf347d 100644
--- a/includes/omapip/convert.h
+++ b/includes/omapip/convert.h
@@ -3,39 +3,30 @@
Safe copying of integers into and out of a non-aligned memory buffer. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/omapip/hash.h b/includes/omapip/hash.h
index 3f91d403..b8ecbe6c 100644
--- a/includes/omapip/hash.h
+++ b/includes/omapip/hash.h
@@ -3,39 +3,30 @@
Definitions for hashing... */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -81,55 +72,71 @@ struct named_hash {
struct hash_table *hash;
};
-#define HASH_FUNCTIONS_DECL(name, bufarg, type) \
-void name##_hash_add (struct hash_table *, bufarg, unsigned, type *, \
+#define HASH_FUNCTIONS_DECL(name, bufarg, type, hashtype) \
+void name##_hash_add (hashtype *, bufarg, unsigned, type *, \
const char *, int); \
-void name##_hash_delete (struct hash_table *, bufarg, unsigned, \
+void name##_hash_delete (hashtype *, bufarg, unsigned, \
const char *, int); \
-int name##_hash_lookup (type **, struct hash_table *, bufarg, unsigned, \
+int name##_hash_lookup (type **, hashtype *, bufarg, unsigned, \
const char *, int); \
-int name##_hash_foreach (struct hash_table *, \
- void (*) (bufarg, unsigned, type *));
+int name##_hash_foreach (hashtype *, \
+ void (*) (bufarg, unsigned, type *)); \
+int name##_new_hash (hashtype **, int, const char *, int); \
+void name##_free_hash_table (hashtype **, const char *, int);
-#define HASH_FUNCTIONS(name, bufarg, type) \
-void name##_hash_add (struct hash_table *table, \
+#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref) \
+void name##_hash_add (hashtype *table, \
bufarg buf, unsigned len, type *ptr, \
const char *file, int line) \
{ \
- add_hash (table, \
+ add_hash ((struct hash_table *)table, \
(const unsigned char *)buf, \
len, (hashed_object_t *)ptr, file, line); \
} \
\
-void name##_hash_delete (struct hash_table *table, \
+void name##_hash_delete (hashtype *table, \
bufarg buf, unsigned len, const char *file, int line)\
{ \
- delete_hash_entry (table, (const unsigned char *)buf, \
+ delete_hash_entry ((struct hash_table *)table, \
+ (const unsigned char *)buf, \
len, file, line); \
} \
\
-int name##_hash_lookup (type **ptr, struct hash_table *table, \
+int name##_hash_lookup (type **ptr, hashtype *table, \
bufarg buf, unsigned len, const char *file, int line) \
{ \
- return hash_lookup ((hashed_object_t **)ptr, table, \
+ return hash_lookup ((hashed_object_t **)ptr, \
+ (struct hash_table *)table, \
(const unsigned char *)buf, len, file, line); \
} \
\
-int name##_hash_foreach (struct hash_table *table, \
+int name##_hash_foreach (hashtype *table, \
void (*func) (bufarg, unsigned, type *)) \
{ \
- return hash_foreach (table, (hash_foreach_func)func); \
+ return hash_foreach ((struct hash_table *)table, \
+ (hash_foreach_func)func); \
+} \
+ \
+int name##_new_hash (hashtype **tp, int c, const char *file, int line) \
+{ \
+ return new_hash ((struct hash_table **)tp, \
+ (hash_reference)ref, (hash_dereference)deref, c, \
+ file, line); \
+} \
+ \
+void name##_free_hash_table (hashtype **table, const char *file, int line) \
+{ \
+ free_hash_table ((struct hash_table **)table, file, line); \
}
-
void relinquish_hash_bucket_hunks (void);
-struct hash_table *new_hash_table (int, const char *, int);
-void free_hash_table (struct hash_table *, const char *, int);
+int new_hash_table (struct hash_table **, int, const char *, int);
+void free_hash_table (struct hash_table **, const char *, int);
struct hash_bucket *new_hash_bucket (const char *, int);
void free_hash_bucket (struct hash_bucket *, const char *, int);
-struct hash_table *new_hash (hash_reference, hash_dereference, int,
- const char *, int);
+int new_hash (struct hash_table **,
+ hash_reference, hash_dereference, int, const char *, int);
void add_hash (struct hash_table *,
const unsigned char *, unsigned, hashed_object_t *,
const char *, int);
diff --git a/includes/omapip/omapip.h b/includes/omapip/omapip.h
index 84359986..3c8f1567 100644
--- a/includes/omapip/omapip.h
+++ b/includes/omapip/omapip.h
@@ -3,39 +3,30 @@
Definitions for the object management API and protocol... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -125,6 +116,7 @@ typedef struct __omapi_object_type_t {
isc_result_t (*allocator) (omapi_object_t **, const char *, int);
isc_result_t (*sizer) (size_t);
size_t size;
+ int rc_flag;
isc_result_t (*initialize) (omapi_object_t *, const char *, int);
} omapi_object_type_t;
@@ -503,7 +495,8 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **,
const char *, int),
isc_result_t (*) (size_t), size_t,
isc_result_t (*) (omapi_object_t *,
- const char *, int));
+ const char *, int),
+ int);
isc_result_t omapi_signal (omapi_object_t *, const char *, ...);
isc_result_t omapi_signal_in (omapi_object_t *, const char *, ...);
isc_result_t omapi_set_value (omapi_object_t *, omapi_object_t *,
diff --git a/includes/omapip/omapip_p.h b/includes/omapip/omapip_p.h
index d64df0ec..d8adecd0 100644
--- a/includes/omapip/omapip_p.h
+++ b/includes/omapip/omapip_p.h
@@ -3,39 +3,30 @@
Private master include file for the OMAPI library. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/omapip/trace.h b/includes/omapip/trace.h
index 69cb3edb..d48c3700 100644
--- a/includes/omapip/trace.h
+++ b/includes/omapip/trace.h
@@ -3,39 +3,30 @@
Definitions for omapi tracing facility... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about the Internet Software Consortium, see http://www.isc.org/. To
+ * about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
diff --git a/includes/osdep.h b/includes/osdep.h
index c4486e85..5d1bc912 100644
--- a/includes/osdep.h
+++ b/includes/osdep.h
@@ -3,39 +3,30 @@
Operating system dependencies... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -142,6 +133,14 @@
# endif
#endif
+/* snprintf/vsnprintf hacks. for systems with no libc versions only. */
+#ifdef NO_SNPRINTF
+ extern int isc_print_snprintf(char *, size_t, const char *, ...);
+ extern int isc_print_vsnprintf(char *, size_t, const char *, va_list ap);
+# define snprintf isc_print_snprintf
+# define vsnprintf isc_print_vsnprintf
+#endif
+
/* Porting::
If you add a new network API, and have it set up so that it can be
@@ -276,6 +275,10 @@
# define HAVE_ARPHRD_IEEE802
#endif
+#if defined (ARPHRD_IEEE802_TR) && !defined (HAVE_ARPHRD_IEEE802_TR)
+# define HAVE_ARPHRD_IEEE802_TR
+#endif
+
#if defined (ARPHRD_FDDI) && !defined (HAVE_ARPHRD_FDDI)
# define HAVE_ARPHRD_FDDI
#endif
@@ -306,7 +309,11 @@
#endif
#if !defined (SOCKLEN_T)
-#define SOCKLEN_T socklen_t
+# define SOCKLEN_T socklen_t
+#endif
+
+#if !defined (STDERR_FILENO)
+# define STDERR_FILENO 2
#endif
#endif /* __ISC_DHCP_OSDEP_H__ */
diff --git a/includes/site.h b/includes/site.h
index d103ef09..b4d910a0 100644
--- a/includes/site.h
+++ b/includes/site.h
@@ -86,6 +86,11 @@
/* #define DEBUG_FAILOVER_TIMING */
+/* Define this if you want all leases written to the lease file, even if
+ they are free leases that have never been used. */
+
+/* #define DEBUG_DUMP_ALL_LEASES */
+
/* Define this if you want DHCP failover protocol support in the DHCP
server. */
diff --git a/includes/statement.h b/includes/statement.h
index fa865f38..44fe8a84 100644
--- a/includes/statement.h
+++ b/includes/statement.h
@@ -3,39 +3,30 @@
Definitions for executable statements... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/includes/tree.h b/includes/tree.h
index 30770be6..64f43977 100644
--- a/includes/tree.h
+++ b/includes/tree.h
@@ -3,39 +3,30 @@
Definitions for address trees... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -332,7 +323,7 @@ struct universe {
void (*store_tag) PROTO ((unsigned char *, u_int32_t));
void (*store_length) PROTO ((unsigned char *, u_int32_t));
int tag_size, length_size;
- struct hash_table *hash;
+ option_hash_t *hash;
struct option *options [256];
struct option *enc_opt;
int index;
diff --git a/minires/Makefile.dist b/minires/Makefile.dist
index b6bf0889..59dabf33 100644
--- a/minires/Makefile.dist
+++ b/minires/Makefile.dist
@@ -1,21 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-2000 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
CATMANPAGES = dhcpctl.cat3
SEDMANPAGES = dhcpctl.man3
diff --git a/minires/ns_date.c b/minires/ns_date.c
index f5ef8c4c..5f3cb6cb 100644
--- a/minires/ns_date.c
+++ b/minires/ns_date.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_date.c,v 1.2 2000/04/11 01:58:39 mellon Exp $";
+static const char rcsid[] = "$Id: ns_date.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $";
#endif
/* Import. */
diff --git a/minires/ns_name.c b/minires/ns_name.c
index e815d245..65788753 100644
--- a/minires/ns_name.c
+++ b/minires/ns_name.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1996,1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_name.c,v 1.1 2000/02/02 07:28:14 mellon Exp $";
+static const char rcsid[] = "$Id: ns_name.c,v 1.2 2005/03/17 20:15:17 dhankins Exp $";
#endif
#include <sys/types.h>
@@ -255,6 +261,10 @@ ns_name_ntol(const u_char *src, u_char *dst, size_t dstsiz) {
dn = dst;
eom = dst + dstsiz;
+ if (dn >= eom) {
+ errno = EMSGSIZE;
+ return (-1);
+ }
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */
diff --git a/minires/ns_parse.c b/minires/ns_parse.c
index 27b06a1a..2854092f 100644
--- a/minires/ns_parse.c
+++ b/minires/ns_parse.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1996,1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.2 2001/01/16 22:33:08 mellon Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $";
#endif
/* Import. */
@@ -38,8 +44,6 @@ static void setsection(ns_msg *msg, ns_sect sect);
/* Macros. */
-#define RETERR(err) do { errno = (err); return (-1); } while (0)
-
/* Public. */
/* These need to be in the same order as the nres.h:ns_flag enum. */
@@ -62,8 +66,9 @@ struct _ns_flagdata _ns_flagdata[16] = {
{ 0x0000, 0 }, /* expansion (6/6). */
};
-int
-ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
+isc_result_t
+ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count,
+ int *rc) {
const u_char *optr = ptr;
for ((void)NULL; count > 0; count--) {
@@ -71,11 +76,11 @@ ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
b = dn_skipname(ptr, eom);
if (b < 0)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
if (section != ns_s_qd) {
if (ptr + NS_INT32SZ + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
ptr += NS_INT32SZ/*TTL*/;
rdlength = getUShort(ptr);
ptr += 2;
@@ -83,11 +88,13 @@ ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
}
}
if (ptr > eom)
- RETERR(EMSGSIZE);
- return (ptr - optr);
+ return ISC_R_INCOMPLETE;
+ if (rc)
+ *rc = ptr - optr;
+ return ISC_R_SUCCESS;
}
-int
+isc_result_t
ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) {
const u_char *eom = msg + msglen;
int i;
@@ -96,16 +103,16 @@ ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) {
handle->_msg = msg;
handle->_eom = eom;
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_id = getUShort (msg);
msg += 2;
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_flags = getUShort (msg);
msg += 2;
for (i = 0; i < ns_s_max; i++) {
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_counts[i] = getUShort (msg);
msg += 2;
}
@@ -113,23 +120,26 @@ ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) {
if (handle->_counts[i] == 0)
handle->_sections[i] = NULL;
else {
- int b = ns_skiprr(msg, eom, (ns_sect)i,
- handle->_counts[i]);
+ int b;
+ isc_result_t status =
+ ns_skiprr(msg, eom, (ns_sect)i,
+ handle->_counts[i], &b);
- if (b < 0)
- return (-1);
+ if (status != ISC_R_SUCCESS)
+ return STATUS;
handle->_sections[i] = msg;
msg += b;
}
if (msg != eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
setsection(handle, ns_s_max);
- return (0);
+ return ISC_R_SUCCESS;
}
isc_result_t
ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
int b;
+ isc_result_t status;
/* Make section right. */
if (section < 0 || section >= ns_s_max)
@@ -141,15 +151,15 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
if (rrnum == -1)
rrnum = handle->_rrnum;
if (rrnum < 0 || rrnum >= handle->_counts[(int)section])
- RETERR(ENODEV);
+ return ISC_R_UNKNOWNATTRIBUTE;
if (rrnum < handle->_rrnum)
setsection(handle, section);
if (rrnum > handle->_rrnum) {
- b = ns_skiprr(handle->_ptr, handle->_eom, section,
- rrnum - handle->_rrnum);
+ status = ns_skiprr(handle->_ptr, handle->_eom, section,
+ rrnum - handle->_rrnum, &b);
- if (b < 0)
- return (-1);
+ if (status != ISC_R_SUCCESS)
+ return status;
handle->_ptr += b;
handle->_rrnum = rrnum;
}
@@ -158,10 +168,10 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
b = dn_expand(handle->_msg, handle->_eom,
handle->_ptr, rr->name, NS_MAXDNAME);
if (b < 0)
- return (-1);
+ return ISC_R_FORMERR;
handle->_ptr += b;
if (handle->_ptr + NS_INT16SZ + NS_INT16SZ > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->type = getUShort (handle->_ptr);
handle -> _ptr += 2;
rr->rr_class = getUShort (handle->_ptr);
@@ -172,13 +182,13 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
rr->rdata = NULL;
} else {
if (handle->_ptr + NS_INT32SZ + NS_INT16SZ > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->ttl = getULong (handle->_ptr);
handle -> _ptr += 4;
rr->rdlength = getUShort (handle->_ptr);
handle -> _ptr += 2;
if (handle->_ptr + rr->rdlength > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->rdata = handle->_ptr;
handle->_ptr += rr->rdlength;
}
diff --git a/minires/ns_samedomain.c b/minires/ns_samedomain.c
index ac17a523..bdc6ccad 100644
--- a/minires/ns_samedomain.c
+++ b/minires/ns_samedomain.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1995,1999 by Internet Software Consortium.
+ * Copyright (c) 2004 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
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_samedomain.c,v 1.3 2001/01/16 22:33:09 mellon Exp $";
+static const char rcsid[] = "$Id: ns_samedomain.c,v 1.4 2005/03/17 20:15:18 dhankins Exp $";
#endif
#include <sys/types.h>
@@ -168,7 +174,7 @@ ns_makecanon(const char *src, char *dst, size_t dstsize) {
size_t n = strlen(src);
if (n + sizeof "." > dstsize) {
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
}
strcpy(dst, src);
while (n > 0 && dst[n - 1] == '.') /* Ends in "." */
diff --git a/minires/ns_sign.c b/minires/ns_sign.c
index 1137302a..7ce9999a 100644
--- a/minires/ns_sign.c
+++ b/minires/ns_sign.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1999-2001 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_sign.c,v 1.5 2001/06/27 00:30:32 mellon Exp $";
+static const char rcsid[] = "$Id: ns_sign.c,v 1.6 2005/03/17 20:15:18 dhankins Exp $";
#endif
#if defined (TRACING)
@@ -87,7 +93,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
dst_init();
if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL)
- ISC_R_INVALIDARG;
+ return ISC_R_INVALIDARG;
/* Name. */
if (key != NULL && error != ns_r_badsig && error != ns_r_badkey)
@@ -118,7 +124,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
else
n = dn_comp("", cp, (unsigned)(eob - cp), NULL, NULL);
if (n < 0)
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
alg = cp;
cp += n;
@@ -190,7 +196,7 @@ ns_sign(u_char *msg, unsigned *msglen, unsigned msgsize, int error, void *k,
n = dst_sign_data(SIG_MODE_FINAL, key, &ctx, NULL, 0,
sig, *siglen);
if (n < 0)
- ISC_R_BADKEY;
+ return ISC_R_BADKEY;
*siglen = n;
} else
*siglen = 0;
diff --git a/minires/ns_verify.c b/minires/ns_verify.c
index 4ebca7cf..7cf8a5f0 100644
--- a/minires/ns_verify.c
+++ b/minires/ns_verify.c
@@ -1,22 +1,28 @@
/*
- * Copyright (c) 1999-2001 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_verify.c,v 1.6 2001/06/27 00:30:33 mellon Exp $";
+static const char rcsid[] = "$Id: ns_verify.c,v 1.7 2005/03/17 20:15:18 dhankins Exp $";
#endif
#define time(x) trace_mr_time (x)
@@ -60,6 +66,7 @@ ns_find_tsig(u_char *msg, u_char *eom) {
HEADER *hp = (HEADER *)msg;
int n, type;
u_char *cp = msg, *start;
+ isc_result_t status;
if (msg == NULL || eom == NULL || msg > eom)
return (NULL);
@@ -72,23 +79,23 @@ ns_find_tsig(u_char *msg, u_char *eom) {
cp += HFIXEDSZ;
- n = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1);
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1, &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
diff --git a/minires/res_comp.c b/minires/res_comp.c
index 4ca538e5..bbe2f0e6 100644
--- a/minires/res_comp.c
+++ b/minires/res_comp.c
@@ -52,25 +52,31 @@
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_comp.c,v 1.2 2000/02/02 19:59:16 mellon Exp $";
+static const char rcsid[] = "$Id: res_comp.c,v 1.3 2005/03/17 20:15:18 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
diff --git a/minires/res_findzonecut.c b/minires/res_findzonecut.c
index 35d47d87..63a876e7 100644
--- a/minires/res_findzonecut.c
+++ b/minires/res_findzonecut.c
@@ -1,22 +1,28 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.15 2001/06/27 00:30:34 mellon Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.16 2005/03/17 20:15:18 dhankins Exp $";
#endif /* not lint */
/*
- * Copyright (c) 1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/* Import. */
@@ -355,7 +361,7 @@ get_soa(res_state statp, const char *dname, ns_class class,
while (*dname != '.') {
if (*dname == '\\')
if (*++dname == '\0') {
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
}
dname++;
}
diff --git a/minires/res_init.c b/minires/res_init.c
index cfdbb596..e8170eab 100644
--- a/minires/res_init.c
+++ b/minires/res_init.c
@@ -52,25 +52,31 @@
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.5 2001/06/27 00:30:35 mellon Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.6 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
diff --git a/minires/res_mkquery.c b/minires/res_mkquery.c
index 88fe7e6a..f24e9f9a 100644
--- a/minires/res_mkquery.c
+++ b/minires/res_mkquery.c
@@ -52,25 +52,31 @@
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_mkquery.c,v 1.4 2001/01/16 22:33:14 mellon Exp $";
+static const char rcsid[] = "$Id: res_mkquery.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c
index 5520a83b..c7395863 100644
--- a/minires/res_mkupdate.c
+++ b/minires/res_mkupdate.c
@@ -1,18 +1,24 @@
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
@@ -21,7 +27,7 @@
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.7 2001/01/11 02:16:24 mellon Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -52,6 +58,7 @@ static int gethexnum_str(const u_char **, const u_char *);
static int getword_str(char *, int,
const unsigned char **,
const unsigned char *);
+static int getphrase_str(char *, int, const u_char **, const u_char *);
static int getstr_str(char *, int, const u_char **, const u_char *);
struct valuelist {
@@ -101,7 +108,8 @@ res_nmkupdate(res_state statp,
u_int16_t rtype, rclass;
u_int32_t n1, rttl;
u_char *dnptrs[20], **dpp, **lastdnptr;
- unsigned siglen, keylen, certlen;
+ unsigned siglen, certlen;
+ int keylen;
unsigned buflen = *blp;
u_char *buf = (unsigned char *)bp;
@@ -234,7 +242,7 @@ res_nmkupdate(res_state statp,
case T_MR:
case T_NS:
case T_PTR:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
+ if (!getphrase_str(buf2, sizeof buf2, &startp, endp))
return (-1);
n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
if (n < 0)
@@ -549,36 +557,6 @@ res_nmkupdate(res_state statp,
cp += siglen;
break;
}
- case ns_t_key:
- /* flags */
- n = gethexnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(INT16SZ);
- PUTSHORT(n, cp);
- /* proto */
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(1);
- *cp++ = n;
- /* alg */
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(1);
- *cp++ = n;
- /* key */
- if ((n = getword_str(buf2, sizeof buf2,
- &startp, endp)) < 0)
- return (-1);
- keylen = b64_pton(buf2, buf3, sizeof(buf3));
- if (keylen < 0)
- return (-1);
- ShrinkBuffer(keylen);
- memcpy(cp, buf3, keylen);
- cp += keylen;
- break;
case ns_t_nxt:
{
int success, nxt_type;
@@ -613,6 +591,38 @@ res_nmkupdate(res_state statp,
cp += n;
break;
}
+#endif
+#if 1
+ case ns_t_key:
+ /* flags */
+ n = gethexnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(INT16SZ);
+ PUTSHORT(n, cp);
+ /* proto */
+ n = getnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(1);
+ *cp++ = n;
+ /* alg */
+ n = getnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(1);
+ *cp++ = n;
+ /* key */
+ if ((n = getword_str(buf2, sizeof buf2,
+ &startp, endp)) < 0)
+ return (-1);
+ keylen = b64_pton(buf2, buf3, sizeof(buf3));
+ if (keylen < 0)
+ return (-1);
+ ShrinkBuffer(keylen);
+ memcpy(cp, buf3, keylen);
+ cp += keylen;
+ break;
case ns_t_cert:
/* type */
n = getnum_str(&startp, endp);
@@ -645,6 +655,8 @@ res_nmkupdate(res_state statp,
break;
#endif
default:
+ fprintf(stderr, "NSupdate of RR type: %d not implemented\n",
+ rrecp->r_type);
return (-1);
} /*switch*/
n = (u_int16_t)((cp - sp2) - INT16SZ);
@@ -689,6 +701,35 @@ getword_str(char *buf, int size, const u_char **startpp, const u_char *endp) {
}
/*
+ * Get a phrase - possibly containing blanks - from a string (not file)
+ * into buf. modify the start pointer to point after the
+ * phrase in the string.
+ */
+static int
+getphrase_str(char *buf, int size, const u_char **startpp, const u_char *endp) {
+ char *cp;
+ int c;
+
+ for (cp = buf; *startpp <= endp; ) {
+ c = **startpp;
+ if (isspace(c) && cp == buf ) {
+ /* leading whitespace */
+ (*startpp)++;
+ continue;
+ }
+ else if ( c == '\0' ) {
+ break;
+ }
+ (*startpp)++;
+ if (cp >= buf+size-1)
+ break;
+ *cp++ = (u_char)c;
+ }
+ *cp = '\0';
+ return (cp != buf);
+}
+
+/*
* get a white spae delimited string from memory. Process quoted strings
* and \DDD escapes. Return length or -1 on error. Returned string may
* contain nulls.
diff --git a/minires/res_query.c b/minires/res_query.c
index 412da65a..0c28f75b 100644
--- a/minires/res_query.c
+++ b/minires/res_query.c
@@ -52,25 +52,31 @@
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.4 2001/01/16 22:33:15 mellon Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
diff --git a/minires/res_send.c b/minires/res_send.c
index 79946a4f..31641e5e 100644
--- a/minires/res_send.c
+++ b/minires/res_send.c
@@ -52,25 +52,31 @@
*/
/*
- * Portions Copyright (c) 1996-2001 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.7 2001/02/22 07:28:25 mellon Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
/* Rename the I/O functions in case we're tracing. */
@@ -600,7 +606,7 @@ res_nsend(res_state statp,
(unsigned)len);
}
Dprint(statp->options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
+ (stdout, ";; new DG socket\n"));
#endif /* CAN_RECONNECT */
statp->_flags &= ~RES_F_CONN;
errno = 0;
diff --git a/minires/res_sendsigned.c b/minires/res_sendsigned.c
index be213afe..24045421 100644
--- a/minires/res_sendsigned.c
+++ b/minires/res_sendsigned.c
@@ -1,3 +1,26 @@
+/*
+ * Copyright (c) 2004 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
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
+ */
+
#include <sys/types.h>
#include <sys/param.h>
diff --git a/minires/res_update.c b/minires/res_update.c
index 4e2a8ec1..b16da1d5 100644
--- a/minires/res_update.c
+++ b/minires/res_update.c
@@ -1,22 +1,28 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_update.c,v 1.12 2001/06/27 00:30:38 mellon Exp $";
+static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/03/17 20:15:20 dhankins Exp $";
#endif /* not lint */
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*/
/*
diff --git a/omapip/Makefile.dist b/omapip/Makefile.dist
index 099f83e1..5fa5bcd1 100644
--- a/omapip/Makefile.dist
+++ b/omapip/Makefile.dist
@@ -1,20 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-2001 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
#
CATMANPAGES = omapi.cat3
@@ -22,12 +27,13 @@ SEDMANPAGES = omapi.man3
SRC = 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
+ toisc.c iscprint.c
OBJ = protocol.o buffer.o alloc.o result.o connection.o errwarn.o \
listener.o dispatch.o generic.o support.o handle.o message.o \
convert.o hash.o auth.o inet_addr.o array.o trace.o mrtrace.o \
- toisc.o
+ toisc.o iscprint.o
+# XXX: iscprint.o above is a kludge.
MAN = omapi.3
diff --git a/omapip/alloc.c b/omapip/alloc.c
index 42161ca2..46c0bc38 100644
--- a/omapip/alloc.c
+++ b/omapip/alloc.c
@@ -4,39 +4,30 @@
protocol... */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -128,7 +119,7 @@ VOIDPTR dmalloc (size, file, line)
#endif
#endif
#ifdef DEBUG_REFCNT_DMALLOC_FREE
- rc_register (file, line, 0, foo + DMDOFFSET, 1, 0);
+ rc_register (file, line, 0, foo + DMDOFFSET, 1, 0, RC_MALLOC);
#endif
return bar;
}
@@ -192,7 +183,8 @@ void dfree (ptr, file, line)
}
#endif
#ifdef DEBUG_REFCNT_DMALLOC_FREE
- rc_register (file, line, 0, (unsigned char *)ptr + DMDOFFSET, 0, 1);
+ rc_register (file, line,
+ 0, (unsigned char *)ptr + DMDOFFSET, 0, 1, RC_MALLOC);
#endif
free (ptr);
}
@@ -421,7 +413,7 @@ void rc_history_next (int d)
rc_history_index = 0;
++rc_history_count;
}
-#endif
+#endif /* DEBUG_RC_HISTORY */
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
@@ -520,8 +512,11 @@ isc_result_t omapi_object_allocate (omapi_object_t **o,
foo = (omapi_object_t *)0;
status = (*type -> allocator) (&foo, file, line);
tsize = type -> size;
- } else
+ } else {
status = ISC_R_NOMEMORY;
+ tsize = 0;
+ }
+
if (status == ISC_R_NOMEMORY) {
if (type -> sizer)
tsize = (*type -> sizer) (size);
@@ -578,7 +573,7 @@ isc_result_t omapi_object_reference (omapi_object_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, h -> type -> rc_flag);
return ISC_R_SUCCESS;
}
@@ -684,7 +679,8 @@ isc_result_t omapi_object_dereference (omapi_object_t **h,
omapi_object_dereference
(&hp -> outer, file, line);
/* if (!hp -> type -> freer) */
- rc_register (file, line, h, hp, 0, 1);
+ rc_register (file, line, h, hp,
+ 0, 1, hp -> type -> rc_flag);
if (hp -> type -> destroy)
(*(hp -> type -> destroy)) (hp, file, line);
if (hp -> type -> freer)
@@ -695,12 +691,14 @@ isc_result_t omapi_object_dereference (omapi_object_t **h,
(*h) -> refcnt--;
/* if (!(*h) -> type -> freer) */
rc_register (file, line,
- h, *h, (*h) -> refcnt, 1);
+ h, *h, (*h) -> refcnt, 1,
+ (*h) -> type -> rc_flag);
}
} else {
(*h) -> refcnt--;
/* if (!(*h) -> type -> freer) */
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1,
+ (*h) -> type -> rc_flag);
}
*h = 0;
return ISC_R_SUCCESS;
@@ -741,7 +739,7 @@ isc_result_t omapi_buffer_reference (omapi_buffer_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
@@ -775,7 +773,7 @@ isc_result_t omapi_buffer_dereference (omapi_buffer_t **h,
}
--(*h) -> refcnt;
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt == 0)
dfree (*h, file, line);
*h = 0;
@@ -789,11 +787,11 @@ isc_result_t omapi_typed_data_new (const char *file, int line,
va_list l;
omapi_typed_data_t *new;
unsigned len;
- unsigned val;
- int intval;
- char *s;
+ unsigned val = 0;
+ int intval = 0;
+ char *s = NULL;
isc_result_t status;
- omapi_object_t *obj;
+ omapi_object_t *obj = NULL;
va_start (l, type);
@@ -816,8 +814,10 @@ isc_result_t omapi_typed_data_new (const char *file, int line,
obj = va_arg (l, omapi_object_t *);
break;
default:
+ va_end (l);
return ISC_R_INVALIDARG;
}
+ va_end (l);
new = dmalloc (len, file, line);
if (!new)
@@ -866,7 +866,7 @@ isc_result_t omapi_typed_data_reference (omapi_typed_data_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
@@ -900,7 +900,7 @@ isc_result_t omapi_typed_data_dereference (omapi_typed_data_t **h,
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
switch ((*h) -> type) {
case omapi_datatype_int:
@@ -949,7 +949,7 @@ isc_result_t omapi_data_string_reference (omapi_data_string_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
@@ -983,7 +983,7 @@ isc_result_t omapi_data_string_dereference (omapi_data_string_t **h,
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
dfree (*h, file, line);
}
@@ -1021,7 +1021,7 @@ isc_result_t omapi_value_reference (omapi_value_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
@@ -1055,7 +1055,7 @@ isc_result_t omapi_value_dereference (omapi_value_t **h,
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt == 0) {
if ((*h) -> name)
omapi_data_string_dereference (&(*h) -> name,
@@ -1103,7 +1103,7 @@ isc_result_t omapi_addr_list_reference (omapi_addr_list_t **r,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
@@ -1137,7 +1137,7 @@ isc_result_t omapi_addr_list_dereference (omapi_addr_list_t **h,
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
dfree (*h, file, line);
}
diff --git a/omapip/array.c b/omapip/array.c
index 56d8d9f2..ac92afc1 100644
--- a/omapip/array.c
+++ b/omapip/array.c
@@ -3,39 +3,30 @@
Subroutines that support the omapi extensible array type. */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/omapip/auth.c b/omapip/auth.c
index 1ad4150f..48a7089d 100644
--- a/omapip/auth.c
+++ b/omapip/auth.c
@@ -3,39 +3,30 @@
Subroutines having to do with authentication. */
/*
- * Copyright (c) 1998-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,15 +34,19 @@
#ifndef lint
static char ocopyright[] =
-"$Id: auth.c,v 1.4 2001/06/27 00:30:42 mellon Exp $ Copyright 1998-2000 The Internet Software Consortium.";
+"$Id: auth.c,v 1.5 2005/03/17 20:15:20 dhankins Exp $ Copyright 2004 Internet Systems Consortium.";
#endif
#include <omapip/omapip_p.h>
OMAPI_OBJECT_ALLOC (omapi_auth_key, omapi_auth_key_t, omapi_type_auth_key)
-
-struct hash_table *auth_key_hash = (struct hash_table *)0;
-HASH_FUNCTIONS_DECL (omapi_auth_key, const char *, omapi_auth_key_t)
+typedef struct hash omapi_auth_hash_t;
+HASH_FUNCTIONS_DECL (omapi_auth_key, const char *,
+ omapi_auth_key_t, omapi_auth_hash_t)
+omapi_auth_hash_t *auth_key_hash;
+HASH_FUNCTIONS (omapi_auth_key, const char *, omapi_auth_key_t,
+ omapi_auth_hash_t,
+ omapi_auth_key_reference, omapi_auth_key_dereference)
isc_result_t omapi_auth_key_new (omapi_auth_key_t **o, const char *file,
int line)
@@ -102,11 +97,7 @@ isc_result_t omapi_auth_key_enter (omapi_auth_key_t *a)
omapi_auth_key_dereference (&tk, MDL);
}
} else {
- auth_key_hash =
- new_hash ((hash_reference)omapi_auth_key_reference,
- (hash_dereference)omapi_auth_key_dereference,
- 1, MDL);
- if (!auth_key_hash)
+ if (!omapi_auth_key_new_hash (&auth_key_hash, 1, MDL))
return ISC_R_NOMEMORY;
}
omapi_auth_key_hash_add (auth_key_hash, a -> name, 0, a, MDL);
@@ -271,5 +262,3 @@ isc_result_t omapi_auth_key_get_value (omapi_object_t *h,
return ISC_R_SUCCESS;
}
-
-HASH_FUNCTIONS (omapi_auth_key, const char *, omapi_auth_key_t)
diff --git a/omapip/buffer.c b/omapip/buffer.c
index 3d01357f..74f53dae 100644
--- a/omapip/buffer.c
+++ b/omapip/buffer.c
@@ -3,39 +3,30 @@
Buffer access functions for the object management protocol... */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/omapip/connection.c b/omapip/connection.c
index 77ce113d..598fb86e 100644
--- a/omapip/connection.c
+++ b/omapip/connection.c
@@ -3,39 +3,30 @@
Subroutines for dealing with connections. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -717,8 +708,8 @@ static isc_result_t make_dst_key (DST_KEY **dst_key, omapi_object_t *a) {
omapi_value_t *name = (omapi_value_t *)0;
omapi_value_t *algorithm = (omapi_value_t *)0;
omapi_value_t *key = (omapi_value_t *)0;
- int algorithm_id;
- char *name_str;
+ int algorithm_id = UNKNOWN_KEYALG;
+ char *name_str = NULL;
isc_result_t status = ISC_R_SUCCESS;
if (status == ISC_R_SUCCESS)
diff --git a/omapip/convert.c b/omapip/convert.c
index 83d5fc3b..99ff3d25 100644
--- a/omapip/convert.c
+++ b/omapip/convert.c
@@ -4,39 +4,30 @@
can't be assumed to be aligned. */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
-"$Id: convert.c,v 1.1 2000/08/01 22:34:36 neild Exp $ Copyright (c) 1996-1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: convert.c,v 1.2 2005/03/17 20:15:21 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
@@ -52,7 +43,7 @@ static char copyright[] =
u_int32_t getULong (buf)
const unsigned char *buf;
{
- unsigned long ibuf;
+ u_int32_t ibuf;
memcpy (&ibuf, buf, sizeof (u_int32_t));
return ntohl (ibuf);
@@ -61,7 +52,7 @@ u_int32_t getULong (buf)
int32_t getLong (buf)
const unsigned char *buf;
{
- long ibuf;
+ int32_t ibuf;
memcpy (&ibuf, buf, sizeof (int32_t));
return ntohl (ibuf);
@@ -149,6 +140,8 @@ int converted_length (buf, base, width)
number = getUShort (buf);
else if (width == 4)
number = getULong (buf);
+ else
+ return 0;
do {
column = newcolumn;
@@ -183,6 +176,8 @@ int binary_to_ascii (outbuf, inbuf, base, width)
number = getUShort (inbuf);
else if (width == 4)
number = getULong (inbuf);
+ else
+ return 0;
for (i = power - 1 ; i >= 0; i--) {
outbuf [i] = h2a [number % base];
diff --git a/omapip/dispatch.c b/omapip/dispatch.c
index 02bab7cc..b6c667eb 100644
--- a/omapip/dispatch.c
+++ b/omapip/dispatch.c
@@ -3,39 +3,30 @@
I/O dispatcher. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -44,7 +35,7 @@
#include <omapip/omapip_p.h>
static omapi_io_object_t omapi_io_states;
-u_int32_t cur_time;
+TIME cur_time;
OMAPI_OBJECT_ALLOC (omapi_io,
omapi_io_object_t, omapi_type_io_object)
@@ -220,7 +211,6 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
int desc;
struct timeval now, to;
omapi_io_object_t *io, *prev;
- isc_result_t status;
omapi_waiter_object_t *waiter;
omapi_object_t *tmp = (omapi_object_t *)0;
@@ -363,7 +353,7 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
if (len)
omapi_value_dereference (&ov, MDL);
}
- status = (*(io -> reaper)) (io -> inner);
+ (*(io -> reaper)) (io -> inner);
if (prev) {
omapi_io_dereference (&prev -> next, MDL);
if (io -> next)
@@ -415,8 +405,7 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
if (io -> readfd &&
(desc = (*(io -> readfd)) (tmp)) >= 0) {
if (FD_ISSET (desc, &r))
- status = ((*(io -> reader)) (tmp));
- /* XXX what to do with status? */
+ ((*(io -> reader)) (tmp));
}
/* Same deal for write descriptors. */
@@ -424,8 +413,7 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
(desc = (*(io -> writefd)) (tmp)) >= 0)
{
if (FD_ISSET (desc, &w))
- status = ((*(io -> writer)) (tmp));
- /* XXX what to do with status? */
+ ((*(io -> writer)) (tmp));
}
omapi_object_dereference (&tmp, MDL);
}
@@ -435,9 +423,9 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
prev = (omapi_io_object_t *)0;
for (io = omapi_io_states.next; io; io = io -> next) {
if (io -> reaper) {
- if (io -> inner)
- status = (*(io -> reaper)) (io -> inner);
- if (!io -> inner || status != ISC_R_SUCCESS) {
+ if (!io -> inner ||
+ ((*(io -> reaper)) (io -> inner) !=
+ ISC_R_SUCCESS)) {
omapi_io_object_t *tmp =
(omapi_io_object_t *)0;
/* Save a reference to the next
@@ -503,27 +491,44 @@ isc_result_t omapi_io_get_value (omapi_object_t *h,
return ISC_R_NOTFOUND;
}
+/* omapi_io_destroy (object, MDL);
+ *
+ * Find the requsted IO [object] and remove it from the list of io
+ * states, causing the cleanup functions to destroy it. Note that we must
+ * hold a reference on the object while moving its ->next reference and
+ * removing the reference in the chain to the target object...otherwise it
+ * may be cleaned up from under us.
+ */
isc_result_t omapi_io_destroy (omapi_object_t *h, const char *file, int line)
{
- omapi_io_object_t *obj, *p, *last;
+ omapi_io_object_t *obj = NULL, *p, *last = NULL, **holder;
if (h -> type != omapi_type_io_object)
return ISC_R_INVALIDARG;
- obj = (omapi_io_object_t *)h;
-
/* remove from the list of I/O states */
for (p = omapi_io_states.next; p; p = p -> next) {
- if (p == obj) {
- omapi_io_dereference (&last -> next, MDL);
- omapi_io_reference (&last -> next, p -> next, MDL);
- omapi_io_dereference (&p, MDL);
- break;
+ if (p == (omapi_io_object_t *)h) {
+ omapi_io_reference (&obj, p, MDL);
+
+ if (last)
+ holder = &last -> next;
+ else
+ holder = &omapi_io_states.next;
+
+ omapi_io_dereference (holder, MDL);
+
+ if (obj -> next) {
+ omapi_io_reference (holder, obj -> next, MDL);
+ omapi_io_dereference (&obj -> next, MDL);
+ }
+
+ return omapi_io_dereference (&obj, MDL);
}
last = p;
}
-
- return ISC_R_SUCCESS;
+
+ return ISC_R_NOTFOUND;
}
isc_result_t omapi_io_signal_handler (omapi_object_t *h,
diff --git a/omapip/errwarn.c b/omapip/errwarn.c
index 6dc6dd96..06762fce 100644
--- a/omapip/errwarn.c
+++ b/omapip/errwarn.c
@@ -4,45 +4,36 @@
/*
* Copyright (c) 1995 RadioMail Corporation.
- * Copyright (c) 1996-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
* This software was written for RadioMail Corporation by Ted Lemon
* under a contract with Vixie Enterprises. Further modifications have
- * been made for the Internet Software Consortium under a contract
+ * been made for Internet Systems Consortium under a contract
* with Vixie Laboratories.
*/
#ifndef lint
static char copyright[] =
-"$Id: errwarn.c,v 1.9 2000/09/29 20:01:49 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: errwarn.c,v 1.10 2005/03/17 20:15:21 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
@@ -68,6 +59,9 @@ void log_fatal (const char * fmt, ... )
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -78,8 +72,8 @@ void log_fatal (const char * fmt, ... )
/* Also log it to stderr? */
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
#if !defined (NOMINUM)
@@ -114,6 +108,9 @@ int log_error (const char * fmt, ...)
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -123,8 +120,8 @@ int log_error (const char * fmt, ...)
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
@@ -138,6 +135,9 @@ int log_info (const char *fmt, ...)
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -147,8 +147,8 @@ int log_info (const char *fmt, ...)
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
@@ -162,6 +162,9 @@ int log_debug (const char *fmt, ...)
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
@@ -171,8 +174,8 @@ int log_debug (const char *fmt, ...)
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
diff --git a/omapip/generic.c b/omapip/generic.c
index 6154bcf6..8b9446f9 100644
--- a/omapip/generic.c
+++ b/omapip/generic.c
@@ -3,39 +3,30 @@
Subroutines that support the generic object. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -189,6 +180,8 @@ isc_result_t omapi_generic_get_value (omapi_object_t *h,
/* Look up the specified name in our list of objects. */
for (i = 0; i < g -> nvalues; i++) {
+ if (!g -> values[i])
+ continue;
if (!omapi_data_string_cmp (name, g -> values [i] -> name)) {
/* If this is a name/null value pair, this is the
same as if there were no value that matched
diff --git a/omapip/handle.c b/omapip/handle.c
index 3b99ec7c..cffa4d60 100644
--- a/omapip/handle.c
+++ b/omapip/handle.c
@@ -3,39 +3,30 @@
Functions for maintaining handles on objects. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/omapip/hash.c b/omapip/hash.c
index da7b25e8..3031ad9a 100644
--- a/omapip/hash.c
+++ b/omapip/hash.c
@@ -3,39 +3,30 @@
Routines for manipulating hash tables... */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: hash.c,v 1.4 2001/08/10 10:50:22 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: hash.c,v 1.5 2005/03/17 20:15:22 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
@@ -52,28 +43,47 @@ static char copyright[] =
static int do_hash (const unsigned char *, unsigned, unsigned);
static int do_case_hash (const unsigned char *, unsigned, unsigned);
-struct hash_table *new_hash_table (count, file, line)
+int new_hash_table (tp, count, file, line)
+ struct hash_table **tp;
int count;
const char *file;
int line;
{
- struct hash_table *rval = dmalloc (sizeof (struct hash_table)
- - (DEFAULT_HASH_SIZE
- * sizeof (struct hash_bucket *))
- + (count
- * sizeof (struct hash_bucket *)),
- file, line);
+ struct hash_table *rval;
+
+ if (!tp) {
+ log_error ("%s(%d): new_hash_table called with null pointer.",
+ file, line);
+#if defined (POINTER_DEBUG)
+ abort ();
+#endif
+ return 0;
+ }
+ if (*tp) {
+ log_error ("%s(%d): non-null target for new_hash_table.",
+ file, line);
+#if defined (POINTER_DEBUG)
+ abort ();
+#endif
+ }
+ rval = dmalloc (sizeof (struct hash_table) -
+ (DEFAULT_HASH_SIZE * sizeof (struct hash_bucket *)) +
+ (count * sizeof (struct hash_bucket *)), file, line);
+ if (!rval)
+ return 0;
rval -> hash_count = count;
- return rval;
+ *tp = rval;
+ return 1;
}
-void free_hash_table (ptr, file, line)
- struct hash_table *ptr;
+void free_hash_table (tp, file, line)
+ struct hash_table **tp;
const char *file;
int line;
{
int i;
struct hash_bucket *hbc, *hbn = (struct hash_bucket *)0;
+ struct hash_table *ptr = *tp;
#if defined (DEBUG_MEMORY_LEAKAGE) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
@@ -92,6 +102,7 @@ void free_hash_table (ptr, file, line)
#endif
dfree ((VOIDPTR)ptr, MDL);
+ *tp = (struct hash_table *)0;
}
struct hash_bucket *free_hash_buckets;
@@ -177,25 +188,25 @@ void free_hash_bucket (ptr, file, line)
free_hash_buckets = ptr;
}
-struct hash_table *new_hash (hash_reference referencer,
- hash_dereference dereferencer,
- int casep, const char *file, int line)
+int new_hash (struct hash_table **rp,
+ hash_reference referencer,
+ hash_dereference dereferencer,
+ int casep, const char *file, int line)
{
- struct hash_table *rv = new_hash_table (DEFAULT_HASH_SIZE, file, line);
- if (!rv)
- return rv;
- memset (&rv -> buckets [0], 0,
+ if (!new_hash_table (rp, DEFAULT_HASH_SIZE, file, line))
+ return 0;
+ memset (&(*rp) -> buckets [0], 0,
DEFAULT_HASH_SIZE * sizeof (struct hash_bucket *));
- rv -> referencer = referencer;
- rv -> dereferencer = dereferencer;
+ (*rp) -> referencer = referencer;
+ (*rp) -> dereferencer = dereferencer;
if (casep) {
- rv -> cmp = casecmp;
- rv -> do_hash = do_case_hash;
+ (*rp) -> cmp = casecmp;
+ (*rp) -> do_hash = do_case_hash;
} else {
- rv -> cmp = (hash_comparator_t)memcmp;
- rv -> do_hash = do_hash;
+ (*rp) -> cmp = (hash_comparator_t)memcmp;
+ (*rp) -> do_hash = do_hash;
}
- return rv;
+ return 1;
}
static int do_case_hash (name, len, size)
diff --git a/omapip/listener.c b/omapip/listener.c
index 9953a912..973f7d18 100644
--- a/omapip/listener.c
+++ b/omapip/listener.c
@@ -3,39 +3,30 @@
Subroutines that support the generic listener object. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/omapip/message.c b/omapip/message.c
index ffdae854..53fac626 100644
--- a/omapip/message.c
+++ b/omapip/message.c
@@ -3,39 +3,30 @@
Subroutines for dealing with message objects. */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -327,6 +318,7 @@ isc_result_t omapi_message_unregister (omapi_object_t *mo)
omapi_object_reference ((omapi_object_t **)&n,
(omapi_object_t *)m -> next, MDL);
omapi_object_dereference ((omapi_object_t **)&m -> next, MDL);
+ omapi_object_dereference ((omapi_object_t **)&n -> prev, MDL);
}
if (m -> prev) {
omapi_message_object_t *tmp = (omapi_message_object_t *)0;
@@ -660,7 +652,8 @@ omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
case OMAPI_OP_UPDATE:
if (m && m -> object) {
- omapi_object_reference (&object, m -> object, MDL);
+ status = omapi_object_reference (&object, m -> object,
+ MDL);
} else {
status = omapi_handle_lookup (&object, message -> h);
if (status != ISC_R_SUCCESS) {
@@ -707,10 +700,15 @@ omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
status = omapi_protocol_send_status
(po, message -> id_object, ISC_R_SUCCESS,
message -> id, (char *)0);
- if (m)
+ if (m) {
omapi_signal ((omapi_object_t *)m,
"status", ISC_R_SUCCESS,
(omapi_typed_data_t *)0);
+ omapi_message_unregister ((omapi_object_t *)m);
+ }
+
+ omapi_object_dereference (&object, MDL);
+
return status;
case OMAPI_OP_NOTIFY:
@@ -740,6 +738,9 @@ omapi_message_process_internal (omapi_object_t *mo, omapi_object_t *po)
omapi_signal ((omapi_object_t *)m, "status", waitstatus, tv);
if (status == ISC_R_SUCCESS)
omapi_value_dereference (&tv, MDL);
+
+ omapi_message_unregister((omapi_object_t *)m);
+
return ISC_R_SUCCESS;
case OMAPI_OP_DELETE:
diff --git a/omapip/mrtrace.c b/omapip/mrtrace.c
index c3539900..8bea3d6d 100644
--- a/omapip/mrtrace.c
+++ b/omapip/mrtrace.c
@@ -3,39 +3,30 @@
Subroutines that support minires tracing... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about the Internet Software Consortium, see http://www.isc.org/. To
+ * about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
@@ -70,7 +61,7 @@ time_t trace_mr_time (time_t *);
int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
unsigned int trace_mr_res_randomid (unsigned int);
-extern time_t cur_time;
+extern TIME cur_time;
#if defined (TRACING)
void trace_mr_init ()
@@ -190,7 +181,7 @@ ssize_t trace_mr_send (int fd, void *msg, size_t len, int flags)
iov [1].buf = (char *)&flags;
iov [2].len = len;
iov [2].buf = msg;
- trace_write_packet_iov (trace_mr_output, 2, iov, MDL);
+ trace_write_packet_iov (trace_mr_output, 3, iov, MDL);
}
#endif
return rv;
diff --git a/omapip/omapi.3 b/omapip/omapi.3
index 112621df..d4d4ee1b 100644
--- a/omapip/omapi.3
+++ b/omapip/omapi.3
@@ -1,36 +1,29 @@
.\" omapi.3
.\"
-.\" Copyright (c) 2000-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2000-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@@ -226,8 +219,9 @@ the connection the user must call dhcpctl_new_authenticator.
strlen(secret) + 1);
.fi
.PP
-The keyname, algorithm and secret must all match what is specified in
-the server's dhcpd.conf file:
+The keyname, algorithm and must all match what is specified in the server's
+dhcpd.conf file, excepting that the secret should appear in 'raw' form, not
+in base64 as it would in dhcpd.conf:
.PP
.nf
key "a-key-name" {
@@ -237,7 +231,7 @@ the server's dhcpd.conf file:
# Set the omapi-key value to use
# authenticated connections
- omapi-key "a-key-name";
+ omapi-key a-key-name;
.fi
.PP
The authenticator handle that is created by the call to
diff --git a/omapip/protocol.c b/omapip/protocol.c
index 6237f2a7..a9d76f75 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -3,39 +3,30 @@
Functions supporting the object management protocol... */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -362,8 +353,8 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
u_int32_t vlen;
u_int32_t th;
#if defined (DEBUG_MEMORY_LEAKAGE)
- unsigned long previous_outstanding = 0xBEADCAFE;
- unsigned long connect_outstanding = 0xBEADCAFE;
+ unsigned long previous_outstanding = 0xDEADBEEF;
+ unsigned long connect_outstanding = 0xDEADBEEF;
#endif
if (h -> type != omapi_type_protocol) {
@@ -403,7 +394,7 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
/* If we get a disconnect, dump memory usage. */
if (!strcmp (name, "disconnect")) {
#if defined (DEBUG_MEMORY_LEAKAGE)
- if (connect_outstanding != 0xBEADCAFE) {
+ if (connect_outstanding != 0xDEADBEEF) {
log_info ("generation %ld: %ld new, %ld outstanding, %ld%s",
dmalloc_generation,
dmalloc_outstanding - previous_outstanding,
@@ -485,7 +476,7 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
case omapi_protocol_header_wait:
#if defined (DEBUG_MEMORY_LEAKAGE)
- if (previous_outstanding != 0xBEADCAFE) {
+ if (previous_outstanding != 0xDEADBEEF) {
log_info ("%s %ld: %ld new, %ld outstanding, %ld%s",
"generation", dmalloc_generation,
dmalloc_outstanding - previous_outstanding,
@@ -757,7 +748,7 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
dump_rc_history ();
#endif
#if defined (DEBUG_MEMORY_LEAKAGE)
- previous_outstanding = 0xBEADCAFE;
+ previous_outstanding = 0xDEADBEEF;
#endif
/* Now wait for the next message. */
goto to_header_wait;
@@ -928,9 +919,11 @@ isc_result_t omapi_protocol_destroy (omapi_object_t *h,
while (p -> remote_auth_list) {
omapi_remote_auth_t *r = p -> remote_auth_list -> next;
- omapi_object_dereference (&r -> a, file, line);
- dfree (r, file, line);
p -> remote_auth_list = r;
+ if (r) {
+ omapi_object_dereference (&r -> a, file, line);
+ dfree (r, file, line);
+ }
}
return ISC_R_SUCCESS;
}
diff --git a/omapip/result.c b/omapip/result.c
index 8e6695ef..22746893 100644
--- a/omapip/result.c
+++ b/omapip/result.c
@@ -4,39 +4,30 @@
until the actual libisc merge. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -119,7 +110,10 @@ static const char *text[ISC_R_NRESULTS] = {
const char *isc_result_totext (isc_result_t result)
{
+ static char ebuf[40];
+
if (result >= ISC_R_SUCCESS && result < ISC_R_NRESULTS)
return text [result];
- return "unknown error.";
+ sprintf(ebuf, "unknown error: %d", result);
+ return ebuf;
}
diff --git a/omapip/support.c b/omapip/support.c
index 78fd0461..4efde414 100644
--- a/omapip/support.c
+++ b/omapip/support.c
@@ -3,39 +3,30 @@
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -88,7 +79,8 @@ isc_result_t omapi_init (void)
omapi_connection_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof
- (omapi_connection_object_t), 0);
+ (omapi_connection_object_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -101,7 +93,7 @@ isc_result_t omapi_init (void)
omapi_listener_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_listener_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -113,7 +105,8 @@ isc_result_t omapi_init (void)
omapi_io_signal_handler,
omapi_io_stuff_values,
0, 0, 0, 0, 0, 0,
- sizeof (omapi_io_object_t), 0);
+ sizeof (omapi_io_object_t),
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -126,7 +119,7 @@ isc_result_t omapi_init (void)
omapi_generic_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_generic_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -139,7 +132,7 @@ isc_result_t omapi_init (void)
omapi_protocol_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_protocol_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -151,7 +144,7 @@ isc_result_t omapi_init (void)
omapi_protocol_listener_signal,
omapi_protocol_listener_stuff,
0, 0, 0, 0, 0, 0,
- sizeof (omapi_protocol_listener_object_t), 0));
+ sizeof (omapi_protocol_listener_object_t), 0, RC_MISC));
if (status != ISC_R_SUCCESS)
return status;
@@ -164,7 +157,7 @@ isc_result_t omapi_init (void)
omapi_message_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_message_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -176,7 +169,7 @@ isc_result_t omapi_init (void)
omapi_waiter_signal_handler, 0,
0, 0, 0, 0, 0, 0,
sizeof (omapi_waiter_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -189,7 +182,8 @@ isc_result_t omapi_init (void)
omapi_auth_key_stuff_values,
omapi_auth_key_lookup,
0, 0, 0, 0, 0,
- sizeof (omapi_auth_key_t), 0);
+ sizeof (omapi_auth_key_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
@@ -246,7 +240,8 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **type,
size_t size,
isc_result_t (*initialize)
(omapi_object_t *,
- const char *, int))
+ const char *, int),
+ int rc_flag)
{
omapi_object_type_t *t;
@@ -270,6 +265,7 @@ isc_result_t omapi_object_type_register (omapi_object_type_t **type,
t -> freer = freer;
t -> allocator = allocator;
t -> initialize = initialize;
+ t -> rc_flag = rc_flag;
omapi_object_types = t;
if (type)
*type = t;
diff --git a/omapip/test.c b/omapip/test.c
index 249099e6..fbcaf7b7 100644
--- a/omapip/test.c
+++ b/omapip/test.c
@@ -3,39 +3,30 @@
Test code for omapip... */
/*
- * Copyright (c) 1999-2000 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -45,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <string.h>
#include <isc-dhcp/result.h>
#include <sys/time.h>
#include <omapip/omapip.h>
diff --git a/omapip/toisc.c b/omapip/toisc.c
index a30dcffd..da5923e6 100644
--- a/omapip/toisc.c
+++ b/omapip/toisc.c
@@ -3,39 +3,30 @@
Convert non-ISC result codes to ISC result codes. */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
diff --git a/omapip/trace.c b/omapip/trace.c
index 4ff30516..9245d27a 100644
--- a/omapip/trace.c
+++ b/omapip/trace.c
@@ -5,39 +5,30 @@
transactions... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about the Internet Software Consortium, see http://www.isc.org/. To
+ * about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
diff --git a/relay/Makefile.dist b/relay/Makefile.dist
index e25e9f73..8f1da987 100644
--- a/relay/Makefile.dist
+++ b/relay/Makefile.dist
@@ -1,20 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-1999 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
#
CATMANPAGES = dhcrelay.cat8
diff --git a/relay/dhcrelay.8 b/relay/dhcrelay.8
index c05dc852..05b6dabc 100644
--- a/relay/dhcrelay.8
+++ b/relay/dhcrelay.8
@@ -1,42 +1,33 @@
.\" dhcrelay.8
.\"
-.\" Copyright (c) 1997, 1998 The Internet Software Consortium.
-.\" All rights reserved.
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1997-2003 by Internet Software Consortium
.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie
-.\" Enterprises. To learn more about the Internet Software Consortium,
+.\" Enterprises. To learn more about Internet Systems Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
-.\" $Id: dhcrelay.8,v 1.9 2002/06/09 23:01:03 murray Exp $
+.\" $Id: dhcrelay.8,v 1.10 2005/03/17 20:15:24 dhankins Exp $
.\"
.TH dhcrelay 8
.SH NAME
@@ -66,6 +57,10 @@ dhcrelay - Dynamic Host Configuration Protocol Relay Agent
.B -a
]
[
+.B -c
+.I count
+]
+[
.B -A
.I length
]
@@ -87,7 +82,7 @@ dhcrelay - Dynamic Host Configuration Protocol Relay Agent
.I ...serverN
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Relay Agent, dhcrelay, provides a
+The Internet Systems Consortium DHCP Relay Agent, dhcrelay, provides a
means for relaying DHCP and BOOTP requests from a subnet to which
no DHCP server is directly connected to one or more DHCP servers on other
subnets.
@@ -153,16 +148,17 @@ responses sent from servers to clients will be stripped before
forwarding such responses back to the client.
.PP
The agent option field will contain two agent options: the Circuit ID
-suboption and the Agent ID suboption. Currently, the Circuit ID will
+suboption and the Remote ID suboption. Currently, the Circuit ID will
be the printable name of the interface on which the client request was
-received. The Agent ID will be the value that the relay agent stores
-in the DHCP packet's giaddr field. The client supports inclusion of
-a Remote ID suboption as well, but this is not used by default.
+received. The client supports inclusion of a Remote ID suboption as
+well, but this is not used by default.
.PP
-.I Note:
-The Agent ID suboption is not defined in the current Relay Agent
-Information Option draft (draft-ietf-dhc-agent-options-03.txt), but
-has been proposed for inclusion in the next draft.
+When forwarding packets, dhcrelay discards packets which have reached a hop
+count of 10. If a lower or higher threshold (up to 255) is desired, depending
+on your environment, you can specify the max hop count threshold as a number
+following the
+.B -c
+option.
.PP
Relay Agent options are added to a DHCP packet without the knowledge
of the DHCP client. The client may have filled the DHCP packet
@@ -172,7 +168,7 @@ handle a much larger packet than most DHCP clients would send. The
current Agent Options draft requires that the relay agent use a
maximum packet size of 576 bytes.
.PP
-It is recommended that with the Internet Software Consortium DHCP
+It is recommended that with the Internet Systems Consortium DHCP
server, the maximum packet size be set to about 1400, allowing plenty
of extra space in which the relay agent can put the agent option
field, while still fitting into the Ethernet MTU size. This can be
@@ -204,7 +200,7 @@ the packet unchanged. Or, it may
.I discard
it.
.PP
-Which of these behaviours is followed by the Internet Software
+Which of these behaviours is followed by the Internet Systems
Consortium DHCP Relay Agent may be configured with the
.B -m
flag, followed by one of the four keywords specified in
@@ -239,9 +235,9 @@ however, the relay agent needs to be able to learn about the network
topology, which requires that it have a configuration file.
.SH AUTHOR
.B dhcrelay(8)
-has been written for the Internet Software Consortium
+has been written for Internet Systems Consortium
by Ted Lemon in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+Enterprises. To learn more about Internet Systems Consortium,
see
.B http://www.isc.org/isc.
To learn more about Vixie
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 1d3f2d5b..a6ec87b1 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -3,39 +3,30 @@
DHCP/BOOTP Relay Agent. */
/*
- * Copyright (c) 1997-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1997-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhcrelay.c,v 1.52 2001/04/19 16:48:53 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.53 2005/03/17 20:15:24 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -51,7 +42,6 @@ static char ocopyright[] =
static void usage PROTO ((void));
-TIME cur_time;
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
struct tree_cache *global_options [256];
@@ -77,9 +67,7 @@ int client_packet_errors = 0; /* Errors sending packets to clients. */
int add_agent_options = 0; /* If nonzero, add relay agent options. */
int drop_agent_mismatches = 0; /* If nonzero, drop server replies that
- don't contain a Relay Agent Information
- option whose Agent ID suboption matches
- our giaddr. */
+ don't have matching circuit-id's. */
int corrupt_agent_options = 0; /* Number of packets dropped because
relay agent information option was bad. */
int missing_agent_option = 0; /* Number of packets dropped because no
@@ -88,6 +76,8 @@ int bad_circuit_id = 0; /* Circuit ID option in matching RAI option
did not match any known circuit ID. */
int missing_circuit_id = 0; /* Circuit ID option in matching RAI option
was missing. */
+int max_hop_count = 10; /* Maximum hop count */
+
/* Maximum size of a packet with agent options added. */
int dhcp_max_agent_option_packet_length = 576;
@@ -107,10 +97,10 @@ struct server_list {
struct sockaddr_in to;
} *servers;
-static char copyright [] = "Copyright 1997-2000 Internet Software Consortium.";
+static char copyright [] = "Copyright 2004-2005 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Relay Agent";
-static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
+static char message [] = "Internet Systems Consortium DHCP Relay Agent";
+static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
int main (argc, argv, envp)
int argc;
@@ -182,6 +172,15 @@ int main (argc, argv, envp)
quiet_interface_discovery = 1;
} else if (!strcmp (argv [i], "-a")) {
add_agent_options = 1;
+ } else if (!strcmp (argv [i], "-c")) {
+ int hcount;
+ if (++i == argc)
+ usage ();
+ hcount = atoi(argv[i]);
+ if (hcount <= 255)
+ max_hop_count= hcount;
+ else
+ usage ();
} else if (!strcmp (argv [i], "-A")) {
if (++i == argc)
usage ();
@@ -335,7 +334,7 @@ void relay (ip, packet, length, from_port, from, hfrom)
struct server_list *sp;
struct sockaddr_in to;
struct interface_info *out;
- struct hardware hto;
+ struct hardware hto, *htop;
if (packet -> hlen > sizeof packet -> chaddr) {
log_info ("Discarding packet with invalid hlen.");
@@ -361,9 +360,15 @@ void relay (ip, packet, length, from_port, from, hfrom)
can_unicast_without_arp (out)) {
to.sin_addr = packet -> yiaddr;
to.sin_port = remote_port;
+
+ /* and hardware address is not broadcast */
+ htop = &hto;
} else {
to.sin_addr.s_addr = htonl (INADDR_BROADCAST);
to.sin_port = remote_port;
+
+ /* hardware address is broadcast */
+ htop = NULL;
}
to.sin_family = AF_INET;
#ifdef HAVE_SA_LEN
@@ -392,7 +397,7 @@ void relay (ip, packet, length, from_port, from, hfrom)
if (send_packet (out,
(struct packet *)0,
packet, length, out -> primary_address,
- &to, &hto) < 0) {
+ &to, htop) < 0) {
++server_packet_errors;
} else {
log_debug ("forwarded BOOTREPLY for %s to %s",
@@ -423,6 +428,10 @@ void relay (ip, packet, length, from_port, from, hfrom)
that set giaddr, so we won't see it. */
if (!packet -> giaddr.s_addr)
packet -> giaddr = ip -> primary_address;
+ if (packet -> hops < max_hop_count)
+ packet -> hops = packet -> hops + 1;
+ else
+ return;
/* Otherwise, it's a BOOTREQUEST, so forward it to all the
servers. */
@@ -446,10 +455,11 @@ void relay (ip, packet, length, from_port, from, hfrom)
static void usage ()
{
- log_fatal ("Usage: dhcrelay [-p <port>] [-d] [-D] [-i %s%s%s",
- "interface]\n ",
- "[-q] [-a] [-A length] [-m append|replace|forward|discard]\n",
- " [server1 [... serverN]]");
+ log_fatal ("Usage: dhcrelay [-p <port>] [-d] [-D] [-i %s%s%s%s",
+ "interface] [-q] [-a]\n ",
+ "[-c count] [-A length] ",
+ "[-m append|replace|forward|discard]\n",
+ " [server1 [... serverN]]");
}
int write_lease (lease)
@@ -507,12 +517,19 @@ int parse_allow_deny (struct option_cache **oc, struct parse *p, int i)
return 0;
}
+/* As a wise man once said in dhcpctl/omshell.c: */
+/* Sigh */
+isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
+ control_object_state_t newstate)
+{
+ return ISC_R_SUCCESS;
+}
+
#endif
/* Strip any Relay Agent Information options from the DHCP packet
- option buffer. If an RAI option is found whose Agent ID matches
- the giaddr (i.e., ours), try to look up the outgoing interface
- based on the circuit ID suboption. */
+ option buffer. If there is a circuit ID suboption, look up the
+ outgoing interface based upon it. */
int strip_relay_agent_options (in, out, packet, length)
struct interface_info *in, **out;
@@ -637,7 +654,7 @@ int find_interface_by_agent_option (packet, out, buf, len)
{
int i = 0;
u_int8_t *circuit_id = 0;
- unsigned circuit_id_len;
+ unsigned circuit_id_len = 0;
struct interface_info *ip;
while (i < len) {
diff --git a/server/Makefile.dist b/server/Makefile.dist
index 166ae1e7..907fabeb 100644
--- a/server/Makefile.dist
+++ b/server/Makefile.dist
@@ -1,20 +1,25 @@
# Makefile.dist
#
-# Copyright (c) 1996-1999 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:
+# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+# Copyright (c) 1996-2003 by Internet Software Consortium
#
-# http://www.isc.org/isc-license-1.0.html.
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
#
-# 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.
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-# Support and other services are available for ISC products - see
-# http://www.isc.org for more information.
+# Internet Systems Consortium, Inc.
+# 950 Charter Street
+# Redwood City, CA 94063
+# <info@isc.org>
+# http://www.isc.org/
#
CATMANPAGES = dhcpd.cat8 dhcpd.conf.cat5 dhcpd.leases.cat5
diff --git a/server/bootp.c b/server/bootp.c
index 2757ead3..ed980b3d 100644
--- a/server/bootp.c
+++ b/server/bootp.c
@@ -3,39 +3,30 @@
BOOTP Protocol support. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bootp.c,v 1.71 2001/06/27 00:31:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bootp.c,v 1.72 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -77,7 +68,10 @@ void bootp (packet)
if (packet -> raw -> op != BOOTREQUEST)
return;
- sprintf (msgbuf, "BOOTREQUEST from %s via %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "BOOTREQUEST from %s via %s",
print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
packet -> raw -> chaddr),
@@ -151,11 +145,10 @@ void bootp (packet)
ack_lease (packet, lease, 0, 0, msgbuf, 0);
goto out;
}
- /* XXX just ignore BOOTREQUESTS from unknown clients if
- XXX we can't allocate IP addresses for them. */
-#if 0
- log_info ("%s: no available leases", msgbuf);
-#endif
+
+ /* We couldn't find an address to give this bootp client. */
+ log_info ("%s: BOOTP from unknown client and no dynamic leases",
+ msgbuf);
goto out;
}
diff --git a/server/class.c b/server/class.c
index eab7d9e0..09f8926c 100644
--- a/server/class.c
+++ b/server/class.c
@@ -3,39 +3,30 @@
Handling for client classes. */
/*
- * Copyright (c) 1998-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: class.c,v 1.31 2001/06/27 00:31:02 mellon Exp $ Copyright (c) 1998-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: class.c,v 1.32 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
@@ -199,7 +190,7 @@ int check_collection (packet, lease, collection)
MDL);
data_string_forget (&data, MDL);
if (!class -> hash)
- class -> hash = new_hash (0, 0, 0, MDL);
+ class_new_hash (&class -> hash, 0, MDL);
class_hash_add (class -> hash,
(const char *)
nc -> hash_string.data,
diff --git a/server/confpars.c b/server/confpars.c
index 75219607..1332a978 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -3,39 +3,30 @@
Parser for dhcpd config file... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.147 2001/08/10 10:50:44 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.148 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -163,6 +154,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
if (result != ulen)
log_fatal ("%s: short read of %d bytes instead of %d.",
filename, ulen, result);
+ close (file);
memfile:
/* If we're recording, write out the filename and file contents. */
if (trace_record ())
@@ -170,6 +162,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
new_parse (&cfile, -1, fbuf, ulen, filename, 0); /* XXX */
#else
new_parse (&cfile, file, (char *)0, 0, filename, 0);
+ close (file);
#endif
if (leasep)
status = lease_file_subparse (cfile);
@@ -179,7 +172,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group,
#if defined (TRACING)
dfree (dbuf, MDL);
#endif
- close (file);
return status;
}
@@ -523,9 +515,16 @@ int parse_statement (cfile, group, type, host_decl, declaration)
next_token (&val, (unsigned *)0, cfile);
cache = (struct option_cache *)0;
if (parse_fixed_addr_param (&cache, cfile)) {
- if (host_decl)
- host_decl -> fixed_addr = cache;
- else {
+ if (host_decl) {
+ if (host_decl -> fixed_addr) {
+ option_cache_dereference (&cache, MDL);
+ parse_warn (cfile,
+ "Only one fixed address%s",
+ " declaration per host.");
+ } else {
+ host_decl -> fixed_addr = cache;
+ }
+ } else {
parse_warn (cfile,
"fixed-address parameter not %s",
"allowed here.");
@@ -553,7 +552,8 @@ int parse_statement (cfile, group, type, host_decl, declaration)
skip_to_semi (cfile);
return declaration;
}
- parse_address_range (cfile, group, type, (struct pool *)0);
+ parse_address_range (cfile, group, type, (struct pool *)0,
+ (struct lease **)0);
return declaration;
case TOKEN_NOT:
@@ -644,7 +644,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
break;
case FAILOVER:
- if (type != ROOT_GROUP && type != SHARED_NETWORK) {
+ if (type != ROOT_GROUP && type != SHARED_NET_DECL) {
parse_warn (cfile, "failover peers may only be %s",
"defined in shared-network");
log_error ("declarations and the outer scope.");
@@ -973,10 +973,33 @@ void parse_failover_peer (cfile, group, type)
return;
}
} while (token != RBRACE);
-
- if (peer -> i_am == primary && !peer -> hba) {
- parse_warn (cfile,
+
+ /* me.address can be null; the failover link initiate code tries to
+ * derive a reasonable address to use.
+ */
+ if (!peer -> partner.address)
+ parse_warn (cfile, "peer address may not be omitted");
+
+ /* XXX - when/if we get a port number assigned, just set as default */
+ if (!peer -> me.port)
+ parse_warn (cfile, "local port may not be omitted");
+ if (!peer -> partner.port)
+ parse_warn (cfile, "peer port may not be omitted");
+
+ if (peer -> i_am == primary) {
+ if (!peer -> hba) {
+ parse_warn (cfile,
"primary failover server must have hba or split.");
+ } else if (!peer -> mclt) {
+ parse_warn (cfile,
+ "primary failover server must have mclt.");
+ }
+ }
+ if (!peer -> me.max_flying_updates) {
+ peer -> me.max_flying_updates = 100;
+ }
+ if (!peer -> me.max_response_delay) {
+ peer -> me.max_response_delay = 60;
}
if (type == SHARED_NET_DECL) {
@@ -1197,6 +1220,36 @@ void parse_failover_state (cfile, state, stos)
}
#endif /* defined (FAILOVER_PROTOCOL) */
+/* Permit_list_match returns 1 if every element of the permit list in lhs
+ also appears in rhs. Note that this doesn't by itself mean that the
+ two lists are equal - to check for equality, permit_list_match has to
+ return 1 with (list1, list2) and with (list2, list1). */
+
+int permit_list_match (struct permit *lhs, struct permit *rhs)
+{
+ struct permit *plp, *prp;
+ int matched;
+
+ if (!lhs)
+ return 1;
+ if (!rhs)
+ return 0;
+ for (plp = lhs; plp; plp = plp -> next) {
+ matched = 0;
+ for (prp = rhs; prp; prp = prp -> next) {
+ if (prp -> type == plp -> type &&
+ (prp -> type != permit_class ||
+ prp -> class == plp -> class)) {
+ matched = 1;
+ break;
+ }
+ }
+ if (!matched)
+ return 0;
+ }
+ return 1;
+}
+
void parse_pool_statement (cfile, group, type)
struct parse *cfile;
struct group *group;
@@ -1205,11 +1258,12 @@ void parse_pool_statement (cfile, group, type)
enum dhcp_token token;
const char *val;
int done = 0;
- struct pool *pool, **p;
+ struct pool *pool, **p, *pp;
struct permit *permit;
struct permit **permit_head;
int declaration = 0;
isc_result_t status;
+ struct lease *lpchain = (struct lease *)0, *lp;
pool = (struct pool *)0;
status = pool_allocate (&pool, MDL);
@@ -1217,9 +1271,6 @@ void parse_pool_statement (cfile, group, type)
log_fatal ("no memory for pool: %s",
isc_result_totext (status));
- if (!clone_group (&pool -> group, group, MDL))
- log_fatal ("can't clone pool group.");
-
if (type == SUBNET_DECL)
shared_network_reference (&pool -> shared_network,
group -> subnet -> shared_network,
@@ -1228,6 +1279,9 @@ void parse_pool_statement (cfile, group, type)
shared_network_reference (&pool -> shared_network,
group -> shared_network, MDL);
+ if (!clone_group (&pool -> group, pool -> shared_network -> group, MDL))
+ log_fatal ("can't clone pool group.");
+
#if defined (FAILOVER_PROTOCOL)
/* Inherit the failover peer from the shared network. */
if (pool -> shared_network -> failover_peer)
@@ -1294,7 +1348,8 @@ void parse_pool_statement (cfile, group, type)
case RANGE:
next_token (&val, (unsigned *)0, cfile);
- parse_address_range (cfile, group, type, pool);
+ parse_address_range (cfile, group, type,
+ pool, &lpchain);
break;
case ALLOW:
permit_head = &pool -> permit_list;
@@ -1318,6 +1373,10 @@ void parse_pool_statement (cfile, group, type)
}
break;
+ case KNOWN_CLIENTS:
+ permit -> type = permit_known_clients;
+ break;
+
case UNKNOWN_CLIENTS:
permit -> type = permit_unknown_clients;
break;
@@ -1410,45 +1469,112 @@ void parse_pool_statement (cfile, group, type)
because BOOTP doesn't support leases, and failover absolutely
depends on lease timing. */
if (pool -> failover_peer) {
- for (permit = pool -> permit_list;
- permit; permit = permit -> next) {
+ /* This search order matches the search orders later in
+ * execution - deny first, if not denied, check permit
+ * list. A dynamic bootp client may be known or unknown,
+ * it may belong to a member of a class, but it definitely
+ * will not be authenticated since that requires DHCP
+ * to work. So a dynamic bootp client is definitely not
+ * an authenticated client, and we can't say for sure about
+ * anything else.
+ *
+ * So we nag the user.
+ */
+ for (permit = pool -> prohibit_list; permit;
+ permit = permit -> next) {
if (permit -> type == permit_dynamic_bootp_clients ||
- permit -> type == permit_all_clients) {
- dynamic_bootp_clash:
- parse_warn (cfile,
- "pools with failover peers %s",
- "may not permit dynamic bootp.");
- log_error ("Either write a \"no failover\" %s",
- "statement and use disjoint");
- log_error ("pools, or don't permit dynamic%s",
- " bootp.");
- log_error ("This is a protocol limitation,%s",
- " not an ISC DHCP limitation, so");
- log_error ("please don't request an %s",
- "enhancement or ask why this is.");
- goto clash_testing_done;
- }
+ permit -> type == permit_unauthenticated_clients ||
+ permit -> type == permit_all_clients)
+ break;
}
- if (!pool -> permit_list) {
- if (!pool -> prohibit_list)
- goto dynamic_bootp_clash;
+ if (!permit) {
+ permit = pool -> permit_list;
+ do {
+ if (!permit ||
+ permit -> type !=
+ permit_authenticated_clients) {
+ parse_warn (cfile,
+ "pools with failover peers %s",
+ "may not permit dynamic bootp.");
+ log_error ("Either write a \"%s\" %s",
+ "no failover",
+ "statement and use disjoint");
+ log_error ("pools, or%s (%s) %s",
+ " don't permit dynamic bootp",
+ "\"deny dynamic bootp clients;\"",
+ "in this pool.");
+ log_error ("This is a protocol,%s %s",
+ " limitation, not an ISC DHCP",
+ "limitation, so");
+ log_error ("please don't request an %s",
+ "enhancement or ask why this is.");
- for (permit = pool -> prohibit_list; permit;
- permit = permit -> next) {
- if (permit -> type ==
- permit_dynamic_bootp_clients ||
- permit -> type == permit_all_clients)
- goto clash_testing_done;
- }
+ break;
+ }
+
+ permit = permit -> next;
+ } while (permit);
}
}
- clash_testing_done:
#endif /* FAILOVER_PROTOCOL */
- p = &pool -> shared_network -> pools;
- for (; *p; p = &((*p) -> next))
- ;
- pool_reference (p, pool, MDL);
+ /* See if there's already a pool into which we can merge this one. */
+ for (pp = pool -> shared_network -> pools; pp; pp = pp -> next) {
+ struct lease *l;
+
+ if (pp -> group -> statements != pool -> group -> statements)
+ continue;
+#if defined (FAILOVER_PROTOCOL)
+ if (pool -> failover_peer != pp -> failover_peer)
+ continue;
+#endif
+ if (!permit_list_match (pp -> permit_list,
+ pool -> permit_list) ||
+ !permit_list_match (pool -> permit_list,
+ pp -> permit_list) ||
+ !permit_list_match (pp -> prohibit_list,
+ pool -> prohibit_list) ||
+ !permit_list_match (pool -> prohibit_list,
+ pp -> prohibit_list))
+ continue;
+
+ /* Okay, we can merge these two pools. All we have to
+ do is fix up the leases, which all point to their pool. */
+ for (lp = lpchain; lp; lp = lp -> next) {
+ pool_dereference (&lp -> pool, MDL);
+ pool_reference (&lp -> pool, pp, MDL);
+ }
+ break;
+ }
+
+ /* If we didn't succeed in merging this pool into another, put
+ it on the list. */
+ if (!pp) {
+ p = &pool -> shared_network -> pools;
+ for (; *p; p = &((*p) -> next))
+ ;
+ pool_reference (p, pool, MDL);
+ }
+
+ /* Don't allow a pool declaration with no addresses, since it is
+ probably a configuration error. */
+ if (!lpchain) {
+ parse_warn (cfile, "Pool declaration with no address range.");
+ log_error ("Pool declarations must always contain at least");
+ log_error ("one range statement.");
+ }
+
+ /* Dereference the lease chain. */
+ lp = (struct lease *)0;
+ while (lpchain) {
+ lease_reference (&lp, lpchain, MDL);
+ lease_dereference (&lpchain, MDL);
+ if (lp -> next) {
+ lease_reference (&lpchain, lp -> next, MDL);
+ lease_dereference (&lp -> next, MDL);
+ lease_dereference (&lp, MDL);
+ }
+ }
pool_dereference (&pool, MDL);
}
@@ -1701,7 +1827,7 @@ int parse_class_declaration (cp, cfile, group, type)
struct executable_statement *stmt = (struct executable_statement *)0;
struct expression *expr;
int new = 1;
- isc_result_t status;
+ isc_result_t status = ISC_R_FAILURE;
int deleted = 0;
int dynamic = 0;
@@ -1816,17 +1942,13 @@ int parse_class_declaration (cp, cfile, group, type)
sizeof class -> billed_leases));
}
data_string_copy (&class -> hash_string, &data, MDL);
- if (!pc -> hash)
- pc -> hash =
- new_hash ((hash_reference)
- omapi_object_reference,
- (hash_dereference)
- omapi_object_dereference,
- 0, MDL);
- add_hash (pc -> hash,
- class -> hash_string.data,
- class -> hash_string.len,
- (void *)class, MDL);
+ if (!pc -> hash &&
+ !class_new_hash (&pc -> hash, 0, MDL))
+ log_fatal ("No memory for subclass hash.");
+ class_hash_add (pc -> hash,
+ (const char *)class -> hash_string.data,
+ class -> hash_string.len,
+ (void *)class, MDL);
} else {
if (!clone_group (&class -> group, group, MDL))
log_fatal ("no memory to clone class group.");
@@ -1912,16 +2034,16 @@ int parse_class_declaration (cp, cfile, group, type)
skip_to_semi (cfile);
break;
}
+ token = next_token (&val, (unsigned *)0, cfile);
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token != IF)
+ goto submatch;
if (class -> expr) {
parse_warn (cfile, "can't override match.");
skip_to_semi (cfile);
break;
}
token = next_token (&val, (unsigned *)0, cfile);
- token = peek_token (&val, (unsigned *)0, cfile);
- if (token != IF)
- goto submatch;
- token = next_token (&val, (unsigned *)0, cfile);
if (!parse_boolean_expression (&class -> expr, cfile,
&lose)) {
if (!lose) {
@@ -2182,9 +2304,13 @@ void parse_subnet_declaration (cfile, share)
/* Validate the network number/netmask pair. */
if (host_addr (subnet -> net, subnet -> netmask)) {
+ char *maskstr;
+
+ maskstr = strdup (piaddr (subnet -> netmask));
parse_warn (cfile,
- "subnet %s: bad subnet number/mask combination.",
- piaddr (subnet -> net));
+ "subnet %s netmask %s: bad subnet number/mask combination.",
+ piaddr (subnet -> net), maskstr);
+ free(maskstr);
subnet_dereference (&subnet, MDL);
skip_to_semi (cfile);
return;
@@ -2516,7 +2642,8 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
break;
default: /* for gcc, we'll never get here. */
- break;
+ log_fatal ("Impossible error at %s:%d.", MDL);
+ return 0;
}
break;
@@ -2591,8 +2718,7 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
case DYNAMIC_BOOTP:
seenbit = 256;
- lease -> binding_state = FTS_BOOTP;
- lease -> next_binding_state = FTS_BOOTP;
+ lease -> flags |= BOOTP_LEASE;
parse_semi (cfile);
break;
@@ -2647,17 +2773,18 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
new_state = FTS_BACKUP;
break;
case TOKEN_RESERVED:
- new_state = FTS_RESERVED;
+ new_state = FTS_ACTIVE;
break;
case TOKEN_BOOTP:
- new_state = FTS_BOOTP;
+ new_state = FTS_ACTIVE;
+ lease -> flags |= BOOTP_LEASE;
break;
default:
parse_warn (cfile,
"%s: expecting a binding state.",
val);
skip_to_semi (cfile);
- break;
+ return 0;
}
if (seenbit == 256) {
@@ -2831,11 +2958,13 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
"name");
strcpy (binding -> name, val);
newbinding = 1;
- } else if (binding -> value) {
- binding_value_dereference (&binding -> value,
+ } else {
+ if (binding -> value)
+ binding_value_dereference (&binding -> value,
MDL);
newbinding = 0;
}
+
if (!binding_value_allocate (&binding -> value, MDL))
log_fatal ("no memory for binding value.");
@@ -2992,11 +3121,12 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
/* address-range-declaration :== ip-address ip-address SEMI
| DYNAMIC_BOOTP ip-address ip-address SEMI */
-void parse_address_range (cfile, group, type, inpool)
+void parse_address_range (cfile, group, type, inpool, lpchain)
struct parse *cfile;
struct group *group;
int type;
struct pool *inpool;
+ struct lease **lpchain;
{
struct iaddr low, high, net;
unsigned char addr [4];
@@ -3150,7 +3280,7 @@ void parse_address_range (cfile, group, type, inpool)
#endif /* FAILOVER_PROTOCOL */
/* Create the new address range... */
- new_address_range (low, high, subnet, pool);
+ new_address_range (cfile, low, high, subnet, pool, lpchain);
pool_dereference (&pool, MDL);
}
diff --git a/server/db.c b/server/db.c
index e7500ad9..23ae7f76 100644
--- a/server/db.c
+++ b/server/db.c
@@ -3,39 +3,30 @@
Persistent database management routines for DHCPD... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: db.c,v 1.67 2001/07/10 20:36:03 brister Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: db.c,v 1.68 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -89,6 +80,7 @@ int write_lease (lease)
if (lease -> starts) {
if (lease -> starts != MAX_TIME) {
t = gmtime (&lease -> starts);
+ /* %Audit% Cannot exceed 59 bytes. %2004.06.17,Safe% */
sprintf (tbuf, "%d %d/%02d/%02d %02d:%02d:%02d;",
t -> tm_wday, t -> tm_year + 1900,
t -> tm_mon + 1, t -> tm_mday,
@@ -105,6 +97,7 @@ int write_lease (lease)
if (lease -> ends) {
if (lease -> ends != MAX_TIME) {
t = gmtime (&lease -> ends);
+ /* %Audit% Cannot exceed 59 bytes. %2004.06.17,Safe% */
sprintf (tbuf, "%d %d/%02d/%02d %02d:%02d:%02d;",
t -> tm_wday, t -> tm_year + 1900,
t -> tm_mon + 1, t -> tm_mday,
@@ -152,25 +145,39 @@ int write_lease (lease)
}
}
- fprintf (db_file, "\n binding state %s;",
- ((lease -> binding_state > 0 &&
- lease -> binding_state <= FTS_BOOTP)
- ? binding_state_names [lease -> binding_state - 1]
- : "abandoned"));
-
- if (lease -> binding_state != lease -> next_binding_state)
+ if (lease -> binding_state == FTS_ACTIVE &&
+ (lease -> flags & BOOTP_LEASE)) {
+ fprintf (db_file, "\n binding state bootp;\n");
+ } else {
+ fprintf (db_file, "\n binding state %s;",
+ ((lease -> binding_state > 0 &&
+ lease -> binding_state <= FTS_LAST)
+ ? binding_state_names [lease -> binding_state - 1]
+ : "abandoned"));
+ }
+
+ if (lease -> binding_state != lease -> next_binding_state) {
+ if (lease -> next_binding_state == FTS_ACTIVE &&
+ (lease -> flags & BOOTP_LEASE))
+ fprintf (db_file, "\n next binding state bootp;\n");
+ else
fprintf (db_file, "\n next binding state %s;",
((lease -> next_binding_state > 0 &&
- lease -> next_binding_state <= FTS_BOOTP)
+ lease -> next_binding_state <= FTS_LAST)
? (binding_state_names
[lease -> next_binding_state - 1])
: "abandoned"));
+ }
/* If this lease is billed to a class and is still valid,
write it out. */
- if (lease -> billing_class && lease -> ends > cur_time)
- if (!write_billing_class (lease -> billing_class))
+ if (lease -> billing_class && lease -> ends > cur_time) {
+ if (!write_billing_class (lease -> billing_class)) {
+ log_error ("unable to write class %s",
+ lease -> billing_class -> name);
++errors;
+ }
+ }
if (lease -> hardware_addr.hlen) {
errno = 0;
@@ -243,21 +250,17 @@ int write_lease (lease)
pair p;
memset (&ds, 0, sizeof ds);
- if (lease -> agent_options) {
- for (p = lease -> agent_options -> first; p; p = p -> cdr) {
- oc = (struct option_cache *)p -> car;
- if (oc -> data.len) {
- errno = 0;
- fprintf (db_file, "\n option agent.%s %s;",
- oc -> option -> name,
- pretty_print_option (oc -> option,
- oc -> data.data,
- oc -> data.len,
- 1, 1));
- if (errno)
- ++errors;
- }
- }
+ for (p = lease -> agent_options -> first; p; p = p -> cdr) {
+ oc = (struct option_cache *)p -> car;
+ if (oc -> data.len) {
+ errno = 0;
+ fprintf (db_file, "\n option agent.%s %s;",
+ oc -> option -> name,
+ pretty_print_option (oc -> option, oc -> data.data,
+ oc -> data.len, 1, 1));
+ if (errno)
+ ++errors;
+ }
}
}
if (lease -> client_hostname &&
@@ -400,11 +403,11 @@ int write_host (host)
}
for (i = 0; i < ip_addrs.len - 3; i += 4) {
errno = 0;
- fprintf (db_file, "%d.%d.%d.%d%s",
- ip_addrs.data [i],
- ip_addrs.data [i + 1],
- ip_addrs.data [i + 2],
- ip_addrs.data [i + 3],
+ fprintf (db_file, "%u.%u.%u.%u%s",
+ ip_addrs.data [i] & 0xff,
+ ip_addrs.data [i + 1] & 0xff,
+ ip_addrs.data [i + 2] & 0xff,
+ ip_addrs.data [i + 3] & 0xff,
i + 7 < ip_addrs.len ? "," : "");
if (errno) {
++errors;
@@ -596,6 +599,7 @@ int db_printable_len (s, len)
unsigned len;
{
int i;
+
for (i = 0; i < len; i++)
if (!isascii (s [i]) || !isprint (s [i]) ||
s [i] == '"' || s [i] == '\\')
@@ -606,9 +610,8 @@ int db_printable_len (s, len)
static int print_hash_string(FILE *fp, struct class *class)
{
int i;
- int errors;
-
-
+ int errors = 0;
+
for (i = 0; i < class -> hash_string.len; i++)
if (!isascii (class -> hash_string.data [i]) ||
!isprint (class -> hash_string.data [i]))
@@ -785,6 +788,12 @@ int write_billing_class (class)
return !errors;
}
+/* Commit leases after a timeout. */
+void commit_leases_timeout (void *foo)
+{
+ commit_leases ();
+}
+
/* Commit any leases that have been written out... */
int commit_leases ()
@@ -866,7 +875,17 @@ int new_lease_file ()
/* Make a temporary lease file... */
GET_TIME (&t);
- sprintf (newfname, "%s.%d", path_dhcpd_db, (int)t);
+
+ /* %Audit% Truncated filename causes panic. %2004.06.17,Safe%
+ * This should never happen since the path is a configuration
+ * variable from build-time or command-line. But if it should,
+ * either by malice or ignorance, we panic, since the potential
+ * for havoc is high.
+ */
+ if (snprintf (newfname, sizeof newfname, "%s.%d",
+ path_dhcpd_db, (int)t) >= sizeof newfname)
+ log_fatal("new_lease_file: lease file path too long");
+
db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
if (db_fd < 0) {
log_error ("Can't create new lease file: %m");
@@ -916,8 +935,17 @@ int new_lease_file ()
#if defined (TRACING)
if (!trace_playback ()) {
#endif
+ /* %Audit% Truncated filename causes panic. %2004.06.17,Safe%
+ * This should never happen since the path is a configuration
+ * variable from build-time or command-line. But if it should,
+ * either by malice or ignorance, we panic, since the potential
+ * for havoc is too high.
+ */
+ if (snprintf (backfname, sizeof backfname, "%s~", path_dhcpd_db)
+ >= sizeof backfname)
+ log_fatal("new_lease_file: backup lease file path too long");
+
/* Get the old database out of the way... */
- sprintf (backfname, "%s~", path_dhcpd_db);
if (unlink (backfname) < 0 && errno != ENOENT) {
log_error ("Can't remove old lease database backup %s: %m",
backfname);
diff --git a/server/ddns.c b/server/ddns.c
index f106f1d2..1b10f867 100644
--- a/server/ddns.c
+++ b/server/ddns.c
@@ -3,47 +3,38 @@
Dynamic DNS updates. */
/*
- * Copyright (c) 2000-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2000-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been donated to the Internet Software Consortium
+ * This software has been donated to Internet Systems Consortium
* by Damien Neil of Nominum, Inc.
*
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
-"$Id: ddns.c,v 1.17 2001/06/29 18:34:54 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ddns.c,v 1.18 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -121,7 +112,23 @@ static isc_result_t ddns_update_ptr (struct data_string *ddns_fwd_name,
* Attempt to perform the update.
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#if defined (DEBUG)
print_dns_status ((int)result, &updqueue);
+#endif
+ if (result == ISC_R_SUCCESS) {
+ log_info ("added reverse map from %.*s to %.*s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data);
+ } else {
+ log_error ("unable to add reverse map from %.*s to %.*s: %s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ isc_result_totext (result));
+ }
/* Fall through. */
error:
@@ -174,7 +181,24 @@ static isc_result_t ddns_remove_ptr (struct data_string *ddns_rev_name)
* Attempt to perform the update.
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#if defined (DEBUG)
print_dns_status ((int)result, &updqueue);
+#endif
+ if (result == ISC_R_SUCCESS) {
+ log_info ("removed reverse map on %.*s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data);
+ } else {
+ if (result != ISC_R_NXRRSET && result != ISC_R_NXDOMAIN)
+ log_error ("can't remove reverse map on %.*s: %s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ isc_result_totext (result));
+ }
+
+ /* Not there is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
/* Fall through. */
error:
@@ -237,7 +261,7 @@ int ddns_updates (struct packet *packet,
nonzero, don't try to use the client-supplied
XXX */
if (!(oc = lookup_option (&fqdn_universe, packet -> options,
- FQDN_NO_CLIENT_UPDATE)) ||
+ FQDN_SERVER_UPDATE)) ||
evaluate_boolean_option_cache (&ignorep, packet, lease,
(struct client_state *)0,
packet -> options,
@@ -261,6 +285,18 @@ int ddns_updates (struct packet *packet,
goto client_updates;
}
noclient:
+ /* If do-forward-updates is disabled, this basically means don't
+ do an update unless the client is participating, so if we get
+ here and do-forward-updates is disabled, we can stop. */
+ if ((oc = lookup_option (&server_universe, state -> options,
+ SV_DO_FORWARD_UPDATES)) &&
+ !evaluate_boolean_option_cache (&ignorep, packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc, MDL)) {
+ return 0;
+ }
/* If it's a static lease, then don't do the DNS update unless we're
specifically configured to do so. If the client asked to do its
@@ -279,8 +315,6 @@ int ddns_updates (struct packet *packet,
/*
* Compute the name for the A record.
*/
- s1 = s2 = 0;
-
oc = lookup_option (&server_universe, state -> options,
SV_DDNS_HOST_NAME);
if (oc)
@@ -289,6 +323,8 @@ int ddns_updates (struct packet *packet,
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
+ else
+ s1 = 0;
oc = lookup_option (&server_universe, state -> options,
SV_DDNS_DOMAIN_NAME);
@@ -298,8 +334,16 @@ int ddns_updates (struct packet *packet,
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
+ else
+ s2 = 0;
if (s1 && s2) {
+ if (ddns_hostname.len + ddns_domainname.len > 253) {
+ log_error ("ddns_update: host.domain name too long");
+
+ goto out;
+ }
+
buffer_allocate (&ddns_fwd_name.buffer,
ddns_hostname.len + ddns_domainname.len + 2,
MDL);
@@ -380,11 +424,20 @@ int ddns_updates (struct packet *packet,
PTR update. */
if (find_bound_string (&old_ddns_fwd_name,
lease -> scope, "ddns-client-fqdn")) {
+ /* If the name is not different, no need to update
+ the PTR record. */
if (old_ddns_fwd_name.len == ddns_fwd_name.len &&
!memcmp (old_ddns_fwd_name.data, ddns_fwd_name.data,
- old_ddns_fwd_name.len)) {
- /* If the name is not different, no need to update
- the PTR record. */
+ old_ddns_fwd_name.len) &&
+ (!(oc = lookup_option (&server_universe,
+ state -> options,
+ SV_UPDATE_OPTIMIZATION)) ||
+ evaluate_boolean_option_cache (&ignorep, packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc,
+ MDL))) {
goto noerror;
}
}
@@ -395,6 +448,11 @@ int ddns_updates (struct packet *packet,
if (!ddns_fwd_name.len)
goto out;
+ if (ddns_fwd_name.len > 255) {
+ log_error ("client provided fqdn: too long");
+ goto out;
+ }
+
/*
* Compute the RR TTL.
*/
@@ -425,7 +483,15 @@ int ddns_updates (struct packet *packet,
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
-
+ else
+ s1 = 0;
+
+ if (s1 && (d1.len > 238)) {
+ log_error ("ddns_update: Calculated rev domain name too long.");
+ s1 = 0;
+ data_string_forget (&d1, MDL);
+ }
+
if (oc && s1) {
/* Buffer length:
XXX.XXX.XXX.XXX.<ddns-rev-domain-name>\0 */
@@ -433,21 +499,15 @@ int ddns_updates (struct packet *packet,
d1.len + 17, MDL);
if (ddns_rev_name.buffer) {
ddns_rev_name.data = ddns_rev_name.buffer -> data;
-#ifndef NO_SNPRINTF
- snprintf ((char *)ddns_rev_name.buffer -> data, 17,
- "%d.%d.%d.%d.",
- lease -> ip_addr . iabuf[3],
- lease -> ip_addr . iabuf[2],
- lease -> ip_addr . iabuf[1],
- lease -> ip_addr . iabuf[0]);
-#else
+
+ /* %Audit% Cannot exceed 17 bytes. %2004.06.17,Safe% */
sprintf ((char *)ddns_rev_name.buffer -> data,
- "%d.%d.%d.%d.",
- lease -> ip_addr . iabuf[3],
- lease -> ip_addr . iabuf[2],
- lease -> ip_addr . iabuf[1],
- lease -> ip_addr . iabuf[0]);
-#endif
+ "%u.%u.%u.%u.",
+ lease -> ip_addr . iabuf[3] & 0xff,
+ lease -> ip_addr . iabuf[2] & 0xff,
+ lease -> ip_addr . iabuf[1] & 0xff,
+ lease -> ip_addr . iabuf[0] & 0xff);
+
ddns_rev_name.len =
strlen ((const char *)ddns_rev_name.data);
data_string_append (&ddns_rev_name, &d1);
@@ -607,6 +667,9 @@ int ddns_removals (struct lease *lease)
if (!lease -> scope)
return 0;
+ if (ddns_update_style != 2)
+ return 0;
+
/*
* Look up stored names.
*/
@@ -620,6 +683,8 @@ int ddns_removals (struct lease *lease)
if (!resolver_inited) {
minires_ninit (&resolver_state);
resolver_inited = 1;
+ resolver_state.retrans = 1;
+ resolver_state.retry = 1;
}
/* We need the fwd name whether we are deleting both records or just
diff --git a/server/dhcp.c b/server/dhcp.c
index 281f215c..3d647458 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -3,39 +3,30 @@
DHCP Protocol engine. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.196 2002/01/17 17:01:46 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.197 2005/03/17 20:15:27 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -89,13 +80,8 @@ void dhcp (packet)
packet -> packet_type < dhcp_type_name_max - 1) {
s = dhcp_type_names [packet -> packet_type - 1];
} else {
-#if defined (HAVE_SNPRINTF)
- snprintf (typebuf, sizeof typebuf,
- "type %d", packet -> packet_type);
-#else
- sprintf (typebuf,
- "type %d", packet -> packet_type);
-#endif
+ /* %Audit% Cannot exceed 28 bytes. %2004.06.17,Safe% */
+ sprintf (typebuf, "type %d", packet -> packet_type);
s = typebuf;
}
@@ -258,9 +244,10 @@ void dhcpdiscover (packet, ms_nulltp)
struct lease *lease = (struct lease *)0;
char msgbuf [1024]; /* XXX */
TIME when;
- char *s;
+ const char *s;
int allocatedp = 0;
int peer_has_leases = 0;
+ int alloc_lease_called = 0;
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_state_t *peer;
#endif
@@ -268,14 +255,19 @@ void dhcpdiscover (packet, ms_nulltp)
find_lease (&lease, packet, packet -> shared_network,
0, &allocatedp, (struct lease *)0, MDL);
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- /* Say what we're doing... */
- sprintf (msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
@@ -332,12 +324,12 @@ void dhcpdiscover (packet, ms_nulltp)
packet -> shared_network -> pools,
&peer_has_leases)) {
if (peer_has_leases)
- log_info ("%s: peer holds all free leases",
- msgbuf);
+ log_error ("%s: peer holds all free leases",
+ msgbuf);
else
- log_info ("%s: network %s: no free leases",
- msgbuf,
- packet -> shared_network -> name);
+ log_error ("%s: network %s: no free leases",
+ msgbuf,
+ packet -> shared_network -> name);
return;
}
#if defined (FAILOVER_PROTOCOL)
@@ -345,6 +337,7 @@ void dhcpdiscover (packet, ms_nulltp)
dhcp_failover_pool_check (lease -> pool);
#endif
allocatedp = 1;
+ alloc_lease_called = 1;
}
#if defined (FAILOVER_PROTOCOL)
@@ -368,13 +361,18 @@ void dhcpdiscover (packet, ms_nulltp)
XXX be forced to switch servers (and IP addresses) just because
XXX of bad luck, when it's possible for it to get the address it
XXX is requesting. Not sure this is allowed. */
- if (allocatedp && peer) {
- if (peer -> service_state == cooperating) {
- if (!load_balance_mine (packet, peer)) {
- log_debug ("%s: load balance to peer %s",
- msgbuf, peer -> name);
- goto out;
- }
+ if (allocatedp && peer && (peer -> service_state == cooperating) &&
+ !load_balance_mine (packet, peer)) {
+ /* peer_has_leases only has a chance to be set if we called
+ * allocate_lease() above.
+ */
+ if (!alloc_lease_called || peer_has_leases) {
+ log_debug ("%s: load balance to peer %s",
+ msgbuf, peer -> name);
+ goto out;
+ } else {
+ log_debug ("cancel load balance to peer %s - %s",
+ peer -> name, "no free leases");
}
}
#endif
@@ -409,7 +407,7 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
struct data_string data;
int status;
char msgbuf [1024]; /* XXX */
- char *s;
+ const char *s;
char smbuf [19];
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_state_t *peer;
@@ -446,10 +444,13 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
/* XXX consider using allocatedp arg to find_lease to see
XXX that this isn't a compliant DHCPREQUEST. */
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
oc = lookup_option (&dhcp_universe, packet -> options,
@@ -463,13 +464,19 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
sip.len = 4;
memcpy (sip.iabuf, data.data, 4);
data_string_forget (&data, MDL);
+ /* piaddr() should not return more than a 15 byte string.
+ * safe.
+ */
sprintf (smbuf, " (%s)", piaddr (sip));
have_server_identifier = 1;
} else
smbuf [0] = 0;
- /* Say what we're doing... */
- sprintf (msgbuf, "DHCPREQUEST for %s%s from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
+ "DHCPREQUEST for %s%s from %s %s%s%svia %s",
piaddr (cip), smbuf,
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
@@ -493,27 +500,25 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
msgbuf, peer -> nrr);
goto out;
}
- /* Don't load balance if the client is RENEWING or REBINDING.
- If it's RENEWING, we are the only server to hear it, so
- we have to serve it. If it's REBINDING, it's out of
- communication with the other server, so there's no point
- in waiting to serve it. However, if the lease we're
- offering is not a free lease, then we may be the only
- server that can offer it, so we can't load balance if
- the lease isn't in the free or backup state. */
- if (peer -> service_state == cooperating &&
- !packet -> raw -> ciaddr.s_addr &&
- (lease -> binding_state == FTS_FREE ||
- lease -> binding_state == FTS_BACKUP)) {
- if (!load_balance_mine (packet, peer)) {
- log_debug ("%s: load balance to peer %s",
- msgbuf, peer -> name);
- goto out;
- }
- }
- /* Don't let a client allocate a lease using DHCPREQUEST
- if the lease isn't ours to allocate. */
+ /* "load balance to peer" - is not done at all for request.
+ *
+ * If it's RENEWING, we are the only server to hear it, so
+ * we have to serve it. If it's REBINDING, it's out of
+ * communication with the other server, so there's no point
+ * in waiting to serve it. However, if the lease we're
+ * offering is not a free lease, then we may be the only
+ * server that can offer it, so we can't load balance if
+ * the lease isn't in the free or backup state. If it is
+ * in the free or backup state, then that state is what
+ * mandates one server or the other should perform the
+ * allocation, not the LBA...we know the peer cannot
+ * allocate a request for an address in our free state.
+ *
+ * So our only compass is lease_mine_to_reallocate(). This
+ * effects both load balancing, and a sanity-check that we
+ * are not going to try to allocate a lease that isn't ours.
+ */
if ((lease -> binding_state == FTS_FREE ||
lease -> binding_state == FTS_BACKUP) &&
!lease_mine_to_reallocate (lease)) {
@@ -521,6 +526,27 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
goto out;
}
+ /* If the lease is in a transitional state, we can't
+ renew it. */
+ if ((lease -> binding_state == FTS_RELEASED ||
+ lease -> binding_state == FTS_EXPIRED) &&
+ !lease_mine_to_reallocate (lease)) {
+ log_debug ("%s: lease in transition state %s", msgbuf,
+ lease -> binding_state == FTS_RELEASED
+ ? "released" : "expired");
+ goto out;
+ }
+
+ /* It's actually very unlikely that we'll ever get here,
+ but if we do, tell the client to stop using the lease,
+ because the administrator reset it. */
+ if (lease -> binding_state == FTS_RESET &&
+ !lease_mine_to_reallocate (lease)) {
+ log_debug ("%s: lease reset by administrator", msgbuf);
+ nak_lease (packet, &cip);
+ goto out;
+ }
+
/* At this point it's possible that we will get a broadcast
DHCPREQUEST for a lease that we didn't offer, because
both we and the peer are in a position to offer it.
@@ -658,8 +684,8 @@ void dhcprelease (packet, ms_nulltp)
struct iaddr cip;
struct option_cache *oc;
struct data_string data;
- char *s;
- char msgbuf [1024]; /* XXX */
+ const char *s;
+ char msgbuf [1024], cstr[16]; /* XXX */
/* DHCPRELEASE must not specify address in requested-address
@@ -713,16 +739,36 @@ void dhcprelease (packet, ms_nulltp)
}
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ /* If the hardware address doesn't match, don't do the release. */
+ if (lease &&
+ (lease -> hardware_addr.hlen != packet -> raw -> hlen + 1 ||
+ lease -> hardware_addr.hbuf [0] != packet -> raw -> htype ||
+ memcmp (&lease -> hardware_addr.hbuf [1],
+ packet -> raw -> chaddr, packet -> raw -> hlen)))
+ lease_dereference (&lease, MDL);
+
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- /* Say what we're doing... */
- sprintf (msgbuf,
+ /* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe%
+ * We copy this out to stack because we actually want to log two
+ * inet_ntoa()'s in this message.
+ */
+ strncpy(cstr, inet_ntoa (packet -> raw -> ciaddr), 15);
+ cstr[15] = '\0';
+
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
- inet_ntoa (packet -> raw -> ciaddr),
+ cstr,
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
@@ -775,7 +821,7 @@ void dhcpdecline (packet, ms_nulltp)
int ignorep = 0;
int i;
const char *status;
- char *s;
+ const char *s;
char msgbuf [1024]; /* XXX */
struct iaddr cip;
struct option_cache *oc;
@@ -798,13 +844,20 @@ void dhcpdecline (packet, ms_nulltp)
data_string_forget (&data, MDL);
find_lease_by_ip_addr (&lease, cip, MDL);
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- sprintf (msgbuf, "DHCPDECLINE of %s from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
+ "DHCPDECLINE of %s from %s %s%s%svia %s",
piaddr (cip),
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
@@ -909,13 +962,16 @@ void dhcpinform (packet, ms_nulltp)
source address if they didn't set ciaddr. */
if (!packet -> raw -> ciaddr.s_addr) {
cip.len = 4;
- memcpy (cip.iabuf, &packet -> client_addr, 4);
+ memcpy (cip.iabuf, &packet -> client_addr.iabuf, 4);
} else {
cip.len = 4;
memcpy (cip.iabuf, &packet -> raw -> ciaddr, 4);
}
- sprintf (msgbuf, "DHCPINFORM from %s via %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "DHCPINFORM from %s via %s",
piaddr (cip), packet -> interface -> name);
/* If the IP source address is zero, don't respond. */
@@ -949,7 +1005,7 @@ void dhcpinform (packet, ms_nulltp)
log_info ("please write an `authoritative;' directi%s",
"ve either in the");
log_info ("subnet declaration or in some scope that%s",
- "encloses the");
+ " encloses the");
log_info ("subnet declaration - for example, write %s",
"it at the top");
log_info ("of the dhcpd.conf file.");
@@ -1151,7 +1207,6 @@ void dhcpinform (packet, ms_nulltp)
log_info ("%s", msgbuf);
/* Figure out the address of the boot file server. */
- raw.siaddr = from;
if ((oc =
lookup_option (&server_universe, options, SV_NEXT_SERVER))) {
if (evaluate_option_cache (&d1, packet, (struct lease *)0,
@@ -1317,6 +1372,19 @@ void nak_lease (packet, cip)
goto use_primary;
}
+ /* If there were agent options in the incoming packet, return
+ them. */
+ if (packet -> raw -> giaddr.s_addr &&
+ packet -> options -> universe_count > agent_universe.index &&
+ packet -> options -> universes [agent_universe.index]) {
+ option_chain_head_reference
+ ((struct option_chain_head **)
+ &(options -> universes [agent_universe.index]),
+ (struct option_chain_head *)
+ packet -> options -> universes [agent_universe.index],
+ MDL);
+ }
+
/* Do not use the client's requested parameter list. */
delete_option (&dhcp_universe, packet -> options,
DHO_DHCP_PARAMETER_REQUEST_LIST);
@@ -1419,6 +1487,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
struct lease *lt;
struct lease_state *state;
struct lease *next;
+ struct host_decl *host = (struct host_decl *)0;
TIME lease_time;
TIME offered_lease_time;
struct data_string d1;
@@ -1430,6 +1499,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
int status;
isc_result_t result;
int did_ping = 0;
+ TIME ping_timeout;
unsigned i, j;
int s1, s2;
@@ -1440,6 +1510,10 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
if (lease -> state)
return;
+ /* If the lease carries a host record, remember it. */
+ if (lease -> host)
+ host_reference (&host, lease -> host, MDL);
+
/* Allocate a lease state structure... */
state = new_lease_state (MDL);
if (!state)
@@ -1502,13 +1576,11 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
/* If the lease is from a pool, run the pool scope. */
if (lease -> pool)
- execute_statements_in_scope ((struct binding_value **)0,
- packet, lease,
- (struct client_state *)0,
- packet -> options,
- state -> options, &lease -> scope,
- lease -> pool -> group,
- lease -> subnet -> group);
+ (execute_statements_in_scope
+ ((struct binding_value **)0, packet, lease,
+ (struct client_state *)0, packet -> options,
+ state -> options, &lease -> scope, lease -> pool -> group,
+ lease -> pool -> shared_network -> group));
/* Execute statements from class scopes. */
for (i = packet -> class_count; i > 0; i--) {
@@ -1522,19 +1594,6 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
: lease -> subnet -> group));
}
- /* If we have a host_decl structure, run the options associated
- with its group. */
- if (lease -> host)
- execute_statements_in_scope ((struct binding_value **)0,
- packet, lease,
- (struct client_state *)0,
- packet -> options,
- state -> options, &lease -> scope,
- lease -> host -> group,
- (lease -> pool
- ? lease -> pool -> group
- : lease -> subnet -> group));
-
/* See if the client is only supposed to have one lease at a time,
and if so, find its other leases and release them. We can only
do this on DHCPREQUEST. It's a little weird to do this before
@@ -1596,8 +1655,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
} while (1);
}
if (!lease -> uid_len ||
- (lease -> host &&
- !lease -> host -> client_identifier.len &&
+ (host &&
+ !host -> client_identifier.len &&
(oc = lookup_option (&server_universe, state -> options,
SV_DUPLICATES)) &&
!evaluate_boolean_option_cache (&ignorep, packet, lease,
@@ -1663,14 +1722,17 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
d1.data [0]);
data_string_forget (&d1, MDL);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
data_string_forget (&d1, MDL);
}
}
- /* Try to find a matching host declaration for this lease. */
- if (!lease -> host) {
+ /* Try to find a matching host declaration for this lease.
+ */
+ if (!host) {
struct host_decl *hp = (struct host_decl *)0;
struct host_decl *h;
@@ -1688,10 +1750,14 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
&lease -> scope, oc, MDL)) {
find_hosts_by_uid (&hp, d1.data, d1.len, MDL);
data_string_forget (&d1, MDL);
- if (hp)
- host_reference (&lease -> host, hp, MDL);
+ for (h = hp; h; h = h -> n_ipaddr) {
+ if (!h -> fixed_addr)
+ break;
+ }
+ if (h)
+ host_reference (&host, h, MDL);
}
- if (!hp) {
+ if (!host) {
find_hosts_by_haddr (&hp,
packet -> raw -> htype,
packet -> raw -> chaddr,
@@ -1702,15 +1768,28 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
break;
}
if (h)
- host_reference (&lease -> host, h, MDL);
+ host_reference (&host, h, MDL);
}
if (hp)
host_dereference (&hp, MDL);
}
+ /* If we have a host_decl structure, run the options associated
+ with its group. Wether the host decl struct is old or not. */
+ if (host)
+ execute_statements_in_scope ((struct binding_value **)0,
+ packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options, &lease -> scope,
+ host -> group,
+ (lease -> pool
+ ? lease -> pool -> group
+ : lease -> subnet -> group));
+
/* Drop the request if it's not allowed for this client. By
default, unknown clients are allowed. */
- if (!lease -> host &&
+ if (!host &&
(oc = lookup_option (&server_universe, state -> options,
SV_BOOT_UNKNOWN_CLIENTS)) &&
!evaluate_boolean_option_cache (&ignorep,
@@ -1722,6 +1801,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
if (!ignorep)
log_info ("%s: unknown client", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
@@ -1738,6 +1819,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
if (!ignorep)
log_info ("%s: bootp disallowed", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
@@ -1754,6 +1837,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
if (!ignorep)
log_info ("%s: booting disallowed", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
@@ -1789,7 +1874,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
log_info ("%s: no available billing",
msg);
free_lease_state (state, MDL);
- /* XXX probably not necessary: */
+ if (host)
+ host_dereference (&host, MDL);
+ /* XXX possibly not necessary: */
return;
}
}
@@ -1822,6 +1909,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
log_info ("%s: can't allocate temporary lease structure: %s",
msg, isc_result_totext (result));
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
@@ -1859,6 +1948,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
&lease -> scope, oc, MDL);
else
s1 = 0;
+
if (s1 && d1.len == sizeof (u_int32_t)) {
lease_time = getULong (d1.data);
data_string_forget (&d1, MDL);
@@ -1867,7 +1957,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
data_string_forget (&d1, MDL);
lease_time = default_lease_time;
}
-
+
/* See if there's a maximum lease time. */
max_lease_time = DEFAULT_MAX_LEASE_TIME;
if ((oc = lookup_option (&server_universe, state -> options,
@@ -1916,6 +2006,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
#if defined (FAILOVER_PROTOCOL)
/* Okay, we know the lease duration. Now check the
failover state, if any. */
+ if (lease -> tsfp) {
+ lt ->tsfp = lease ->tsfp;
+ }
if (lease -> pool && lease -> pool -> failover_peer) {
dhcp_failover_state_t *peer =
lease -> pool -> failover_peer;
@@ -2015,7 +2108,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
}
lt -> ends = state -> offered_expiry = cur_time + lease_time;
- lt -> next_binding_state = FTS_BOOTP;
+ lt -> next_binding_state = FTS_ACTIVE;
}
lt -> timestamp = cur_time;
@@ -2047,8 +2140,10 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
data_string_forget (&d1, MDL);
}
- if (lease -> host)
- host_reference (&lt -> host, lease -> host, MDL);
+ if (host) {
+ host_reference (&lt -> host, host, MDL);
+ host_dereference (&host, MDL);
+ }
if (lease -> subnet)
subnet_reference (&lt -> subnet, lease -> subnet, MDL);
if (lease -> billing_class)
@@ -2108,6 +2203,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
packet -> options,
(struct option_state *)0,
&global_scope, oc, MDL);
+ else
+ s1 = 0;
+
if (oc && s1 &&
lease -> client_hostname &&
strlen (lease -> client_hostname) == d1.len &&
@@ -2236,6 +2334,28 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
}
}
+ /* Get the Subnet Selection option from the packet, if one
+ was sent. */
+ if ((oc = lookup_option (&dhcp_universe, packet -> options,
+ DHO_SUBNET_SELECTION))) {
+
+ /* Make a copy of the data. */
+ struct option_cache *noc = (struct option_cache *)0;
+ if (option_cache_allocate (&noc, MDL)) {
+ if (oc -> data.len)
+ data_string_copy (&noc -> data,
+ &oc -> data, MDL);
+ if (oc -> expression)
+ expression_reference (&noc -> expression,
+ oc -> expression, MDL);
+ if (oc -> option)
+ noc -> option = oc -> option;
+ }
+
+ save_option (&dhcp_universe, state -> options, noc);
+ option_cache_dereference (&noc, MDL);
+ }
+
/* Now, if appropriate, put in DHCP-specific options that
override those. */
if (state -> offer) {
@@ -2367,7 +2487,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
}
/* Figure out the address of the boot file server. */
- memcpy (&state -> siaddr, state -> from.iabuf, sizeof state -> siaddr);
+ memset (&state -> siaddr, 0, sizeof state -> siaddr);
if ((oc =
lookup_option (&server_universe,
state -> options, SV_NEXT_SERVER))) {
@@ -2556,7 +2676,29 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
&lease -> scope, oc, MDL))) {
lease -> timestamp = cur_time;
icmp_echorequest (&lease -> ip_addr);
- add_timeout (cur_time + 1, lease_ping_timeout, lease,
+
+ /* Determine wether to use configured or default ping timeout.
+ */
+ if ((oc = lookup_option (&server_universe, state -> options,
+ SV_PING_TIMEOUT)) &&
+ evaluate_option_cache (&d1, packet, lease, NULL,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc, MDL)) {
+ if (d1.len == sizeof (u_int32_t))
+ ping_timeout = getULong (d1.data);
+ else
+ ping_timeout = DEFAULT_PING_TIMEOUT;
+
+ data_string_forget (&d1, MDL);
+ } else
+ ping_timeout = DEFAULT_PING_TIMEOUT;
+
+#ifdef DEBUG
+ log_debug ("Ping timeout: %ld", (long)ping_timeout);
+#endif
+
+ add_timeout (cur_time + ping_timeout, lease_ping_timeout, lease,
(tvref_t)lease_reference,
(tvunref_t)lease_dereference);
++outstanding_pings;
@@ -2582,7 +2724,7 @@ void dhcp_reply (lease)
struct option_tag *ot, *not;
struct data_string d1;
struct option_cache *oc;
- char *s;
+ const char *s;
if (!state)
log_fatal ("dhcp_reply was supplied lease with no state!");
@@ -2656,10 +2798,13 @@ void dhcp_reply (lease)
raw.hops = state -> hops;
raw.op = BOOTREPLY;
- if (lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
/* Say what we're doing... */
@@ -3447,18 +3592,18 @@ int mockup_lease (struct lease **lp, struct packet *packet,
struct shared_network *share, struct host_decl *hp)
{
struct lease *lease = (struct lease *)0;
- const unsigned char **s;
- isc_result_t status;
struct host_decl *rhp = (struct host_decl *)0;
- status = lease_allocate (&lease, MDL);
- if (status != ISC_R_SUCCESS)
+ if (lease_allocate (&lease, MDL) != ISC_R_SUCCESS)
return 0;
- if (host_reference (&rhp, hp, MDL) != ISC_R_SUCCESS)
+ if (host_reference (&rhp, hp, MDL) != ISC_R_SUCCESS) {
+ lease_dereference (&lease, MDL);
return 0;
+ }
if (!find_host_for_network (&lease -> subnet,
&rhp, &lease -> ip_addr, share)) {
lease_dereference (&lease, MDL);
+ host_dereference (&rhp, MDL);
return 0;
}
host_reference (&lease -> host, rhp, MDL);
@@ -3478,7 +3623,9 @@ int mockup_lease (struct lease **lp, struct packet *packet,
lease -> starts = lease -> timestamp = lease -> ends = MIN_TIME;
lease -> flags = STATIC_LEASE;
lease -> binding_state = FTS_FREE;
+
lease_reference (lp, lease, MDL);
+
lease_dereference (&lease, MDL);
host_dereference (&rhp, MDL);
return 1;
@@ -3492,100 +3639,92 @@ int mockup_lease (struct lease **lp, struct packet *packet,
a lease at all. */
int allocate_lease (struct lease **lp, struct packet *packet,
- struct pool *pool, int *peer_has_leases)
+ struct pool *pool, int *peer_has_leases)
{
struct lease *lease = (struct lease *)0;
- struct lease **lq;
- struct permit *permit;
+ struct lease *candl = (struct lease *)0;
- if (!pool)
- return 0;
-
- /* If we aren't elegible to try this pool, try a subsequent one. */
- if ((pool -> prohibit_list &&
- permitted (packet, pool -> prohibit_list)) ||
- (pool -> permit_list && !permitted (packet, pool -> permit_list)))
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
+ for (; pool ; pool = pool -> next) {
+ if ((pool -> prohibit_list &&
+ permitted (packet, pool -> prohibit_list)) ||
+ (pool -> permit_list &&
+ !permitted (packet, pool -> permit_list)))
+ continue;
#if defined (FAILOVER_PROTOCOL)
- /* Peer_has_leases just says that we found at least one free lease.
- If no free lease is returned, the caller can deduce that this
- means the peer is hogging all the free leases, so we can print
- a better error message. */
-
- /* XXX Do we need code here to ignore PEER_IS_OWNER and just check
- XXX tstp if we're in, e.g., PARTNER_DOWN? Where do we deal with
- XXX CONFLICT_DETECTED, et al? */
- /* XXX This should be handled by the lease binding "state machine" -
- XXX that is, when we get here, if a lease could be allocated, it
- XXX will have the correct binding state so that the following code
- XXX will result in its being allocated. */
- /* Skip to the most expired lease in the pool that is not owned by a
- failover peer. */
- if (pool -> failover_peer) {
- if (pool -> failover_peer -> i_am == primary) {
- if (pool -> backup)
- *peer_has_leases = 1;
- lease = pool -> free;
- if (!lease)
- lease = pool -> abandoned;
- } else {
+ /* Peer_has_leases just says that we found at least one
+ free lease. If no free lease is returned, the caller
+ can deduce that this means the peer is hogging all the
+ free leases, so we can print a better error message. */
+ /* XXX Do we need code here to ignore PEER_IS_OWNER and
+ * XXX just check tstp if we're in, e.g., PARTNER_DOWN?
+ * XXX Where do we deal with CONFLICT_DETECTED, et al? */
+ /* XXX This should be handled by the lease binding "state
+ * XXX machine" - that is, when we get here, if a lease
+ * XXX could be allocated, it will have the correct
+ * XXX binding state so that the following code will
+ * XXX result in its being allocated. */
+ /* Skip to the most expired lease in the pool that is not
+ * owned by a failover peer. */
+ if (pool -> failover_peer) {
+ if (pool -> failover_peer -> i_am == primary) {
+ if (pool -> backup)
+ *peer_has_leases = 1;
+ candl = pool -> free;
+ if (!candl)
+ candl = pool -> abandoned;
+ } else {
+ if (pool -> free)
+ *peer_has_leases = 1;
+ candl = pool -> backup;
+ }
+ } else
+#endif
+ {
if (pool -> free)
- *peer_has_leases = 1;
- lease = pool -> backup;
+ candl = pool -> free;
+ else
+ candl = pool -> abandoned;
}
- } else
-#endif
- {
- if (pool -> free)
- lease = pool -> free;
- else
- lease = pool -> abandoned;
- }
-
- /* If there are no leases in the pool that have
- expired, try the next one. */
- if (!lease || lease -> ends > cur_time)
- return allocate_lease (lp, packet,
- pool -> next, peer_has_leases);
-
- /* If we find an abandoned lease, and no other lease qualifies
- better, take it. */
- /* XXX what if there are non-abandoned leases that are younger
- XXX than this? Shouldn't we hunt for those here? */
- if (lease -> binding_state == FTS_ABANDONED) {
- /* If we already have a non-abandoned lease that we didn't
- love, but that's okay, don't reclaim the abandoned lease. */
- if (*lp)
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
- if (!allocate_lease (lp, packet,
- pool -> next, peer_has_leases)) {
- log_error ("Reclaiming abandoned IP address %s.",
- piaddr (lease -> ip_addr));
- lease_reference (lp, lease, MDL);
+
+ if (!candl || (candl -> ends > cur_time))
+ continue;
+
+ if (!lease) {
+ lease = candl;
+ continue;
}
- return 1;
+
+ if ((lease -> binding_state == FTS_ABANDONED) &&
+ ((candl -> binding_state != FTS_ABANDONED) ||
+ (candl -> ends < lease -> ends))) {
+ lease = candl;
+ continue;
+ } else if (candl -> binding_state == FTS_ABANDONED)
+ continue;
+
+ if ((lease -> uid_len || lease -> hardware_addr.hlen) &&
+ ((!candl -> uid_len && !candl -> hardware_addr.hlen) ||
+ (candl -> ends < lease -> ends))) {
+ lease = candl;
+ continue;
+ } else if (candl -> uid_len || candl -> hardware_addr.hlen)
+ continue;
+
+ if (candl -> ends < lease -> ends)
+ lease = candl;
}
- /* If there's a lease we could take, but it had previously been
- allocated to a different client, try for a virgin lease before
- stealing it. */
- if (lease -> uid_len || lease -> hardware_addr.hlen) {
- /* If we're already in that boat, no need to consider
- allocating this particular lease. */
- if (*lp)
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
+ if (lease) {
+ if (lease -> binding_state == FTS_ABANDONED)
+ log_error ("Reclaiming abandoned lease %s.",
+ piaddr (lease -> ip_addr));
- allocate_lease (lp, packet, pool -> next, peer_has_leases);
- if (*lp)
- return 1;
+ lease_reference (lp, lease, MDL);
+ return 1;
}
- lease_reference (lp, lease, MDL);
- return 1;
+ return 0;
}
/* Determine whether or not a permit exists on a particular permit list
diff --git a/server/dhcpd.8 b/server/dhcpd.8
index 4475a8b6..9b9fdc84 100644
--- a/server/dhcpd.8
+++ b/server/dhcpd.8
@@ -1,41 +1,34 @@
.\" dhcpd.8
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcpd.8,v 1.21 2002/05/27 03:53:16 murray Exp $
+.\" $Id: dhcpd.8,v 1.22 2005/03/17 20:15:27 dhankins Exp $
.\"
.TH dhcpd 8
.SH NAME
@@ -83,7 +76,7 @@ dhcpd - Dynamic Host Configuration Protocol Server
]
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Server, dhcpd, implements the
+The Internet Systems Consortium DHCP Server, dhcpd, implements the
Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap
Protocol (BOOTP). DHCP allows hosts on a TCP/IP network to request
and be assigned IP addresses, and also to discover information about
@@ -175,7 +168,7 @@ broadcasts may be specified on the command line. This should be done
on systems where dhcpd is unable to identify non-broadcast interfaces,
but should not be required on other systems. If no interface names
are specified on the command line dhcpd will identify all network
-interfaces which are up, elimininating non-broadcast interfaces if
+interfaces which are up, eliminating non-broadcast interfaces if
possible, and listen for DHCP broadcasts on each interface.
.PP
If dhcpd should listen on a port other than the standard (port 67),
@@ -240,7 +233,7 @@ your existing lease file with its test data. The DHCP server will
refuse to operate in playback mode unless you specify an alternate
lease file.
.SH CONFIGURATION
-The syntax of the dhcpd.conf(5) file is discussed seperately. This
+The syntax of the dhcpd.conf(5) file is discussed separately. This
section should be used as an overview of the configuration process,
and the dhcpd.conf(5) documentation should be consulted for detailed
reference information.
@@ -256,7 +249,7 @@ support might look like this:
.sp 1
subnet 239.252.197.0 netmask 255.255.255.0 {
range 239.252.197.10 239.252.197.250;
- }
+ }
.fi
.PP
Multiple address ranges may be specified like this:
@@ -296,7 +289,7 @@ to the subnet command:
range 239.252.197.10 239.252.197.107;
default-lease-time 600;
max-lease-time 7200;
- |
+ }
.fi
.PP
This particular subnet declaration specifies a default lease time of
@@ -334,7 +327,7 @@ These options can be specified on a per-subnet basis, and, for BOOTP
clients, also on a per-client basis. In the event that a BOOTP
client declaration specifies options that are also specified in its
subnet declaration, the options specified in the client declaration
-take precedence. An reasonably complete DHCP configuration might
+take precedence. A reasonably complete DHCP configuration might
look something like this:
.nf
.sp 1
@@ -734,9 +727,8 @@ dhclient(8), dhcrelay(8), dhcpd.conf(5), dhcpd.leases(5)
.SH AUTHOR
.B dhcpd(8)
was originally written by Ted Lemon under a contract with Vixie Labs.
-Funding for this project was provided by the Internet Software
+Funding for this project was provided by Internet Systems
Consortium. Version 3 of the DHCP server was funded by Nominum, Inc.
-Information about the Internet Software Consortium is available at
-.B http://www.isc.org/isc\fR.
-Information about Nominum and support contracts for DHCP and BIND can
-be found at \fBhttp://www.nominum.com\fR.
+Information about Internet Systems Consortium is available at
+.B http://www.isc.org/\fR.
+Information about Nominum can be found at \fBhttp://www.nominum.com/\fR.
diff --git a/server/dhcpd.c b/server/dhcpd.c
index 293c27fc..8f2c86ae 100644
--- a/server/dhcpd.c
+++ b/server/dhcpd.c
@@ -3,39 +3,30 @@
DHCP Server Daemon. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,14 +34,14 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhcpd.c,v 1.116 2001/06/27 00:31:09 mellon Exp $ Copyright 1995-2001 Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.117 2005/03/17 20:15:27 dhankins Exp $ Copyright 2004-2005 Internet Systems Consortium.";
#endif
static char copyright[] =
-"Copyright 1995-2001 Internet Software Consortium.";
+"Copyright 2004-2005 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Server";
-static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
+static char message [] = "Internet Systems Consortium DHCP Server";
+static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
#include "dhcpd.h"
#include "version.h"
@@ -58,8 +49,6 @@ static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
static void usage PROTO ((void));
-TIME cur_time;
-
struct iaddr server_identifier;
int server_identifier_matched;
@@ -388,8 +377,12 @@ int main (argc, argv, envp)
#if defined (TRACING)
trace_init (set_time, MDL);
- if (traceoutfile)
- trace_begin (traceoutfile, MDL);
+ if (traceoutfile) {
+ result = trace_begin (traceoutfile, MDL);
+ if (result != ISC_R_SUCCESS)
+ log_fatal ("Unable to begin trace: %s",
+ isc_result_totext (result));
+ }
interface_trace_setup ();
parse_trace_setup ();
trace_srandom = trace_type_register ("random-seed", (void *)0,
@@ -484,7 +477,7 @@ int main (argc, argv, envp)
}
trace_file_replay (traceinfile);
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
free_everything ();
omapi_print_dmalloc_usage_by_caller ();
@@ -547,22 +540,24 @@ int main (argc, argv, envp)
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
status = read (i, pbuf, (sizeof pbuf) - 1);
close (i);
- pbuf [status] = 0;
- pid = atoi (pbuf);
-
- /* If the previous server process is not still running,
- write a new pid file immediately. */
- if (pid && (pid == getpid() || kill (pid, 0) < 0)) {
- unlink (path_dhcpd_pid);
- if ((i = open (path_dhcpd_pid,
- O_WRONLY | O_CREAT, 0644)) >= 0) {
- sprintf (pbuf, "%d\n", (int)getpid ());
- write (i, pbuf, strlen (pbuf));
- close (i);
- pidfilewritten = 1;
- }
- } else
- log_fatal ("There's already a DHCP server running.");
+ if (status > 0) {
+ pbuf [status] = 0;
+ pid = atoi (pbuf);
+
+ /* If the previous server process is not still running,
+ write a new pid file immediately. */
+ if (pid && (pid == getpid() || kill (pid, 0) < 0)) {
+ unlink (path_dhcpd_pid);
+ if ((i = open (path_dhcpd_pid,
+ O_WRONLY | O_CREAT, 0644)) >= 0) {
+ sprintf (pbuf, "%d\n", (int)getpid ());
+ write (i, pbuf, strlen (pbuf));
+ close (i);
+ pidfilewritten = 1;
+ }
+ } else
+ log_fatal ("There's already a DHCP server running.");
+ }
}
/* If we were requested to log to stdout on the command line,
@@ -774,7 +769,7 @@ void postconf_initialization (int quiet)
}
} else {
log_info ("%s", "");
- log_error ("** You must add a ddns-update-style %s%s.",
+ log_error ("** You must add a global ddns-update-style %s%s.",
"statement to ", path_dhcpd_conf);
log_error (" To get the same behaviour as in 3.0b2pl11 %s",
"and previous");
@@ -1129,7 +1124,7 @@ static isc_result_t dhcp_io_shutdown_countdown (void *vlp)
dhcp_failover_set_state (state, recover);
}
}
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
free_everything ();
omapi_print_dmalloc_usage_by_caller ();
@@ -1138,10 +1133,10 @@ static isc_result_t dhcp_io_shutdown_countdown (void *vlp)
}
#else
if (shutdown_state == shutdown_done) {
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
- free_everything ();
- omapi_print_dmalloc_usage_by_caller ();
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
+ defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
+ free_everything ();
+ omapi_print_dmalloc_usage_by_caller ();
#endif
exit (0);
}
diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5
index 96c453ba..1c2df1f2 100644
--- a/server/dhcpd.conf.5
+++ b/server/dhcpd.conf.5
@@ -1,41 +1,34 @@
.\" dhcpd.conf.5
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcpd.conf.5,v 1.66 2002/05/27 03:53:18 murray Exp $
+.\" $Id: dhcpd.conf.5,v 1.67 2005/03/17 20:15:27 dhankins Exp $
.\"
.TH dhcpd.conf 5
.SH NAME
@@ -43,7 +36,7 @@ dhcpd.conf - dhcpd configuration file
.SH DESCRIPTION
The dhcpd.conf file contains configuration information for
.IR dhcpd,
-the Internet Software Consortium DHCP Server.
+the Internet Systems Consortium DHCP Server.
.PP
The dhcpd.conf file is a free-form ASCII text file. It is parsed by
the recursive-descent parser built into dhcpd. The file may contain
@@ -67,9 +60,9 @@ group of declarations. In any group of parameters and declarations,
all parameters must be specified before any declarations which depend
on those parameters may be specified.
.PP
-Declarations about network topology include the
- \fIshared-network\fR and the \fIsubnet\fR
-declarations. If clients on a subnet are to be assigned addresses
+Declarations about network topology include the \fIshared-network\fR
+and the \fIsubnet\fR declarations. If clients on a subnet are to be
+assigned addresses
dynamically, a \fIrange\fR declaration must appear within the
\fIsubnet\fR declaration. For clients with statically assigned
addresses, or for installations where only known clients will be
@@ -118,10 +111,10 @@ used.
.PP
When dhcpd tries to find a \fIhost\fR declaration for a client, it
first looks for a \fIhost\fR declaration which has a
-\fIfixed-address\fR parameter which matches the subnet or shared
-network on which the client is booting. If it doesn't find any such
-entry, it then tries to find an entry which has no \fIfixed-address\fR
-parameter.
+\fIfixed-address\fR declaration that lists an IP address that is valid
+for the subnet or shared network on which the client is booting. If
+it doesn't find any such entry, it tries to find an entry which has
+no \fIfixed-address\fR declaration.
.SH EXAMPLES
.PP
A typical dhcpd.conf file will look something like this:
@@ -226,7 +219,7 @@ DHCP protocol (for example, server-name and filename).
.PP
In Figure 1, each host had \fIhost-specific parameters\fR. These
could include such things as the \fIhostname\fR option, the name of a
-file to upload (the \fIfilename parameter) and the address of the
+file to upload (the \fIfilename\fR parameter) and the address of the
server from which to upload the file (the \fInext-server\fR
parameter). In general, any parameter can appear anywhere that
parameters are allowed, and will be applied according to the scope in
@@ -289,7 +282,7 @@ subnet 10.0.0.0 netmask 255.255.255.0 {
option domain-name-servers bogus.example.com;
max-lease-time 300;
range 10.0.0.200 10.0.0.253;
- allow unknown clients;
+ allow unknown-clients;
}
# Known clients get this pool.
@@ -297,7 +290,7 @@ subnet 10.0.0.0 netmask 255.255.255.0 {
option domain-name-servers ns1.example.com, ns2.example.com;
max-lease-time 28800;
range 10.0.0.5 10.0.0.199;
- deny unknown clients;
+ deny unknown-clients;
}
}
.fi
@@ -337,13 +330,14 @@ attached and the server is authoritative for that network segment, in
which case the server will send a DHCPNAK even though it doesn't know
about the address.
.PP
-There may be a host declaration matching the client's identification,
-and that host declaration contains a fixed-address declaration that is
-valid for the network segment to which the client is connected. In
-this case, the DHCP server will never do dynamic address allocation.
-In this case, the client is \fIrequired\fB to take the address
-specified in the host declaration. If the client is requesting some
-other address, the server will respond with a DHCPNAK.
+There may be a host declaration matching the client's identification.
+If that host declaration contains a fixed-address declaration that
+lists an IP address that is valid for the network segment to which the
+client is connected. In this case, the DHCP server will never do
+dynamic address allocation. In this case, the client is \fIrequired\fR
+to take the address specified in the host declaration. If the
+client sends a DHCPREQUEST for some other address, the server will respond
+with a DHCPNAK.
.PP
When the DHCP server allocates a new address for a client (remember,
this only happens if the client has sent a DHCPDISCOVER), it first
@@ -376,6 +370,15 @@ immediately allocated to the client. If the address is available for
allocation but has been previously assigned to a different client, the
server will keep looking in hopes of finding an address that has never
before been assigned to a client.
+.PP
+The DHCP server generates the list of available IP addresses from a
+hash table. This means that the addresses are not sorted in any
+particular order, and so it is not possible to predict the order in
+which the DHCP server will allocate IP addresses. Users of previous
+versions of the ISC DHCP server may have become accustomed to the DHCP
+server allocating IP addresses in ascending order, but this is no
+longer possible, and there is no way to configure this behavior with
+version 3 of the ISC DHCP server.
.SH IP ADDRESS CONFLICT PREVENTION
The DHCP server checks IP addresses to see if they are in use before
allocating them to clients. It does this by sending an ICMP Echo
@@ -427,7 +430,7 @@ for allocation, and begin to reuse them. This is called putting the
server into the PARTNER-DOWN state.
.PP
You can put the server into the PARTNER-DOWN state either by using the
-.B omshell (8)
+.B omshell (1)
command or by stopping the server, editing the last peer state
declaration in the lease file, and restarting the server. If you use
this last method, be sure to leave the date and time of the start of
@@ -501,13 +504,24 @@ failover. You do not have to do failover for all pools on a given
network segment. You must not tell one server it's doing failover
on a particular address pool and tell the other it is not. You must
not have any common address pools on which you are not doing
-failover.
+failover. A pool declaration that utilizes failover would look like this:
+.PP
+.nf
+pool {
+ failover peer "foo";
+ deny dynamic bootp clients;
+ \fIpool specific parameters\fR
+};
+.fi
+.PP
+Dynamic BOOTP leases are not compatible with failover, and, as such,
+you need to disallow BOOTP in pools that you are using failover for.
.PP
The server currently does very little sanity checking, so if you
configure it wrong, it will just fail in odd ways. I would recommend
therefore that you either do failover or don't do failover, but don't
do any mixed pools. Also, use the same master configuration file for
-both servers, and have a seperate file that contains the peer
+both servers, and have a separate file that contains the peer
declaration and includes the master file. This will help you to avoid
configuration mismatches. As our implementation evolves, this will
become less of a problem. A basic sample dhcpd.conf file for a
@@ -523,8 +537,7 @@ failover peer "foo" {
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
- hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
- 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
+ split 128;
load balance max seconds 3;
}
@@ -553,10 +566,10 @@ statement
.PP
.B address \fIaddress\fR\fB;\fR
.PP
-The \fBaddress\fR statement declares the IP address on which the
-server should listen for connections from its failover peer, and also
-the value to use for the DHCP Failover Protocol server identifier.
-Because this value is used as an identifier, it may not be omitted.
+The \fBaddress\fR statement declares the IP address or DNS name on which the
+server should listen for connections from its failover peer, and also the
+value to use for the DHCP Failover Protocol server identifier. Because this
+value is used as an identifier, it may not be omitted.
.RE
.PP
The
@@ -566,8 +579,8 @@ statement
.PP
.B peer address \fIaddress\fR\fB;\fR
.PP
-The \fBpeer address\fR statement declares the IP address to which the
-server should connect to reach its failover peer for failover
+The \fBpeer address\fR statement declares the IP address or DNS name to
+which the server should connect to reach its failover peer for failover
messages.
.RE
.PP
@@ -661,8 +674,8 @@ secondary for the purposes of load balancing. Whenever a client
makes a DHCP request, the DHCP server runs a hash on the client
identification. If the hash comes out to less than the split value,
the primary answers. If it comes out to equal to or more than the
-split, the secondary answers. This value should generally be set to
-128, and can only be configured on the primary.
+split, the secondary answers. The only meaningful value is 128, and can
+only be configured on the primary.
.RE
.PP
The
@@ -670,7 +683,7 @@ The
statement
.RS 0.25i
.PP
-.B hba \fIcolon-seperated-hex-list\fB;\fR
+.B hba \fIcolon-separated-hex-list\fB;\fR
.PP
The hba statement specifies the split between the primary and
secondary as a bitmap rather than a cutoff, which theoretically allows
@@ -681,6 +694,11 @@ for such fine-grained control, however. An example hba statement:
hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
.fi
+.PP
+This is equivalent to a \fBsplit 128;\fR statement. You must only have
+\fBsplit\fR or \fBhba\fR defined, never both. For most cases, the
+fine-grained control that \fBhba\fR offers isn't necessary, and \fBsplit\fR
+should be used. As such, the use of \fBhba\fR is deprecated.
.RE
.PP
The
@@ -702,8 +720,8 @@ failover peer will take over its client load automatically as the
clients retry.
.RE
.SH CLIENT CLASSING
-Clients can be seperated into classes, and treated differently
-depending on what class they are in. This seperation can be done
+Clients can be separated into classes, and treated differently
+depending on what class they are in. This separation can be done
either with a conditional statement, or with a match statement within
the class declaration. It is possible to specify a limit on the
total number of clients within a particular class or subclass that may
@@ -718,11 +736,13 @@ class "ras-clients" {
match if substring (option dhcp-client-identifier, 1, 3) = "RAS";
}
.fi
+.PP
Note that whether you use matching expressions or add statements (or
both) to classify clients, you must always write a class declaration
for any class that you use. If there will be no match statement and
no in-scope statements for a class, the declaration should look like
this:
+.PP
.nf
class "ras-clients" {
}
@@ -898,6 +918,16 @@ to do dns updates. This can be done with the
.I ddns-update-style
configuration parameter.
.SH THE AD-HOC DNS UPDATE SCHEME
+The ad-hoc Dynamic DNS update scheme is
+.B now deprecated
+and
+.B
+does not work.
+In future releases of the ISC DHCP server, this scheme will not likely be
+available. The interim scheme works, allows for failover, and should now be
+used. The following description is left here for informational purposes
+only.
+.PP
The ad-hoc Dynamic DNS update scheme implemented in this version of
the ISC DHCP server is a prototype design, which does not
have much to do with the standard update method that is being
@@ -1127,10 +1157,13 @@ zone 17.127.10.in-addr.arpa. {
}
.fi
.PP
+The \fIprimary\fR statement specifies the IP address of the name
+server whose zone information is to be updated.
+.PP
Note that the zone declarations have to correspond to authority
records in your name server - in the above example, there must be an
SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For
-example, if there were a subdoman "foo.example.org" with no seperate
+example, if there were a subdomain "foo.example.org" with no separate
SOA, you could not write a zone declaration for "foo.example.org."
Also keep in mind that zone names in your DHCP configuration should end in a
"."; this is the preferred syntax. If you do not end your zone name in a
@@ -1144,11 +1177,14 @@ dnssec-keygen. The version that comes with BIND 9 is likely to produce a
substantially more random key, so we recommend you use that one even
if you are not using BIND 9 as your DNS server. If you are using BIND 9's
dnssec-keygen, the above key would be created as follows:
+.PP
.nf
dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER
-
+.fi
+.PP
If you are using the BIND 8 dnskeygen program, the following command will
generate a key as seen above:
+.PP
.nf
dnskeygen -H 128 -u -c -n DHCP_UPDATER
.fi
@@ -1205,6 +1241,18 @@ will have to start out by copying this code into your dhcpd.conf file
and modifying it.
.SH REFERENCE: DECLARATIONS
.PP
+.B The
+.I include
+.B statement
+.PP
+.nf
+ \fBinclude\fR \fI"filename"\fR\fB;\fR
+.fi
+.PP
+The \fIinclude\fR statement is used to read in a named file, and process
+the contents of that file as though it were entered in place of the
+include statement.
+.PP
.B The
.I shared-network
.B statement
@@ -1297,33 +1345,33 @@ single address, \fIhigh-address\fR can be omitted.
\fB}\fR
.fi
.PP
-There must be at least one
-.B host
-statement for every BOOTP client that is to be served.
+The
.B host
-statements may also be specified for DHCP clients, although this is
-not required unless booting is only enabled for known hosts.
+declaration provides a scope in which to provide configuration information about
+a specific client, and also provides a way to assign a client a fixed address.
+The host declaration provides a way for the DHCP server to identify a DHCP or
+BOOTP client, and also a way to assign the client a static IP address.
.PP
If it is desirable to be able to boot a DHCP or BOOTP
client on more than one subnet with fixed addresses, more than one
address may be specified in the
.I fixed-address
-parameter, or more than one
+declaration, or more than one
.B host
statement may be specified.
.PP
If client-specific boot parameters must change based on the network
to which the client is attached, then multiple
.B host
-statements should
+declaration should
be used.
.PP
If a client is to be booted using a fixed address if it's
possible, but should be allocated a dynamic address otherwise, then a
.B host
-statement must be specified without a
+declaration must be specified without a
.B fixed-address
-clause.
+declaration.
.I hostname
should be a name identifying the host. If a \fIhostname\fR option is
not specified for the host, \fIhostname\fR is used.
@@ -1338,6 +1386,15 @@ address supplied by the client. BOOTP clients do not normally
provide a \fIdhcp-client-identifier\fR, so the hardware address must
be used for all clients that may boot using the BOOTP protocol.
.PP
+Please be aware that
+.B only
+the \fIdhcp-client-identifier\fR option and the hardware address can be
+used to match a host declaration. For example, it is not possible to match
+a host declaration to a \fIhost-name\fR option. This is because the
+host-name option cannot be guaranteed to be unique for any given client,
+whereas both the hardware address and \fIdhcp-client-identifier\fR option
+are at least theoretically guaranteed to be unique to a given client.
+.PP
.B The
.I group
.B statement
@@ -1387,6 +1444,11 @@ or not to dynamically assign addresses to unknown clients. Dynamic
address assignment to unknown clients is \fBallow\fRed by default.
An unknown client is simply a client that has no host declaration.
.PP
+The use of this option is now \fIdeprecated\fR. If you are trying to
+restrict access on your network to known clients, you should use \fBdeny
+unknown-clients;\fR inside of your address pool, as described under the
+heading ALLOW AND DENY WITHIN POOL DECLARAIONS.
+.PP
.B The
.I bootp
.B keyword
@@ -1399,6 +1461,11 @@ The \fBbootp\fR flag is used to tell dhcpd whether
or not to respond to bootp queries. Bootp queries are \fBallow\fRed
by default.
.PP
+This option does not satisfy the requirement of failover peers for denying
+dynamic bootp clients. The \fBdeny dynamic bootp clients;\fR option should
+be used instead. See the ALLOW AND DENY WITHIN POOL DECLARATIONS section
+of this man page for more details.
+.PP
.B The
.I booting
.B keyword
@@ -1411,7 +1478,8 @@ The \fBbooting\fR flag is used to tell dhcpd whether or not to respond
to queries from a particular client. This keyword only has meaning
when it appears in a host declaration. By default, booting is
\fBallow\fRed, but if it is disabled for a particular client, then
-that client will not be able to get and address from the DHCP server.
+that client will not be able to get an address from the DHCP server.
+.PP
.B The
.I duplicates
.B keyword
@@ -1434,6 +1502,7 @@ discarded by the server, even if the UID is not the same. This is a
violation of the DHCP protocol, but can prevent clients whose client
identifiers change regularly from holding many leases at the same time.
By default, duplicates are \fBallow\fRed.
+.PP
.B The
.I declines
.B keyword
@@ -1457,6 +1526,7 @@ The \fBdeclines\fR flag tells the DHCP server whether or not to honor
DHCPDECLINE messages. If it is set to \fBdeny\fR or \fBignore\fR in
a particular scope, the DHCP server will not respond to DHCPDECLINE
messages.
+.PP
.B The
.I client-updates
.B keyword
@@ -1500,14 +1570,14 @@ ALLOCATION section.
When declaring permit lists for address allocation pools, the
following syntaxes are recognized following the allow or deny keywords:
.PP
- \fBknown clients;\fR
+ \fBknown-clients;\fR
.PP
If specified, this statement either allows or prevents allocation from
this pool to any client that has a host declaration (i.e., is known).
A client is known if it has a host declaration in \fIany\fR scope, not
just the current scope.
.PP
- \fBunknown clients;\fR
+ \fBunknown-clients;\fR
.PP
If specified, this statement either allows or prevents allocation from
this pool to any client that has no host declaration (i.e., is not
@@ -1556,11 +1626,12 @@ set the broadcast bit in the flags field of the BOOTP message header.
Unfortunately, some DHCP and BOOTP clients do not do this, and
therefore may not receive responses from the DHCP server. The DHCP
server can be made to always broadcast its responses to clients by
-setting this flag to 'on' for the relevant scope. To avoid creating
-excess broadcast traffic on your network, we recommend that you
-restrict the use of this option to as few clients as possible. For
-example, the Microsoft DHCP client is known not to have this problem,
-as are the OpenTransport and ISC DHCP clients.
+setting this flag to 'on' for the relevant scope; relevant scopes would be
+inside a conditional statement, as a parameter for a class, or as a parameter
+for a host declaration. To avoid creating excess broadcast traffic on your
+network, we recommend that you restrict the use of this option to as few
+clients as possible. For example, the Microsoft DHCP client is known not
+to have this problem, as are the OpenTransport and ISC DHCP clients.
.RE
.PP
The
@@ -1627,7 +1698,7 @@ and not others.
The \fIboot-unknown-clients\fR statement
.RS 0.25i
.PP
-.B boot-unknown-clients \fIname\fB;\fR
+.B boot-unknown-clients \fIflag\fB;\fR
.PP
If the \fIboot-unknown-clients\fR statement is present and has a value
of \fIfalse\fR or \fIoff\fR, then clients for which there is no
@@ -1722,6 +1793,26 @@ time.
.RE
.PP
The
+.I do-forward-updates
+statement
+.RS 0.25i
+.PP
+.B do-forward-updates \fIflag\fB;\fR
+.PP
+The \fIdo-forward-updates\fR statement instructs the DHCP server as
+to whether it should attempt to update a DHCP client's A record
+when the client acquires or renews a lease. This statement has no
+effect unless DNS updates are enabled and \fBddns-update-style\fR is
+set to \fBinterim\fR. Forward updates are enabled by default. If
+this statement is used to disable forward updates, the DHCP server
+will never attempt to update the client's A record, and will only ever
+attempt to update the client's PTR record if the client supplies an
+FQDN that should be placed in the PTR record using the fqdn option.
+If forward updates are enabled, the DHCP server will still honor the
+setting of the \fBclient-updates\fR flag.
+.RE
+.PP
+The
.I dynamic-bootp-lease-cutoff
statement
.RS 0.25i
@@ -1787,21 +1878,21 @@ the client can be expected to use to load the file.
.PP
The
.I fixed-address
-statement
+declaration
.RS 0.25i
.PP
.B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR
.PP
-The \fIfixed-address\fR statement is used to assign one or more fixed
+The \fIfixed-address\fR declaration is used to assign one or more fixed
IP addresses to a client. It should only appear in a \fIhost\fR
declaration. If more than one address is supplied, then when the
-client boots, it will be assigned the address which corresponds to the
+client boots, it will be assigned the address that corresponds to the
network on which it is booting. If none of the addresses in the
-\fIfixed-address\fR statement are on the network on which the client
-is booting, that client will not match the \fIhost\fR declaration
-containing that \fIfixed-address\fR statement. Each \fIaddress\fR
-should be either an IP address or a domain name which resolves to one
-or more IP addresses.
+\fIfixed-address\fR statement are valid for the network to which the client
+is connected, that client will not match the \fIhost\fR declaration
+containing that \fIfixed-address\fR declaration. Each \fIaddress\fR
+in the \fIfixed-address\fR declaration should be either an IP address or
+a domain name that resolves to one or more IP addresses.
.RE
.PP
The
@@ -1842,7 +1933,7 @@ hardware type (and others) would also be desirable.
The
.I hardware-address
should be a set of hexadecimal octets (numbers from 0 through ff)
-seperated by colons. The \fIhardware\fR statement may also be used
+separated by colons. The \fIhardware\fR statement may also be used
for DHCP clients.
.RE
.PP
@@ -1872,6 +1963,34 @@ the UDP port specified in \fIport\fR, rather than on port 67.
.RE
.PP
The
+.I local-address
+statement
+.RS 0.25i
+.PP
+.B local-address \fIaddress\fB;\fR
+.PP
+This statement causes the DHCP server to listen for DHCP requests sent
+to the specified \fIaddress\fR, rather than requests sent to all addresses.
+Since serving directly attached DHCP clients implies that the server must
+respond to requests sent to the all-ones IP address, this option cannot be
+used if clients are on directly attached networks...it is only realistically
+useful for a server whose only clients are reached via unicasts, such as via
+DHCP relay agents.
+.PP
+Note: This statement is only effective if the server was compiled using
+the USE_SOCKETS #define statement, which is default on a small number of
+operating systems, and must be explicitly chosen at compile-time for all
+others. You can be sure if your server is compiled with USE_SOCKETS if
+you see lines of this format at startup:
+.PP
+ Listening on Socket/eth0
+.PP
+Note also that since this bind()s all DHCP sockets to the specified
+address, that only one address may be supported in a daemon at a given
+time.
+.RE
+.PP
+The
.I log-facility
statement
.RS 0.25i
@@ -2042,10 +2161,28 @@ ICMP Echo response has been heard, it assigns the address. If a
response \fIis\fR heard, the lease is abandoned, and the server does
not respond to the client.
.PP
-This \fIping check\fR introduces a one-second delay in responding to
-DHCPDISCOVER messages, which can be a problem for some clients. The
-ping-check configuration parameter can be used to control checking -
-if its value is false, no ping check is done.
+This \fIping check\fR introduces a default one-second delay in responding
+to DHCPDISCOVER messages, which can be a problem for some clients. The
+default delay of one second may be configured using the ping-timeout
+parameter. The ping-check configuration parameter can be used to control
+checking - if its value is false, no ping check is done.
+.RE
+.PP
+The
+.I ping-timeout
+statement
+.RS 0.25i
+.PP
+.B ping-timeout
+.I seconds\fR\fB;\fR
+.PP
+If the DHCP server determined it should send an ICMP echo request (a
+\fIping\fR) because the ping-check statement is true, ping-timeout allows
+you to configure how many seconds the DHCP server should wait for an
+ICMP Echo response to be heard, if no ICMP Echo response has been received
+before the timeout expires, it assigns the address. If a response \fIis\fR
+heard, the lease is abandoned, and the server does not respond to the client.
+If no value is set, ping-timeout defaults to 1 second.
.RE
.PP
The
@@ -2108,7 +2245,7 @@ on an ad hoc basis, it is quite possible that one vendor's DHCP client
might use the same option code that another vendor's client uses, for
different purposes. The \fIsite-option-space\fR option can be used
to assign a different set of site-specific options for each such
-vendor, using conditional evaluation (see \fIdhcp-eval.5\fR for
+vendor, using conditional evaluation (see \fBdhcp-eval (5)\fR for
details).
.RE
.PP
@@ -2142,12 +2279,11 @@ the server will attempt a DNS update for that client each time the
client renews its lease, rather than only attempting an update when it
appears to be necessary. This will allow the DNS to heal from
database inconsistencies more easily, but the cost is that the DHCP
-server must do many more DNS updates. We do not recommend enabling
-this on large networks with the current DHCP server. This option
-only affects the behavior of the interim DNS update scheme,
-and has no effect on the ad-hoc DNS update scheme. If this
-parameter is not specified, or is false, the DHCP server will only
-update when the client information changes, the client gets a
+server must do many more DNS updates. We recommend leaving this option
+enabled, which is the default. This option only affects the behavior of
+the interim DNS update scheme, and has no effect on the ad-hoc DNS update
+scheme. If this parameter is not specified, or is true, the DHCP server
+will only update when the client information changes, the client gets a
different lease, or the client's lease expires.
.RE
.PP
@@ -2187,16 +2323,16 @@ hostname. So, for example,
use-host-decl-names on;
host joe {
- hardware ethernet 08:00:2b:4c:29:32;
- fixed-address joe.fugue.com;
+ hardware ethernet 08:00:2b:4c:29:32;
+ fixed-address joe.fugue.com;
}
}
is equivalent to
host joe {
- hardware ethernet 08:00:2b:4c:29:32;
- fixed-address joe.fugue.com;
+ hardware ethernet 08:00:2b:4c:29:32;
+ fixed-address joe.fugue.com;
option host-name "joe";
}
.fi
@@ -2238,7 +2374,7 @@ statement
.PP
The \fIvendor-option-space\fR parameter determines from what option
space vendor options are taken. The use of this configuration
-parameter is illustrated in the \fIdhcp-options(5)\fR manual page, in
+parameter is illustrated in the \fBdhcp-options(5)\fR manual page, in
the \fIVENDOR ENCAPSULATED OPTIONS\fR section.
.RE
.SH SETTING PARAMETER VALUES USING EXPRESSIONS
@@ -2272,8 +2408,8 @@ manual page.
dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhcpd.conf(5)
-was written by Ted Lemon <mellon@vix.com>
+was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
diff --git a/server/dhcpd.leases.5 b/server/dhcpd.leases.5
index 28dbecab..52e8dcdc 100644
--- a/server/dhcpd.leases.5
+++ b/server/dhcpd.leases.5
@@ -1,47 +1,40 @@
.\" dhcpd.leases.5
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of The Internet Software Consortium nor the names
-.\" of its contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
-.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
-.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" This software has been written for the Internet Software Consortium
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
+.\"
+.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
-.\" To learn more about the Internet Software Consortium, see
+.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcpd.leases.5,v 1.9 2002/05/27 03:53:19 murray Exp $
+.\" $Id: dhcpd.leases.5,v 1.10 2005/03/17 20:15:28 dhankins Exp $
.\"
.TH dhcpd.leases 5
.SH NAME
dhcpd.leases - DHCP client lease database
.SH DESCRIPTION
-The Internet Software Consortium DHCP Server keeps a persistent
+The Internet Systems Consortium DHCP Server keeps a persistent
database of leases that it has assigned. This database is a free-form
ASCII file containing a series of lease declarations. Every time a
lease is acquired, renewed or released, its new value is recorded at
@@ -92,7 +85,7 @@ can never be eliminated from the \fBdhcpd.leases\fR file.
.PP
.B lease \fIip-address\fB { \fIstatements...\fB }
.PP
-Each lease declaration include the single IP address that has been
+Each lease declaration includes the single IP address that has been
leased to the client. The statements within the braces define the
duration of the lease and to whom it is assigned.
.PP
@@ -136,7 +129,7 @@ actual date.
.PP
The hardware statement records the MAC address of the network
interface on which the lease will be used. It is specified as a
-series of hexadecimal octets, seperated by colons.
+series of hexadecimal octets, separated by colons.
.PP
.B uid \fIclient-identifier\fB;\fR
.PP
@@ -147,7 +140,7 @@ send one. Client identifiers are normally an ARP type (1 for
ethernet) followed by the MAC address, just like in the \fBhardware\fI
statement, but this is not required.
.PP
-The client identifier is recorded as a colon-seperated hexadecimal
+The client identifier is recorded as a colon-separated hexadecimal
list or as a quoted string. If it is recorded as a quoted string and
it contains one or more non-printable characters, those characters are
represented as octal escapes - a backslash character followed by three
@@ -232,7 +225,7 @@ record. The name to which the PTR record points will be either the
The \fBon\fI statement records a list of statements to execute if a
certain event occurs. The possible events that can occur for an
active lease are \fBrelease\fR and \fBexpiry\fR. More than one event
-can be specified - if so, the events are seperated by '|' characters.
+can be specified - if so, the events are separated by '|' characters.
.SH THE FAILOVER PEER STATE DECLARATION
The state of any failover peering arrangements is also recorded in the
lease file, using the \fBfailover peer\fR statement:
@@ -256,8 +249,8 @@ possible: \fBunknown-state\fR, \fBpartner-down\fR, \fBnormal\fR,
dhcpd(8), dhcp-options(5), dhcp-eval(5), dhcpd.conf(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhcpd(8)
-was written by Ted Lemon <mellon@vix.com>
+was written by Ted Lemon
under a contract with Vixie Labs. Funding
-for this project was provided by the Internet Software Consortium.
-Information about the Internet Software Consortium can be found at:
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at:
.B http://www.isc.org/
diff --git a/server/failover.c b/server/failover.c
index 6a094efe..c7b31936 100644
--- a/server/failover.c
+++ b/server/failover.c
@@ -3,39 +3,30 @@
Failover protocol support code... */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: failover.c,v 1.57 2001/08/10 10:50:49 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: failover.c,v 1.58 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -51,7 +42,6 @@ static char copyright[] =
#include <omapip/omapip_p.h>
#if defined (FAILOVER_PROTOCOL)
-static struct hash_table *failover_hash;
dhcp_failover_state_t *failover_states;
static isc_result_t do_a_failover_option (omapi_object_t *,
dhcp_failover_link_t *);
@@ -346,6 +336,36 @@ isc_result_t dhcp_failover_link_signal (omapi_object_t *h,
return ISC_R_SUCCESS;
}
+ if (!strcmp (name, "status")) {
+ if (link -> state_object) {
+ isc_result_t status;
+
+ status = va_arg(ap, isc_result_t);
+
+ if ((status == ISC_R_HOSTUNREACH) || (status == ISC_R_TIMEDOUT)) {
+ dhcp_failover_state_reference (&state,
+ link -> state_object, MDL);
+ link -> state = dhcp_flink_disconnected;
+
+ /* Make the transition. */
+ dhcp_failover_state_transition (link -> state_object,
+ "disconnect");
+
+ /* Start trying to reconnect. */
+#if defined (DEBUG_FAILOVER_TIMING)
+ log_info ("add_timeout +5 %s",
+ "dhcp_failover_reconnect");
+#endif
+ add_timeout (cur_time + 5, dhcp_failover_reconnect,
+ state,
+ (tvref_t)dhcp_failover_state_reference,
+ (tvunref_t)dhcp_failover_state_dereference);
+ }
+ dhcp_failover_state_dereference (&state, MDL);
+ }
+ return ISC_R_SUCCESS;
+ }
+
/* Not a signal we recognize? */
if (strcmp (name, "ready")) {
if (h -> inner && h -> inner -> type -> signal_handler)
@@ -476,7 +496,7 @@ isc_result_t dhcp_failover_link_signal (omapi_object_t *h,
badconnect:
/* XXX Send a refusal message first?
XXX Look in protocol spec for guidance. */
- log_error ("Failover CONNECT from %d.%d.%d.%d: %s",
+ log_error ("Failover CONNECT from %u.%u.%u.%u: %s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
@@ -1256,7 +1276,7 @@ isc_result_t dhcp_failover_state_signal (omapi_object_t *o,
link);
if (link -> imsg -> reject_reason) {
- log_error ("Failover CONNECT to %d.%d.%d.%d%s%s",
+ log_error ("Failover CONNECT to %u.%u.%u.%u%s%s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
@@ -1280,7 +1300,7 @@ isc_result_t dhcp_failover_state_signal (omapi_object_t *o,
errmsg = "unknown server";
reason = FTR_INVALID_PARTNER;
badconnectack:
- log_error ("Failover CONNECTACK from %d.%d.%d.%d: %s",
+ log_error ("Failover CONNECTACK from %u.%u.%u.%u: %s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
@@ -1353,7 +1373,7 @@ isc_result_t dhcp_failover_state_signal (omapi_object_t *o,
(tvunref_t)dhcp_failover_state_dereference);
} else if (link -> imsg -> type == FTM_DISCONNECT) {
if (link -> imsg -> reject_reason) {
- log_error ("Failover DISCONNECT from %d.%d.%d.%d%s%s",
+ log_error ("Failover DISCONNECT from %u.%u.%u.%u%s%s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
@@ -1583,7 +1603,6 @@ isc_result_t dhcp_failover_set_service_state (dhcp_failover_state_t *state)
if (state -> service_state != not_responding) {
switch (state -> partner.state) {
case partner_down:
- case recover:
state -> service_state = not_responding;
state -> nrr = " (recovering)";
break;
@@ -1812,7 +1831,6 @@ isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *state,
case unknown_state:
case normal:
case potential_conflict:
- case recover:
case recover_done:
case shut_down:
case paused:
@@ -1824,6 +1842,7 @@ isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *state,
case partner_down:
case communications_interrupted:
case resolution_interrupted:
+ case recover:
break;
}
}
@@ -1927,7 +1946,15 @@ isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *state,
XXX clever detection of when we should send an
XXX UPDREQALL message rather than an UPDREQ
XXX message. What to do, what to do? */
- dhcp_failover_send_update_request (state);
+ /* Currently when we enter recover state, no matter
+ * the reason, we send an UPDREQALL. So, it makes
+ * the most sense to stick to that until something
+ * better is done.
+ * Furthermore, we only went to send the update
+ * request if we are not in startup state.
+ */
+ if (state -> me.state == recover)
+ dhcp_failover_send_update_request_all (state);
break;
case shut_down:
@@ -2148,6 +2175,7 @@ int dhcp_failover_pool_rebalance (dhcp_failover_state_t *state)
binding_state_t peer_lease_state;
binding_state_t my_lease_state;
struct lease **lq;
+ int tenper;
if (state -> me.state != normal || state -> i_am == secondary)
return 0;
@@ -2175,11 +2203,16 @@ int dhcp_failover_pool_rebalance (dhcp_failover_state_t *state)
lq = &p -> backup;
}
- log_info ("pool %lx total %d free %d backup %d lts %d",
- (unsigned long)p, p -> lease_count,
- p -> free_leases, p -> backup_leases, lts);
+ tenper = (p -> backup_leases + p -> free_leases) / 10;
+ if (tenper == 0)
+ tenper = 1;
+ if (lts > tenper) {
+ log_info ("pool %lx %s total %d free %d %s %d lts %d",
+ (unsigned long)p,
+ (p -> shared_network ?
+ p -> shared_network -> name : ""), p -> lease_count,
+ p -> free_leases, "backup", p -> backup_leases, lts);
- if (lts > 1) {
lease_reference (&lp, *lq, MDL);
while (lp && lts) {
@@ -2214,7 +2247,6 @@ int dhcp_failover_pool_rebalance (dhcp_failover_state_t *state)
}
if (lts > 1) {
log_info ("lease imbalance - lts = %d", lts);
- leases_queued -= lts;
}
}
}
@@ -2228,9 +2260,9 @@ int dhcp_failover_pool_check (struct pool *pool)
{
int lts;
struct lease *lp;
+ int tenper;
if (!pool -> failover_peer ||
- pool -> failover_peer -> i_am == primary ||
pool -> failover_peer -> me.state != normal)
return 0;
@@ -2239,14 +2271,43 @@ int dhcp_failover_pool_check (struct pool *pool)
else
lts = (pool -> free_leases - pool -> backup_leases) / 2;
- log_info ("pool %lx total %d free %d backup %d lts %d",
- (unsigned long)pool, pool -> lease_count,
+ log_info ("pool %lx %s total %d free %d backup %d lts %d",
+ (unsigned long)pool,
+ pool -> shared_network ? pool -> shared_network -> name : "",
+ pool -> lease_count,
pool -> free_leases, pool -> backup_leases, lts);
- if (lts > 1) {
+ tenper = (pool -> backup_leases + pool -> free_leases) / 10;
+ if (tenper == 0)
+ tenper = 1;
+ if (lts > tenper) {
/* XXX What about multiple pools? */
- dhcp_failover_send_poolreq (pool -> failover_peer);
- return 1;
+ if (pool -> failover_peer -> i_am == secondary) {
+ /* Ask the primary to send us leases. */
+ dhcp_failover_send_poolreq (pool -> failover_peer);
+ return 1;
+ } else {
+ /* Figure out how many leases to skip on the backup
+ list. We skip the earliest leases on the list
+ to reduce the chance of trying to steal a lease
+ that the secondary is about to allocate. */
+ int i = pool -> backup_leases - lts;
+ log_info ("Taking %d leases from secondary.", lts);
+ for (lp = pool -> backup; lp; lp = lp -> next) {
+ /* Skip to the last leases on the free
+ list, because they are less likely
+ to already have been allocated. */
+ if (i)
+ --i;
+ else {
+ lp -> desired_binding_state = FTS_FREE;
+ dhcp_failover_queue_update (lp, 1);
+ --lts;
+ }
+ }
+ if (lts)
+ log_info ("failed to take %d leases.", lts);
+ }
}
return 0;
}
@@ -3053,7 +3114,7 @@ isc_result_t dhcp_failover_state_lookup (omapi_object_t **sp,
if (status == ISC_R_SUCCESS) {
for (s = failover_states; s; s = s -> next) {
unsigned l = strlen (s -> name);
- if (l == tv -> value -> u.buffer.len ||
+ if (l == tv -> value -> u.buffer.len &&
!memcmp (s -> name,
tv -> value -> u.buffer.value, l))
break;
@@ -3374,14 +3435,17 @@ failover_option_t *dhcp_failover_option_printf (unsigned code,
va_list va;
char tbuf [256];
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * function is used for formatting messages in the failover
+ * command channel. For now the safest thing is for
+ * overflow-truncation to cause a fatal log.
+ */
va_start (va, fmt);
-#if defined (HAVE_SNPRINTF)
- /* Presumably if we have snprintf, we also have
- vsnprintf. */
- vsnprintf (tbuf, sizeof tbuf, fmt, va);
-#else
- vsprintf (tbuf, fmt, va);
-#endif
+ if (vsnprintf (tbuf, sizeof tbuf, fmt, va) >= sizeof tbuf)
+ log_fatal ("%s: vsnprintf would truncate",
+ "dhcp_failover_make_option");
va_end (va);
return dhcp_failover_make_option (code, obuf, obufix, obufmax,
@@ -3398,9 +3462,9 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
unsigned size, count;
unsigned val;
u_int8_t *iaddr;
- unsigned ilen;
+ unsigned ilen = 0;
u_int8_t *bval;
- char *txt;
+ char *txt = NULL;
#if defined (DEBUG_FAILOVER_MESSAGES)
char tbuf [256];
#endif
@@ -3463,7 +3527,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
/* shouldn't get here. */
log_fatal ("bogus type in failover_make_option: %d",
info -> type);
- break;
+ return &null_failover_option;
}
}
@@ -3472,15 +3536,26 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
/* Allocate a buffer for the option. */
option.count = size;
option.data = dmalloc (option.count, MDL);
- if (!option.data)
+ if (!option.data) {
+ va_end (va);
return &null_failover_option;
+ }
/* Put in the option code and option length. */
putUShort (option.data, code);
putUShort (&option.data [2], size - 4);
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, " (%s<%d>", info -> name, option.count);
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * message may be sent over the failover command channel.
+ * For now the safest thing is for overflow-truncation to cause
+ * a fatal log.
+ */
+ if (snprintf (tbuf, sizeof tbuf, " (%s<%d>", info -> name,
+ option.count) >= sizeof tbuf)
+ log_fatal ("dhcp_failover_make_option: tbuf overflow");
failover_print (obuf, obufix, obufmax, tbuf);
#endif
@@ -3490,6 +3565,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
for (i = 0; i < count; i++) {
val = va_arg (va, unsigned);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
@@ -3504,12 +3580,14 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
dfree (option.data, MDL);
log_error ("IP addrlen=%d, should be 4.",
ilen);
+ va_end (va);
return &null_failover_option;
}
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, " %u.%u.%u.%u", iaddr [0], iaddr [1],
- iaddr [2], iaddr [3]);
+ /*%Audit% Cannot exceed 17 bytes. %2004.06.17,Safe%*/
+ sprintf (tbuf, " %u.%u.%u.%u",
+ iaddr [0], iaddr [1], iaddr [2], iaddr [3]);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
memcpy (&option.data [4 + i * ilen], iaddr, ilen);
@@ -3520,6 +3598,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
for (i = 0; i < count; i++) {
val = va_arg (va, unsigned);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
@@ -3532,6 +3611,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
bval = va_arg (va, u_int8_t *);
#if defined (DEBUG_FAILOVER_MESSAGES)
for (i = 0; i < count; i++) {
+ /* 23 bytes plus nul, safe. */
sprintf (tbuf, " %d", bval [i]);
failover_print (obuf, obufix, obufmax, tbuf);
}
@@ -3540,17 +3620,21 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
break;
/* On output, TEXT_OR_BYTES is _always_ text, and always NUL
- terminated. Note that the caller should be careful not to
- provide a format and data that amount to more than 256 bytes
- of data, since it will be truncated on platforms that
- support snprintf, and will mung the stack on those platforms
- that do not support snprintf. Also, callers should not pass
- data acquired from the network without specifically checking
- it to make sure it won't bash the stack. */
+ terminated. Note that the caller should be careful not
+ to provide a format and data that amount to more than 256
+ bytes of data, since it will cause a fatal error. */
case FT_TEXT_OR_BYTES:
case FT_TEXT:
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, "\"%s\"", txt);
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * function is used for formatting messages in the failover
+ * command channel. For now the safest thing is for
+ * overflow-truncation to cause a fatal log.
+ */
+ if (snprintf (tbuf, sizeof tbuf, "\"%s\"", txt) >= sizeof tbuf)
+ log_fatal ("dhcp_failover_make_option: tbuf overflow");
failover_print (obuf, obufix, obufmax, tbuf);
#endif
memcpy (&option.data [4], txt, count);
@@ -3565,6 +3649,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
memcpy (&option.data [4 + count], bval, size - count - 4);
#if defined (DEBUG_FAILOVER_MESSAGES)
for (i = 4; i < size; i++) {
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", option.data [i]);
failover_print (obuf, obufix, obufmax, tbuf);
}
@@ -3575,6 +3660,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
for (i = 0; i < count; i++) {
val = va_arg (va, u_int32_t);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
@@ -3590,6 +3676,7 @@ failover_option_t *dhcp_failover_make_option (unsigned code,
#if defined DEBUG_FAILOVER_MESSAGES
failover_print (obuf, obufix, obufmax, ")");
#endif
+ va_end (va);
/* Now allocate a place to store what we just set up. */
op = dmalloc (sizeof (failover_option_t), MDL);
@@ -4043,7 +4130,7 @@ isc_result_t dhcp_failover_send_bind_update (dhcp_failover_state_t *state,
lease -> ip_addr.len,
lease -> ip_addr.iabuf),
dhcp_failover_make_option (FTO_BINDING_STATUS, FMA,
- lease -> binding_state),
+ lease -> desired_binding_state),
lease -> uid_len
? dhcp_failover_make_option (FTO_CLIENT_IDENTIFIER, FMA,
lease -> uid_len,
@@ -4221,7 +4308,7 @@ isc_result_t dhcp_failover_send_poolresp (dhcp_failover_state_t *state,
status = (dhcp_failover_put_message
(link, link -> outer,
- FTM_POOLREQ,
+ FTM_POOLRESP,
dhcp_failover_make_option (FTO_ADDRESSES_TRANSFERRED, FMA,
leases),
(failover_option_t *)0));
@@ -4259,11 +4346,17 @@ isc_result_t dhcp_failover_send_update_request (dhcp_failover_state_t *state)
if (!link -> outer || link -> outer -> type != omapi_type_connection)
return ISC_R_INVALIDARG;
+ if (state -> curUPD)
+ return ISC_R_ALREADYRUNNING;
+
status = (dhcp_failover_put_message
(link, link -> outer,
FTM_UPDREQ,
(failover_option_t *)0));
+ if (status == ISC_R_SUCCESS)
+ state -> curUPD = FTM_UPDREQ;
+
#if defined (DEBUG_FAILOVER_MESSAGES)
if (status != ISC_R_SUCCESS)
failover_print (FMA, " (failed)");
@@ -4272,6 +4365,7 @@ isc_result_t dhcp_failover_send_update_request (dhcp_failover_state_t *state)
log_debug ("%s", obuf);
}
#endif
+ log_info ("Sent update request message to %s", state -> name);
return status;
}
@@ -4298,11 +4392,18 @@ isc_result_t dhcp_failover_send_update_request_all (dhcp_failover_state_t
if (!link -> outer || link -> outer -> type != omapi_type_connection)
return ISC_R_INVALIDARG;
+ /* If there is an UPDREQ in progress, then upgrade to UPDREQALL. */
+ if (state -> curUPD && (state -> curUPD != FTM_UPDREQ))
+ return ISC_R_ALREADYRUNNING;
+
status = (dhcp_failover_put_message
(link, link -> outer,
FTM_UPDREQALL,
(failover_option_t *)0));
+ if (status == ISC_R_SUCCESS)
+ state -> curUPD = FTM_UPDREQALL;
+
#if defined (DEBUG_FAILOVER_MESSAGES)
if (status != ISC_R_SUCCESS)
failover_print (FMA, " (failed)");
@@ -4311,6 +4412,7 @@ isc_result_t dhcp_failover_send_update_request_all (dhcp_failover_state_t
log_debug ("%s", obuf);
}
#endif
+ log_info ("Sent update request all message to %s", state -> name);
return status;
}
@@ -4350,6 +4452,8 @@ isc_result_t dhcp_failover_send_update_done (dhcp_failover_state_t *state)
}
#endif
+ log_info ("Sent update done message to %s", state -> name);
+
/* There may be uncommitted leases at this point (since
dhcp_failover_process_bind_ack() doesn't commit leases);
commit the lease file. */
@@ -4387,6 +4491,10 @@ isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *state,
}
if (msg -> options_present & FTB_CHADDR) {
+ if (msg->binding_status == FTS_ABANDONED) {
+ message = "BNDUPD to ABANDONED with a CHADDR";
+ goto bad;
+ }
if (msg -> chaddr.count > sizeof lt -> hardware_addr.hbuf) {
message = "chaddr to long";
goto bad;
@@ -4394,25 +4502,65 @@ isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *state,
lt -> hardware_addr.hlen = msg -> chaddr.count;
memcpy (lt -> hardware_addr.hbuf, msg -> chaddr.data,
msg -> chaddr.count);
- }
+ } else if (msg->binding_status == FTS_ACTIVE ||
+ msg->binding_status == FTS_EXPIRED ||
+ msg->binding_status == FTS_RELEASED) {
+ message = "BNDUPD without CHADDR";
+ goto bad;
+ } else if (msg->binding_status == FTS_ABANDONED) {
+ lt->hardware_addr.hlen = 0;
+ if (lt->scope)
+ binding_scope_dereference(&lt->scope, MDL);
+ }
+
+ /* There is no explicit message content to indicate that the client
+ * supplied no client-identifier. So if we don't hear of a value,
+ * we discard the last one.
+ */
+ if (msg->options_present & FTB_CLIENT_IDENTIFIER) {
+ if (msg->binding_status == FTS_ABANDONED) {
+ message = "BNDUPD to ABANDONED with client-id";
+ goto bad;
+ }
- if (msg -> options_present & FTB_CLIENT_IDENTIFIER) {
- lt -> uid_len = msg -> client_identifier.count;
- if (lt -> uid_len > sizeof lt -> uid_buf) {
- lt -> uid_max = lt -> uid_len;
- lt -> uid = dmalloc (lt -> uid_len, MDL);
- if (!lt -> uid) {
- message = "no memory";
- goto bad;
+ lt->uid_len = msg->client_identifier.count;
+
+ /* Allocate the lt->uid buffer if we haven't already, or
+ * re-allocate the lt-uid buffer if we have one that is not
+ * large enough. Otherwise, just use the extant buffer.
+ */
+ if (!lt->uid || lt->uid == lt->uid_buf ||
+ lt->uid_len > lt->uid_max) {
+ if (lt->uid && lt->uid != lt->uid_buf)
+ dfree(lt->uid, MDL);
+
+ if (lt->uid_len > sizeof(lt->uid_buf)) {
+ lt->uid_max = lt->uid_len;
+ lt->uid = dmalloc(lt->uid_len, MDL);
+ if (!lt->uid) {
+ message = "no memory";
+ goto bad;
+ }
+ } else {
+ lt->uid_max = sizeof(lt->uid_buf);
+ lt->uid = lt->uid_buf;
}
- } else {
- lt -> uid_max = sizeof lt -> uid_buf;
- lt -> uid = lt -> uid_buf;
}
memcpy (lt -> uid,
msg -> client_identifier.data, lt -> uid_len);
+ } else if (lt->uid && msg->binding_status != FTS_RESET &&
+ msg->binding_status != FTS_FREE &&
+ msg->binding_status != FTS_BACKUP) {
+ if (lt->uid != lt->uid_buf)
+ dfree (lt->uid, MDL);
+ lt->uid = NULL;
+ lt->uid_max = lt->uid_len = 0;
}
-
+
+ /* If the lease was expired, also remove the stale binding scope. */
+ if (lt->scope && lt->ends < cur_time)
+ binding_scope_dereference(&lt->scope, MDL);
+
/* XXX Times may need to be adjusted based on clock skew! */
if (msg -> options_present & FTB_STOS) {
lt -> starts = msg -> stos;
@@ -4453,19 +4601,16 @@ isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *state,
}
if (new_binding_state != msg -> binding_status) {
char outbuf [100];
-#if !defined (NO_SNPRINTF)
- snprintf (outbuf, sizeof outbuf,
+
+ if (snprintf (outbuf, sizeof outbuf,
"%s: invalid state transition: %s to %s",
piaddr (lease -> ip_addr),
binding_state_print (lease -> binding_state),
- binding_state_print (msg -> binding_status));
-#else
- sprintf (outbuf,
- "%s: invalid state transition: %s to %s",
- piaddr (lease -> ip_addr),
- binding_state_print (lease -> binding_state),
- binding_state_print (msg -> binding_status));
-#endif
+ binding_state_print (msg -> binding_status))
+ >= sizeof outbuf)
+ log_fatal ("%s: impossible outbuf overflow",
+ "dhcp_failover_process_bind_update");
+
dhcp_failover_send_bind_ack (state, msg,
FTR_FATAL_CONFLICT,
outbuf);
@@ -4549,12 +4694,33 @@ isc_result_t dhcp_failover_process_bind_ack (dhcp_failover_state_t *state,
commit_leases ();
} else {
lease -> tsfp = msg -> potential_expiry;
+ if ((lease -> desired_binding_state !=
+ lease -> binding_state) &&
+ (msg -> options_present & FTB_BINDING_STATUS) &&
+ (msg -> binding_status ==
+ lease -> desired_binding_state)) {
+ lease -> next_binding_state =
+ lease -> desired_binding_state;
+ supersede_lease (lease,
+ (struct lease *)0, 0, 0, 0);
+ }
write_lease (lease);
-#if 0 /* XXX This might be needed. */
- if (state -> me.state == normal)
- commit_leases ();
-#endif
+ /* Commit the lease only after a two-second timeout,
+ so that if we get a bunch of acks in quick
+ successtion (e.g., when stealing leases from the
+ secondary), we do not do an immediate commit for
+ each one. */
+ add_timeout (cur_time + 2,
+ commit_leases_timeout, (void *)0, 0, 0);
}
+ } else if (lease -> desired_binding_state != lease -> binding_state &&
+ (msg -> options_present & FTB_BINDING_STATUS) &&
+ msg -> binding_status == lease -> desired_binding_state) {
+ lease -> next_binding_state = lease -> desired_binding_state;
+ supersede_lease (lease, (struct lease *)0, 0, 0, 0);
+ write_lease (lease);
+ add_timeout (cur_time + 2, commit_leases_timeout,
+ (void *)0, 0, 0);
}
unqueue:
@@ -4639,6 +4805,7 @@ isc_result_t dhcp_failover_generate_update_queue (dhcp_failover_state_t *state,
}
if (state -> send_update_done)
lease_dereference (&state -> send_update_done, MDL);
+ state -> cur_unacked_updates = 0;
/* Loop through each pool in each shared network and call the
expiry routine on the pool. */
@@ -4657,6 +4824,7 @@ isc_result_t dhcp_failover_generate_update_queue (dhcp_failover_state_t *state,
(l -> starts != MIN_TIME ||
l -> ends != MIN_TIME)) ||
l -> tstp > l -> tsfp)) {
+ l -> desired_binding_state = l -> binding_state;
dhcp_failover_queue_update (l, 0);
}
}
@@ -4680,10 +4848,14 @@ dhcp_failover_process_update_request (dhcp_failover_state_t *state,
lease_reference (&state -> send_update_done,
state -> update_queue_tail, MDL);
dhcp_failover_send_updates (state);
+ log_info ("Update request from %s: sending update",
+ state -> name);
} else {
/* Otherwise, there are no updates to send, so we can
just send an UPDDONE message immediately. */
dhcp_failover_send_update_done (state);
+ log_info ("Update request from %s: nothing pending",
+ state -> name);
}
return ISC_R_SUCCESS;
@@ -4700,10 +4872,14 @@ dhcp_failover_process_update_request_all (dhcp_failover_state_t *state,
lease_reference (&state -> send_update_done,
state -> update_queue_tail, MDL);
dhcp_failover_send_updates (state);
+ log_info ("Update request all from %s: sending update",
+ state -> name);
} else {
/* This should really never happen, but it could happen
on a server that currently has no leases configured. */
dhcp_failover_send_update_done (state);
+ log_info ("Update request all from %s: nothing pending",
+ state -> name);
}
return ISC_R_SUCCESS;
@@ -4716,6 +4892,8 @@ dhcp_failover_process_update_done (dhcp_failover_state_t *state,
log_info ("failover peer %s: peer update completed.",
state -> name);
+ state -> curUPD = 0;
+
switch (state -> me.state) {
case unknown_state:
case partner_down:
@@ -4900,8 +5078,9 @@ normal_binding_state_transition_check (struct lease *lease,
case FTS_ACTIVE:
case FTS_ABANDONED:
case FTS_BACKUP:
- case FTS_RESERVED:
- case FTS_BOOTP:
+ case FTS_EXPIRED:
+ case FTS_RELEASED:
+ case FTS_RESET:
/* If the lease was free, and our peer is primary,
then it can make it active, or abandoned, or
backup. Abandoned is treated like free in
@@ -4915,24 +5094,21 @@ normal_binding_state_transition_check (struct lease *lease,
peer to change its state anyway, but log a warning
message in hopes that the error will be fixed. */
case FTS_FREE: /* for compiler */
- case FTS_EXPIRED:
- case FTS_RELEASED:
- case FTS_RESET:
- log_error ("allowing %s%s: %s to %s",
- "invalid peer state transition on ",
- piaddr (lease -> ip_addr),
- (binding_state_print
- (lease -> binding_state)),
- binding_state_print (binding_state));
new_state = binding_state;
goto out;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
/* The secondary can't change the state of an active
lease. */
if (state -> i_am == primary) {
+ /* Except that the client may send the DHCPRELEASE
+ to the secondary, and we have to accept that. */
+ if (binding_state == FTS_RELEASED)
+ return binding_state;
new_state = lease -> binding_state;
goto out;
}
@@ -4950,19 +5126,25 @@ normal_binding_state_transition_check (struct lease *lease,
return binding_state;
case FTS_EXPIRED:
- if (lease -> ends > cur_time) {
+ /* XXX 65 should be the clock skew between the peers
+ XXX plus a fudge factor. This code will result
+ XXX in problems if MCLT is really short or the
+ XXX max-lease-time is really short (less than the
+ XXX fudge factor. */
+ if (lease -> ends - 65 > cur_time) {
new_state = lease -> binding_state;
goto out;
}
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_ACTIVE:
return binding_state;
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
break;
case FTS_EXPIRED:
@@ -4977,14 +5159,16 @@ normal_binding_state_transition_check (struct lease *lease,
}
return binding_state;
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_ACTIVE:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_EXPIRED:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_RELEASED:
switch (binding_state) {
@@ -4993,14 +5177,16 @@ normal_binding_state_transition_check (struct lease *lease,
/* These are invalid state transitions - should we
prevent them? */
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_EXPIRED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_ACTIVE:
case FTS_RELEASED:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_RESET:
switch (binding_state) {
@@ -5015,47 +5201,47 @@ normal_binding_state_transition_check (struct lease *lease,
return binding_state;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_EXPIRED:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_BACKUP:
switch (binding_state) {
case FTS_ACTIVE:
case FTS_ABANDONED:
- case FTS_FREE:
- case FTS_RESERVED:
- case FTS_BOOTP:
- /* If the lease was in backup, and our peer is
- secondary, then it can make it active, or
- abandoned, or free. */
- if (state -> i_am == primary)
- return binding_state;
-
- /* Otherwise, it can't do any sort of state
- transition, but because the lease was free
- we allow it to do the transition, and just
- log the error. */
case FTS_EXPIRED:
case FTS_RELEASED:
case FTS_RESET:
- log_error ("allowing %s%s: %s to %s",
- "invalid peer state transition on ",
- piaddr (lease -> ip_addr),
- (binding_state_print
- (lease -> binding_state)),
- binding_state_print (binding_state));
- new_state = binding_state;
- goto out;
+ /* If the lease was in backup, and our peer
+ is secondary, then it can make it active
+ or abandoned. */
+ if (state -> i_am == primary)
+ return binding_state;
+
+ /* Either the primary or the secondary can
+ reasonably move a lease from the backup
+ state to the free state. */
+ case FTS_FREE:
+ return binding_state;
case FTS_BACKUP:
new_state = lease -> binding_state;
goto out;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
out:
return new_state;
@@ -5092,8 +5278,6 @@ conflict_binding_state_transition_check (struct lease *lease,
going to take the partner's change if the partner
thinks it's free. */
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
switch (binding_state) {
case FTS_FREE:
case FTS_BACKUP:
@@ -5111,13 +5295,19 @@ conflict_binding_state_transition_check (struct lease *lease,
new_state = binding_state;
break;
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_ACTIVE:
new_state = binding_state;
break;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
break;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
}
return new_state;
@@ -5164,8 +5354,6 @@ int lease_mine_to_reallocate (struct lease *lease)
case FTS_RESET:
case FTS_RELEASED:
case FTS_EXPIRED:
- case FTS_BOOTP:
- case FTS_RESERVED:
if (peer -> service_state == service_partner_down &&
(lease -> tsfp < peer -> me.stos
? peer -> me.stos + peer -> mclt < cur_time
@@ -5273,14 +5461,6 @@ const char *binding_state_print (enum failover_state state)
return "backup";
break;
- case FTS_RESERVED:
- return "reserved";
- break;
-
- case FTS_BOOTP:
- return "bootp";
- break;
-
default:
return "unknown";
break;
diff --git a/server/mdb.c b/server/mdb.c
index 123e05e8..e26f23f5 100644
--- a/server/mdb.c
+++ b/server/mdb.c
@@ -3,39 +3,30 @@
Server-specific in-memory database support. */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,19 +34,20 @@
#ifndef lint
static char copyright[] =
-"$Id: mdb.c,v 1.71 2001/07/10 20:36:05 brister Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: mdb.c,v 1.72 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
+#include "omapip/hash.h"
struct subnet *subnets;
struct shared_network *shared_networks;
-struct hash_table *host_hw_addr_hash;
-struct hash_table *host_uid_hash;
-struct hash_table *lease_uid_hash;
-struct hash_table *lease_ip_addr_hash;
-struct hash_table *lease_hw_addr_hash;
-struct hash_table *host_name_hash;
+host_hash_t *host_hw_addr_hash;
+host_hash_t *host_uid_hash;
+host_hash_t *host_name_hash;
+lease_hash_t *lease_uid_hash;
+lease_hash_t *lease_ip_addr_hash;
+lease_hash_t *lease_hw_addr_hash;
int numclasseswritten;
@@ -133,10 +125,7 @@ isc_result_t enter_host (hd, dynamicp, commit)
struct executable_statement *esp;
if (!host_name_hash) {
- host_name_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference, 0, MDL);
- if (!host_name_hash)
+ if (!host_new_hash (&host_name_hash, 0, MDL))
log_fatal ("Can't allocate host name hash");
host_hash_add (host_name_hash,
(unsigned char *)hd -> name,
@@ -153,8 +142,10 @@ isc_result_t enter_host (hd, dynamicp, commit)
strlen (hd -> name), MDL);
/* If the old entry wasn't dynamic, then we
always have to keep the deletion. */
- if (!hp -> flags & HOST_DECL_DYNAMIC)
+ if (hp -> flags & HOST_DECL_STATIC) {
hd -> flags |= HOST_DECL_STATIC;
+ }
+ host_dereference (&hp, MDL);
}
/* If we are updating an existing host declaration, we
@@ -189,11 +180,7 @@ isc_result_t enter_host (hd, dynamicp, commit)
if (hd -> interface.hlen) {
if (!host_hw_addr_hash) {
- host_hw_addr_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference,
- 0, MDL);
- if (!host_hw_addr_hash)
+ if (!host_new_hash (&host_hw_addr_hash, 0, MDL))
log_fatal ("Can't allocate host/hw hash");
} else {
/* If there isn't already a host decl matching this
@@ -237,11 +224,7 @@ isc_result_t enter_host (hd, dynamicp, commit)
/* If there's no uid hash, make one; otherwise, see if
there's already an entry in the hash for this host. */
if (!host_uid_hash) {
- host_uid_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference,
- 0, MDL);
- if (!host_uid_hash)
+ if (!host_new_hash (&host_uid_hash, 0, MDL))
log_fatal ("Can't allocate host/uid hash");
host_hash_add (host_uid_hash,
@@ -345,6 +328,8 @@ isc_result_t delete_host (hd, commit)
while (foo) {
if (foo == hd)
break;
+ if (np)
+ host_dereference (&np, MDL);
host_reference (&np, foo, MDL);
host_dereference (&foo, MDL);
if (np -> n_ipaddr)
@@ -385,6 +370,8 @@ isc_result_t delete_host (hd, commit)
while (foo) {
if (foo == hd)
break;
+ if (np)
+ host_dereference (&np, MDL);
host_reference (&np, foo, MDL);
host_dereference (&foo, MDL);
if (np -> n_ipaddr)
@@ -522,10 +509,12 @@ int find_host_for_network (struct subnet **sp, struct host_decl **host,
return 0;
}
-void new_address_range (low, high, subnet, pool)
+void new_address_range (cfile, low, high, subnet, pool, lpchain)
+ struct parse *cfile;
struct iaddr low, high;
struct subnet *subnet;
struct pool *pool;
+ struct lease **lpchain;
{
struct lease *address_range, *lp, *plp;
struct iaddr net;
@@ -544,24 +533,15 @@ void new_address_range (low, high, subnet, pool)
/* Initialize the hash table if it hasn't been done yet. */
if (!lease_uid_hash) {
- lease_uid_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_uid_hash, 0, MDL))
log_fatal ("Can't allocate lease/uid hash");
}
if (!lease_ip_addr_hash) {
- lease_ip_addr_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_ip_addr_hash, 0, MDL))
log_fatal ("Can't allocate lease/ip hash");
}
if (!lease_hw_addr_hash) {
- lease_hw_addr_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_hw_addr_hash, 0, MDL))
log_fatal ("Can't allocate lease/hw hash");
}
@@ -635,8 +615,9 @@ void new_address_range (low, high, subnet, pool)
/* Remember the lease in the IP address hash. */
if (find_lease_by_ip_addr (&lt, lp -> ip_addr, MDL)) {
if (lt -> pool) {
- log_error ("duplicate entries for lease %s",
- piaddr (lp -> ip_addr));
+ parse_warn (cfile,
+ "lease %s is declared twice!",
+ piaddr (lp -> ip_addr));
} else
pool_reference (&lt -> pool, pool, MDL);
lease_dereference (&lt, MDL);
@@ -644,6 +625,14 @@ void new_address_range (low, high, subnet, pool)
lease_hash_add (lease_ip_addr_hash,
lp -> ip_addr.iabuf,
lp -> ip_addr.len, lp, MDL);
+ /* Put the lease on the chain for the caller. */
+ if (lpchain) {
+ if (*lpchain) {
+ lease_reference (&lp -> next, *lpchain, MDL);
+ lease_dereference (lpchain, MDL);
+ }
+ lease_reference (lpchain, lp, MDL);
+ }
lease_dereference (&lp, MDL);
}
}
@@ -912,7 +901,6 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate)
comp -> hardware_addr.hlen))))) {
log_error ("Lease conflict at %s",
piaddr (comp -> ip_addr));
- return 0;
}
/* If there's a Unique ID, dissociate it from the hash
@@ -990,9 +978,7 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate)
/* Only retain the agent options if the lease is still
affirmatively associated with a client. */
if (lease -> next_binding_state == FTS_ACTIVE ||
- lease -> next_binding_state == FTS_EXPIRED ||
- lease -> next_binding_state == FTS_RESERVED ||
- lease -> next_binding_state == FTS_BOOTP)
+ lease -> next_binding_state == FTS_EXPIRED)
option_chain_head_reference (&comp -> agent_options,
lease -> agent_options,
MDL);
@@ -1062,8 +1048,6 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate)
break;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
lq = &comp -> pool -> active;
break;
@@ -1102,8 +1086,8 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate)
if (!lp) {
log_error ("Lease with binding state %s not on its queue.",
- (comp -> binding_state < 1 &&
- comp -> binding_state < FTS_BOOTP)
+ (comp -> binding_state < 1 ||
+ comp -> binding_state > FTS_LAST)
? "unknown"
: binding_state_names [comp -> binding_state - 1]);
return 0;
@@ -1164,11 +1148,22 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate)
#if defined (FAILOVER_PROTOCOL)
if (propogate) {
+ comp -> desired_binding_state = comp -> binding_state;
if (!dhcp_failover_queue_update (comp, pimmediate))
return 0;
}
#endif
+ /* If the current binding state has already expired, do an
+ expiry event right now. */
+ /* XXX At some point we should optimize this so that we don't
+ XXX write the lease twice, but this is a safe way to fix the
+ XXX problem for 3.0 (I hope!). */
+ if ((commit || !pimmediate) &&
+ comp -> sort_time < cur_time &&
+ comp -> next_binding_state != comp -> binding_state)
+ pool_timer (comp -> pool);
+
return 1;
}
@@ -1189,14 +1184,14 @@ void make_binding_state_transition (struct lease *lease)
((
#if defined (FAILOVER_PROTOCOL)
peer &&
- lease -> binding_state == FTS_EXPIRED &&
+ (lease -> binding_state == FTS_EXPIRED ||
+ (peer -> i_am == secondary &&
+ lease -> binding_state == FTS_ACTIVE)) &&
(lease -> next_binding_state == FTS_FREE ||
lease -> next_binding_state == FTS_BACKUP)) ||
(!peer &&
#endif
- (lease -> binding_state == FTS_ACTIVE ||
- lease -> binding_state == FTS_BOOTP ||
- lease -> binding_state == FTS_RESERVED) &&
+ lease -> binding_state == FTS_ACTIVE &&
lease -> next_binding_state != FTS_RELEASED))) {
#if defined (NSUPDATE)
ddns_removals (lease);
@@ -1218,8 +1213,19 @@ void make_binding_state_transition (struct lease *lease)
if (lease -> on_release)
executable_statement_dereference (&lease -> on_release,
MDL);
+ /* Get rid of client-specific bindings that are only
+ correct when the lease is active. */
if (lease -> billing_class)
unbill_class (lease, lease -> billing_class);
+ if (lease -> agent_options)
+ option_chain_head_dereference (&lease -> agent_options,
+ MDL);
+ if (lease -> client_hostname) {
+ dfree (lease -> client_hostname, MDL);
+ lease -> client_hostname = (char *)0;
+ }
+ if (lease -> host)
+ host_dereference (&lease -> host, MDL);
/* Send the expiry time to the peer. */
lease -> tstp = lease -> ends;
@@ -1236,9 +1242,7 @@ void make_binding_state_transition (struct lease *lease)
lease -> next_binding_state == FTS_BACKUP)) ||
(!peer &&
#endif
- (lease -> binding_state == FTS_ACTIVE ||
- lease -> binding_state == FTS_BOOTP ||
- lease -> binding_state == FTS_RESERVED) &&
+ lease -> binding_state == FTS_ACTIVE &&
lease -> next_binding_state == FTS_RELEASED))) {
#if defined (NSUPDATE)
ddns_removals (lease);
@@ -1260,8 +1264,19 @@ void make_binding_state_transition (struct lease *lease)
executable_statement_dereference (&lease -> on_expiry,
MDL);
+ /* Get rid of client-specific bindings that are only
+ correct when the lease is active. */
if (lease -> billing_class)
unbill_class (lease, lease -> billing_class);
+ if (lease -> agent_options)
+ option_chain_head_dereference (&lease -> agent_options,
+ MDL);
+ if (lease -> client_hostname) {
+ dfree (lease -> client_hostname, MDL);
+ lease -> client_hostname = (char *)0;
+ }
+ if (lease -> host)
+ host_dereference (&lease -> host, MDL);
/* Send the release time (should be == cur_time) to the
peer. */
@@ -1278,7 +1293,6 @@ void make_binding_state_transition (struct lease *lease)
lease -> binding_state = lease -> next_binding_state;
switch (lease -> binding_state) {
case FTS_ACTIVE:
- case FTS_BOOTP:
#if defined (FAILOVER_PROTOCOL)
if (lease -> pool && lease -> pool -> failover_peer)
lease -> next_binding_state = FTS_EXPIRED;
@@ -1305,7 +1319,6 @@ void make_binding_state_transition (struct lease *lease)
case FTS_FREE:
case FTS_BACKUP:
- case FTS_RESERVED:
lease -> next_binding_state = lease -> binding_state;
break;
}
@@ -1456,6 +1469,9 @@ void abandon_lease (lease, message)
if (!lease_copy (&lt, lease, MDL))
return;
+ if (lt->scope)
+ binding_scope_dereference(&lt->scope, MDL);
+
lt -> ends = cur_time; /* XXX */
lt -> next_binding_state = FTS_ABANDONED;
@@ -1883,9 +1899,12 @@ int write_leases ()
for (i = FREE_LEASES; i <= BACKUP_LEASES; i++) {
for (l = *(lptr [i]); l; l = l -> next) {
+#if !defined (DEBUG_DUMP_ALL_LEASES)
if (l -> hardware_addr.hlen ||
l -> uid_len ||
- (l -> binding_state != FTS_FREE)) {
+ (l -> binding_state != FTS_FREE))
+#endif
+ {
if (!write_lease (l))
return 0;
num_written++;
@@ -1917,8 +1936,6 @@ int lease_enqueue (struct lease *comp)
break;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
lq = &comp -> pool -> active;
comp -> sort_time = comp -> ends;
break;
@@ -2015,9 +2032,7 @@ void lease_instantiate (const unsigned char *val, unsigned len,
if (lease -> binding_state == FTS_ACTIVE ||
lease -> binding_state == FTS_EXPIRED ||
lease -> binding_state == FTS_RELEASED ||
- lease -> binding_state == FTS_RESET ||
- lease -> binding_state == FTS_RESERVED ||
- lease -> binding_state == FTS_BOOTP)
+ lease -> binding_state == FTS_RESET)
bill_class (lease, class);
class_dereference (&class, MDL);
}
@@ -2070,8 +2085,10 @@ void expire_all_pools ()
#if defined (FAILOVER_PROTOCOL)
if (p -> failover_peer &&
l -> tstp > l -> tsfp &&
- !(l -> flags & ON_UPDATE_QUEUE))
+ !(l -> flags & ON_UPDATE_QUEUE)) {
+ l -> desired_binding_state = l -> binding_state;
dhcp_failover_queue_update (l, 1);
+ }
#endif
}
}
@@ -2113,11 +2130,14 @@ void dump_subnets ()
}
}
-HASH_FUNCTIONS (lease, const unsigned char *, struct lease)
-HASH_FUNCTIONS (host, const unsigned char *, struct host_decl)
-HASH_FUNCTIONS (class, const char *, struct class)
+HASH_FUNCTIONS (lease, const unsigned char *, struct lease, lease_hash_t,
+ lease_reference, lease_dereference)
+HASH_FUNCTIONS (host, const unsigned char *, struct host_decl, host_hash_t,
+ host_reference, host_dereference)
+HASH_FUNCTIONS (class, const char *, struct class, class_hash_t,
+ class_reference, class_dereference)
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
extern struct hash_table *dns_zone_hash;
extern struct interface_info **interface_vector;
@@ -2127,7 +2147,9 @@ extern struct hash_table *auth_key_hash;
struct hash_table *universe_hash;
struct universe **universes;
int universe_count, universe_max;
+#if 0
extern int end;
+#endif
#if defined (COMPACT_LEASES)
extern struct lease *lease_hunks;
@@ -2152,28 +2174,30 @@ void free_everything ()
/* Get rid of all the hash tables. */
if (host_hw_addr_hash)
- free_hash_table (host_hw_addr_hash, MDL);
+ host_free_hash_table (&host_hw_addr_hash, MDL);
host_hw_addr_hash = 0;
if (host_uid_hash)
- free_hash_table (host_uid_hash, MDL);
+ host_free_hash_table (&host_uid_hash, MDL);
host_uid_hash = 0;
if (lease_uid_hash)
- free_hash_table (lease_uid_hash, MDL);
+ lease_free_hash_table (&lease_uid_hash, MDL);
lease_uid_hash = 0;
if (lease_ip_addr_hash)
- free_hash_table (lease_ip_addr_hash, MDL);
+ lease_free_hash_table (&lease_ip_addr_hash, MDL);
lease_ip_addr_hash = 0;
if (lease_hw_addr_hash)
- free_hash_table (lease_hw_addr_hash, MDL);
+ lease_free_hash_table (&lease_hw_addr_hash, MDL);
lease_hw_addr_hash = 0;
if (host_name_hash)
- free_hash_table (host_name_hash, MDL);
+ host_free_hash_table (&host_name_hash, MDL);
host_name_hash = 0;
if (dns_zone_hash)
- free_hash_table (dns_zone_hash, MDL);
+ dns_zone_free_hash_table (&dns_zone_hash, MDL);
dns_zone_hash = 0;
+#if 0
if (auth_key_hash)
- free_hash_table (auth_key_hash, MDL);
+ auth_key_free_hash_table (&auth_key_hash, MDL);
+#endif
auth_key_hash = 0;
omapi_object_dereference ((omapi_object_t **)&dhcp_control_object,
@@ -2193,7 +2217,7 @@ void free_everything ()
}
group_dereference (&cc -> group, MDL);
if (cc -> hash) {
- free_hash_table (cc -> hash, MDL);
+ class_free_hash_table (&cc -> hash, MDL);
cc -> hash = (struct hash_table *)0;
}
class_dereference (&cc, MDL);
@@ -2352,7 +2376,7 @@ void free_everything ()
omapi_object_dereference ((omapi_object_t **)&icmp_state, MDL);
- free_hash_table (universe_hash, MDL);
+ universe_free_hash_table (&universe_hash, MDL);
for (i = 0; i < universe_count; i++) {
union {
const char *c;
@@ -2360,13 +2384,16 @@ void free_everything ()
} foo;
if (universes [i]) {
if (universes [i] -> hash)
- free_hash_table (universes [i] -> hash, MDL);
+ option_free_hash_table (&universes [i] -> hash,
+ MDL);
+#if 0
if (universes [i] -> name > (char *)&end) {
foo.c = universes [i] -> name;
dfree (foo.s, MDL);
}
if (universes [i] > (struct universe *)&end)
dfree (universes [i], MDL);
+#endif
}
}
dfree (universes, MDL);
@@ -2381,4 +2408,4 @@ void free_everything ()
relinquish_hash_bucket_hunks ();
omapi_type_relinquish ();
}
-#endif /* DEBUG_MEMORY_LEAKAGE */
+#endif /* DEBUG_MEMORY_LEAKAGE_ON_EXIT */
diff --git a/server/omapi.c b/server/omapi.c
index 8a3cfb8e..02de07b0 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -3,39 +3,30 @@
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -50,7 +41,7 @@
#ifndef lint
static char copyright[] =
-"$Id: omapi.c,v 1.52 2002/01/17 17:04:00 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: omapi.c,v 1.53 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -92,7 +83,8 @@ void dhcp_db_objects_setup ()
0, 0,
#endif
0,
- sizeof (struct lease), 0);
+ sizeof (struct lease),
+ 0, RC_LEASE);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register lease object type: %s",
isc_result_totext (status));
@@ -107,7 +99,8 @@ void dhcp_db_objects_setup ()
dhcp_class_lookup,
dhcp_class_create,
dhcp_class_remove, 0, 0, 0,
- sizeof (struct class), 0);
+ sizeof (struct class), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register class object type: %s",
isc_result_totext (status));
@@ -122,7 +115,7 @@ void dhcp_db_objects_setup ()
dhcp_subclass_lookup,
dhcp_subclass_create,
dhcp_subclass_remove, 0, 0, 0,
- sizeof (struct class), 0);
+ sizeof (struct class), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register subclass object type: %s",
isc_result_totext (status));
@@ -137,7 +130,7 @@ void dhcp_db_objects_setup ()
dhcp_pool_lookup,
dhcp_pool_create,
dhcp_pool_remove, 0, 0, 0,
- sizeof (struct pool), 0);
+ sizeof (struct pool), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register pool object type: %s",
@@ -153,7 +146,8 @@ void dhcp_db_objects_setup ()
dhcp_host_lookup,
dhcp_host_create,
dhcp_host_remove, 0, 0, 0,
- sizeof (struct host_decl), 0);
+ sizeof (struct host_decl),
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register host object type: %s",
@@ -172,7 +166,7 @@ void dhcp_db_objects_setup ()
dhcp_failover_state_remove,
0, 0, 0,
sizeof (dhcp_failover_state_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover state object type: %s",
@@ -186,7 +180,8 @@ void dhcp_db_objects_setup ()
dhcp_failover_link_signal,
dhcp_failover_link_stuff_values,
0, 0, 0, 0, 0, 0,
- sizeof (dhcp_failover_link_t), 0);
+ sizeof (dhcp_failover_link_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover link object type: %s",
@@ -201,7 +196,8 @@ void dhcp_db_objects_setup ()
dhcp_failover_listener_stuff,
0, 0, 0, 0, 0, 0,
sizeof
- (dhcp_failover_listener_t), 0);
+ (dhcp_failover_listener_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover listener object type: %s",
@@ -226,16 +222,29 @@ isc_result_t dhcp_lease_set_value (omapi_object_t *h,
set - for now, we just make it possible to whack the state. */
if (!omapi_ds_strcmp (name, "state")) {
unsigned long bar;
+ const char *ols, *nls;
status = omapi_get_int_value (&bar, value);
if (status != ISC_R_SUCCESS)
return status;
- if (bar < 1 || bar > FTS_BOOTP)
+ if (bar < 1 || bar > FTS_LAST)
return ISC_R_INVALIDARG;
+ nls = binding_state_names [bar - 1];
+ if (lease -> binding_state >= 1 &&
+ lease -> binding_state <= FTS_LAST)
+ ols = binding_state_names [lease -> binding_state - 1];
+ else
+ ols = "unknown state";
+
if (lease -> binding_state != bar) {
lease -> next_binding_state = bar;
- if (supersede_lease (lease, 0, 1, 1, 1))
+ if (supersede_lease (lease, 0, 1, 1, 1)) {
+ log_info ("lease %s state changed from %s to %s",
+ piaddr(lease->ip_addr), ols, nls);
return ISC_R_SUCCESS;
+ }
+ log_info ("lease %s state change from %s to %s failed.",
+ piaddr (lease -> ip_addr), ols, nls);
return ISC_R_IOERROR;
}
return ISC_R_UNCHANGED;
@@ -760,12 +769,54 @@ isc_result_t dhcp_lease_lookup (omapi_object_t **lp,
/* Now look for a hardware address. */
status = omapi_get_value_str (ref, id, "hardware-address", &tv);
if (status == ISC_R_SUCCESS) {
- lease = (struct lease *)0;
- lease_hash_lookup (&lease, lease_hw_addr_hash,
- tv -> value -> u.buffer.value,
- tv -> value -> u.buffer.len, MDL);
+ unsigned char *haddr;
+ unsigned int len;
+
+ len = tv -> value -> u.buffer.len + 1;
+ haddr = dmalloc (len, MDL);
+ if (!haddr) {
+ omapi_value_dereference (&tv, MDL);
+ return ISC_R_NOMEMORY;
+ }
+
+ memcpy (haddr + 1, tv -> value -> u.buffer.value, len - 1);
omapi_value_dereference (&tv, MDL);
-
+
+ status = omapi_get_value_str (ref, id, "hardware-type", &tv);
+ if (status == ISC_R_SUCCESS) {
+ if (tv -> value -> type == omapi_datatype_data) {
+ if ((tv -> value -> u.buffer.len != 4) ||
+ (tv -> value -> u.buffer.value[0] != 0) ||
+ (tv -> value -> u.buffer.value[1] != 0) ||
+ (tv -> value -> u.buffer.value[2] != 0)) {
+ omapi_value_dereference (&tv, MDL);
+ dfree (haddr, MDL);
+ return ISC_R_INVALIDARG;
+ }
+
+ haddr[0] = tv -> value -> u.buffer.value[3];
+ } else if (tv -> value -> type == omapi_datatype_int) {
+ haddr[0] = (unsigned char)
+ tv -> value -> u.integer;
+ } else {
+ omapi_value_dereference (&tv, MDL);
+ dfree (haddr, MDL);
+ return ISC_R_INVALIDARG;
+ }
+
+ omapi_value_dereference (&tv, MDL);
+ } else {
+ /* If no hardware-type is specified, default to
+ ethernet. This may or may not be a good idea,
+ but Telus is currently relying on this behavior.
+ - DPN */
+ haddr[0] = HTYPE_ETHER;
+ }
+
+ lease = (struct lease *)0;
+ lease_hash_lookup (&lease, lease_hw_addr_hash, haddr, len, MDL);
+ dfree (haddr, MDL);
+
if (*lp && *lp != (omapi_object_t *)lease) {
omapi_object_dereference (lp, MDL);
lease_dereference (&lease, MDL);
@@ -825,8 +876,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
if (!omapi_ds_strcmp (name, "name")) {
if (host -> name)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
host -> name = dmalloc (value -> u.buffer.len + 1,
MDL);
if (!host -> name)
@@ -841,8 +892,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
}
if (!omapi_ds_strcmp (name, "group")) {
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct group_object *group;
group = (struct group_object *)0;
group_hash_lookup (&group, group_name_hash,
@@ -867,8 +918,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
if (!omapi_ds_strcmp (name, "hardware-address")) {
if (host -> interface.hlen)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
if (value -> u.buffer.len >
(sizeof host -> interface.hbuf) - 1)
return ISC_R_INVALIDARG;
@@ -883,8 +934,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
if (!omapi_ds_strcmp (name, "hardware-type")) {
int type;
- if (value -> type == omapi_datatype_data &&
- value -> u.buffer.len == sizeof type) {
+ if (value && (value -> type == omapi_datatype_data &&
+ value -> u.buffer.len == sizeof type)) {
if (value -> u.buffer.len > sizeof type)
return ISC_R_INVALIDARG;
memcpy (&type,
@@ -902,8 +953,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
if (!omapi_ds_strcmp (name, "dhcp-client-identifier")) {
if (host -> client_identifier.data)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
if (!buffer_allocate (&host -> client_identifier.buffer,
value -> u.buffer.len, MDL))
return ISC_R_NOMEMORY;
@@ -923,8 +974,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
option_cache_dereference (&host -> fixed_addr, MDL);
if (!value)
return ISC_R_SUCCESS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct data_string ds;
memset (&ds, 0, sizeof ds);
ds.len = value -> u.buffer.len;
@@ -960,8 +1011,8 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h,
}
if (!host -> group)
return ISC_R_NOMEMORY;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct parse *parse;
int lose = 0;
parse = (struct parse *)0;
@@ -1859,7 +1910,6 @@ isc_result_t dhcp_class_get_value (omapi_object_t *h, omapi_object_t *id,
if (status == ISC_R_SUCCESS)
return status;
}
-
return ISC_R_UNKNOWNATTRIBUTE;
}
@@ -1873,6 +1923,8 @@ isc_result_t dhcp_class_destroy (omapi_object_t *h, const char *file, int line)
return ISC_R_INVALIDARG;
class = (struct class *)h;
+#if defined (DEBUG_MEMORY_LEAKAGE) || \
+ defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
if (class -> nic)
class_dereference (&class -> nic, file, line);
if (class -> superclass)
@@ -1892,8 +1944,8 @@ isc_result_t dhcp_class_destroy (omapi_object_t *h, const char *file, int line)
class -> billed_leases = (struct lease **)0;
}
if (class -> hash) {
- free_hash_table (class -> hash, file, line);
- class -> hash = (struct hash_table *)0;
+ class_free_hash_table (&class -> hash, file, line);
+ class -> hash = (class_hash_t *)0;
}
data_string_forget (&class -> hash_string, file, line);
@@ -1908,6 +1960,7 @@ isc_result_t dhcp_class_destroy (omapi_object_t *h, const char *file, int line)
file, line);
if (class -> superclass)
class_dereference (&class -> superclass, file, line);
+#endif
return ISC_R_SUCCESS;
}
@@ -1941,14 +1994,10 @@ class_signal_handler(omapi_object_t *h,
if (issubclass) {
- if (!class -> superclass -> hash) {
- class -> superclass -> hash =
- new_hash ((hash_reference)
- omapi_object_reference,
- (hash_dereference)
- omapi_object_dereference,
- 0, MDL);
- }
+ if (!class -> superclass -> hash)
+ class_new_hash(&class->superclass->hash,
+ 0, MDL);
+
add_hash (class -> superclass -> hash,
class -> hash_string.data,
class -> hash_string.len,
@@ -2179,7 +2228,6 @@ isc_result_t dhcp_subclass_get_value (omapi_object_t *h, omapi_object_t *id,
if (status == ISC_R_SUCCESS)
return status;
}
-
return ISC_R_UNKNOWNATTRIBUTE;
}
@@ -2412,6 +2460,10 @@ isc_result_t binding_scope_get_value (omapi_value_t **value,
case binding_dns:
case binding_function:
return ISC_R_INVALIDARG;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return ISC_R_FAILURE;
}
if (status != ISC_R_SUCCESS)
diff --git a/server/salloc.c b/server/salloc.c
index bdd324a5..49228e4b 100644
--- a/server/salloc.c
+++ b/server/salloc.c
@@ -3,39 +3,30 @@
Memory allocation for the DHCP server... */
/*
- * Copyright (c) 1996-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: salloc.c,v 1.4 2001/06/27 00:31:16 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: salloc.c,v 1.5 2005/03/17 20:15:29 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/server/stables.c b/server/stables.c
index 746108cd..e39bbbc1 100644
--- a/server/stables.c
+++ b/server/stables.c
@@ -3,39 +3,30 @@
Tables of information only used by server... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1995-2003 by Internet Software Consortium
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of The Internet Software Consortium nor the names
- * of its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Internet Systems Consortium, Inc.
+ * 950 Charter Street
+ * Redwood City, CA 94063
+ * <info@isc.org>
+ * http://www.isc.org/
*
- * This software has been written for the Internet Software Consortium
+ * This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about the Internet Software Consortium, see
+ * To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: stables.c,v 1.26 2001/06/27 00:31:17 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: stables.c,v 1.27 2005/03/17 20:15:29 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -189,518 +180,518 @@ struct option agent_options [256] = {
{ "circuit-id", "X", &agent_universe, 1 },
{ "remote-id", "X", &agent_universe, 2 },
{ "agent-id", "I", &agent_universe, 3 },
- { "#4", "X", &agent_universe, 4 },
- { "#5", "X", &agent_universe, 5 },
- { "#6", "X", &agent_universe, 6 },
- { "#7", "X", &agent_universe, 7 },
- { "#8", "X", &agent_universe, 8 },
- { "#9", "X", &agent_universe, 9 },
- { "#10", "X", &agent_universe, 10 },
- { "#11", "X", &agent_universe, 11 },
- { "#12", "X", &agent_universe, 12 },
- { "#13", "X", &agent_universe, 13 },
- { "#14", "X", &agent_universe, 14 },
- { "#15", "X", &agent_universe, 15 },
- { "#16", "X", &agent_universe, 16 },
- { "#17", "X", &agent_universe, 17 },
- { "#18", "X", &agent_universe, 18 },
- { "#19", "X", &agent_universe, 19 },
- { "#20", "X", &agent_universe, 20 },
- { "#21", "X", &agent_universe, 21 },
- { "#22", "X", &agent_universe, 22 },
- { "#23", "X", &agent_universe, 23 },
- { "#24", "X", &agent_universe, 24 },
- { "#25", "X", &agent_universe, 25 },
- { "#26", "X", &agent_universe, 26 },
- { "#27", "X", &agent_universe, 27 },
- { "#28", "X", &agent_universe, 28 },
- { "#29", "X", &agent_universe, 29 },
- { "#30", "X", &agent_universe, 30 },
- { "#31", "X", &agent_universe, 31 },
- { "#32", "X", &agent_universe, 32 },
- { "#33", "X", &agent_universe, 33 },
- { "#34", "X", &agent_universe, 34 },
- { "#35", "X", &agent_universe, 35 },
- { "#36", "X", &agent_universe, 36 },
- { "#37", "X", &agent_universe, 37 },
- { "#38", "X", &agent_universe, 38 },
- { "#39", "X", &agent_universe, 39 },
- { "#40", "X", &agent_universe, 40 },
- { "#41", "X", &agent_universe, 41 },
- { "#42", "X", &agent_universe, 42 },
- { "#43", "X", &agent_universe, 43 },
- { "#44", "X", &agent_universe, 44 },
- { "#45", "X", &agent_universe, 45 },
- { "#46", "X", &agent_universe, 46 },
- { "#47", "X", &agent_universe, 47 },
- { "#48", "X", &agent_universe, 48 },
- { "#49", "X", &agent_universe, 49 },
- { "#50", "X", &agent_universe, 50 },
- { "#51", "X", &agent_universe, 51 },
- { "#52", "X", &agent_universe, 52 },
- { "#53", "X", &agent_universe, 53 },
- { "#54", "X", &agent_universe, 54 },
- { "#55", "X", &agent_universe, 55 },
- { "#56", "X", &agent_universe, 56 },
- { "#57", "X", &agent_universe, 57 },
- { "#58", "X", &agent_universe, 58 },
- { "#59", "X", &agent_universe, 59 },
- { "#60", "X", &agent_universe, 60 },
- { "#61", "X", &agent_universe, 61 },
- { "#62", "X", &agent_universe, 62 },
- { "#63", "X", &agent_universe, 63 },
- { "#64", "X", &agent_universe, 64 },
- { "#65", "X", &agent_universe, 65 },
- { "#66", "X", &agent_universe, 66 },
- { "#67", "X", &agent_universe, 67 },
- { "#68", "X", &agent_universe, 68 },
- { "#69", "X", &agent_universe, 69 },
- { "#70", "X", &agent_universe, 70 },
- { "#71", "X", &agent_universe, 71 },
- { "#72", "X", &agent_universe, 72 },
- { "#73", "X", &agent_universe, 73 },
- { "#74", "X", &agent_universe, 74 },
- { "#75", "X", &agent_universe, 75 },
- { "#76", "X", &agent_universe, 76 },
- { "#77", "X", &agent_universe, 77 },
- { "#78", "X", &agent_universe, 78 },
- { "#79", "X", &agent_universe, 79 },
- { "#80", "X", &agent_universe, 80 },
- { "#81", "X", &agent_universe, 81 },
- { "#82", "X", &agent_universe, 82 },
- { "#83", "X", &agent_universe, 83 },
- { "#84", "X", &agent_universe, 84 },
- { "#85", "X", &agent_universe, 85 },
- { "#86", "X", &agent_universe, 86 },
- { "#87", "X", &agent_universe, 87 },
- { "#88", "X", &agent_universe, 88 },
- { "#89", "X", &agent_universe, 89 },
- { "#90", "X", &agent_universe, 90 },
- { "#91", "X", &agent_universe, 91 },
- { "#92", "X", &agent_universe, 92 },
- { "#93", "X", &agent_universe, 93 },
- { "#94", "X", &agent_universe, 94 },
- { "#95", "X", &agent_universe, 95 },
- { "#96", "X", &agent_universe, 96 },
- { "#97", "X", &agent_universe, 97 },
- { "#98", "X", &agent_universe, 98 },
- { "#99", "X", &agent_universe, 99 },
- { "#100", "X", &agent_universe, 100 },
- { "#101", "X", &agent_universe, 101 },
- { "#102", "X", &agent_universe, 102 },
- { "#103", "X", &agent_universe, 103 },
- { "#104", "X", &agent_universe, 104 },
- { "#105", "X", &agent_universe, 105 },
- { "#106", "X", &agent_universe, 106 },
- { "#107", "X", &agent_universe, 107 },
- { "#108", "X", &agent_universe, 108 },
- { "#109", "X", &agent_universe, 109 },
- { "#110", "X", &agent_universe, 110 },
- { "#111", "X", &agent_universe, 111 },
- { "#112", "X", &agent_universe, 112 },
- { "#113", "X", &agent_universe, 113 },
- { "#114", "X", &agent_universe, 114 },
- { "#115", "X", &agent_universe, 115 },
- { "#116", "X", &agent_universe, 116 },
- { "#117", "X", &agent_universe, 117 },
- { "#118", "X", &agent_universe, 118 },
- { "#119", "X", &agent_universe, 119 },
- { "#120", "X", &agent_universe, 120 },
- { "#121", "X", &agent_universe, 121 },
- { "#122", "X", &agent_universe, 122 },
- { "#123", "X", &agent_universe, 123 },
- { "#124", "X", &agent_universe, 124 },
- { "#125", "X", &agent_universe, 125 },
- { "#126", "X", &agent_universe, 126 },
- { "#127", "X", &agent_universe, 127 },
- { "#128", "X", &agent_universe, 128 },
- { "#129", "X", &agent_universe, 129 },
- { "#130", "X", &agent_universe, 130 },
- { "#131", "X", &agent_universe, 131 },
- { "#132", "X", &agent_universe, 132 },
- { "#133", "X", &agent_universe, 133 },
- { "#134", "X", &agent_universe, 134 },
- { "#135", "X", &agent_universe, 135 },
- { "#136", "X", &agent_universe, 136 },
- { "#137", "X", &agent_universe, 137 },
- { "#138", "X", &agent_universe, 138 },
- { "#139", "X", &agent_universe, 139 },
- { "#140", "X", &agent_universe, 140 },
- { "#141", "X", &agent_universe, 141 },
- { "#142", "X", &agent_universe, 142 },
- { "#143", "X", &agent_universe, 143 },
- { "#144", "X", &agent_universe, 144 },
- { "#145", "X", &agent_universe, 145 },
- { "#146", "X", &agent_universe, 146 },
- { "#147", "X", &agent_universe, 147 },
- { "#148", "X", &agent_universe, 148 },
- { "#149", "X", &agent_universe, 149 },
- { "#150", "X", &agent_universe, 150 },
- { "#151", "X", &agent_universe, 151 },
- { "#152", "X", &agent_universe, 152 },
- { "#153", "X", &agent_universe, 153 },
- { "#154", "X", &agent_universe, 154 },
- { "#155", "X", &agent_universe, 155 },
- { "#156", "X", &agent_universe, 156 },
- { "#157", "X", &agent_universe, 157 },
- { "#158", "X", &agent_universe, 158 },
- { "#159", "X", &agent_universe, 159 },
- { "#160", "X", &agent_universe, 160 },
- { "#161", "X", &agent_universe, 161 },
- { "#162", "X", &agent_universe, 162 },
- { "#163", "X", &agent_universe, 163 },
- { "#164", "X", &agent_universe, 164 },
- { "#165", "X", &agent_universe, 165 },
- { "#166", "X", &agent_universe, 166 },
- { "#167", "X", &agent_universe, 167 },
- { "#168", "X", &agent_universe, 168 },
- { "#169", "X", &agent_universe, 169 },
- { "#170", "X", &agent_universe, 170 },
- { "#171", "X", &agent_universe, 171 },
- { "#172", "X", &agent_universe, 172 },
- { "#173", "X", &agent_universe, 173 },
- { "#174", "X", &agent_universe, 174 },
- { "#175", "X", &agent_universe, 175 },
- { "#176", "X", &agent_universe, 176 },
- { "#177", "X", &agent_universe, 177 },
- { "#178", "X", &agent_universe, 178 },
- { "#179", "X", &agent_universe, 179 },
- { "#180", "X", &agent_universe, 180 },
- { "#181", "X", &agent_universe, 181 },
- { "#182", "X", &agent_universe, 182 },
- { "#183", "X", &agent_universe, 183 },
- { "#184", "X", &agent_universe, 184 },
- { "#185", "X", &agent_universe, 185 },
- { "#186", "X", &agent_universe, 186 },
- { "#187", "X", &agent_universe, 187 },
- { "#188", "X", &agent_universe, 188 },
- { "#189", "X", &agent_universe, 189 },
- { "#190", "X", &agent_universe, 190 },
- { "#191", "X", &agent_universe, 191 },
- { "#192", "X", &agent_universe, 192 },
- { "#193", "X", &agent_universe, 193 },
- { "#194", "X", &agent_universe, 194 },
- { "#195", "X", &agent_universe, 195 },
- { "#196", "X", &agent_universe, 196 },
- { "#197", "X", &agent_universe, 197 },
- { "#198", "X", &agent_universe, 198 },
- { "#199", "X", &agent_universe, 199 },
- { "#200", "X", &agent_universe, 200 },
- { "#201", "X", &agent_universe, 201 },
- { "#202", "X", &agent_universe, 202 },
- { "#203", "X", &agent_universe, 203 },
- { "#204", "X", &agent_universe, 204 },
- { "#205", "X", &agent_universe, 205 },
- { "#206", "X", &agent_universe, 206 },
- { "#207", "X", &agent_universe, 207 },
- { "#208", "X", &agent_universe, 208 },
- { "#209", "X", &agent_universe, 209 },
- { "#210", "X", &agent_universe, 210 },
- { "#211", "X", &agent_universe, 211 },
- { "#212", "X", &agent_universe, 212 },
- { "#213", "X", &agent_universe, 213 },
- { "#214", "X", &agent_universe, 214 },
- { "#215", "X", &agent_universe, 215 },
- { "#216", "X", &agent_universe, 216 },
- { "#217", "X", &agent_universe, 217 },
- { "#218", "X", &agent_universe, 218 },
- { "#219", "X", &agent_universe, 219 },
- { "#220", "X", &agent_universe, 220 },
- { "#221", "X", &agent_universe, 221 },
- { "#222", "X", &agent_universe, 222 },
- { "#223", "X", &agent_universe, 223 },
- { "#224", "X", &agent_universe, 224 },
- { "#225", "X", &agent_universe, 225 },
- { "#226", "X", &agent_universe, 226 },
- { "#227", "X", &agent_universe, 227 },
- { "#228", "X", &agent_universe, 228 },
- { "#229", "X", &agent_universe, 229 },
- { "#230", "X", &agent_universe, 230 },
- { "#231", "X", &agent_universe, 231 },
- { "#232", "X", &agent_universe, 232 },
- { "#233", "X", &agent_universe, 233 },
- { "#234", "X", &agent_universe, 234 },
- { "#235", "X", &agent_universe, 235 },
- { "#236", "X", &agent_universe, 236 },
- { "#237", "X", &agent_universe, 237 },
- { "#238", "X", &agent_universe, 238 },
- { "#239", "X", &agent_universe, 239 },
- { "#240", "X", &agent_universe, 240 },
- { "#241", "X", &agent_universe, 241 },
- { "#242", "X", &agent_universe, 242 },
- { "#243", "X", &agent_universe, 243 },
- { "#244", "X", &agent_universe, 244 },
- { "#245", "X", &agent_universe, 245 },
- { "#246", "X", &agent_universe, 246 },
- { "#247", "X", &agent_universe, 247 },
- { "#248", "X", &agent_universe, 248 },
- { "#249", "X", &agent_universe, 249 },
- { "#250", "X", &agent_universe, 250 },
- { "#251", "X", &agent_universe, 251 },
- { "#252", "X", &agent_universe, 252 },
- { "#253", "X", &agent_universe, 253 },
- { "#254", "X", &agent_universe, 254 },
- { "#end", "e", &agent_universe, 255 },
+ { "DOCSIS-device-class", "L", &agent_universe, 4 },
+ { "unknown-5", "X", &agent_universe, 5 },
+ { "unknown-6", "X", &agent_universe, 6 },
+ { "unknown-7", "X", &agent_universe, 7 },
+ { "unknown-8", "X", &agent_universe, 8 },
+ { "unknown-9", "X", &agent_universe, 9 },
+ { "unknown-10", "X", &agent_universe, 10 },
+ { "unknown-11", "X", &agent_universe, 11 },
+ { "unknown-12", "X", &agent_universe, 12 },
+ { "unknown-13", "X", &agent_universe, 13 },
+ { "unknown-14", "X", &agent_universe, 14 },
+ { "unknown-15", "X", &agent_universe, 15 },
+ { "unknown-16", "X", &agent_universe, 16 },
+ { "unknown-17", "X", &agent_universe, 17 },
+ { "unknown-18", "X", &agent_universe, 18 },
+ { "unknown-19", "X", &agent_universe, 19 },
+ { "unknown-20", "X", &agent_universe, 20 },
+ { "unknown-21", "X", &agent_universe, 21 },
+ { "unknown-22", "X", &agent_universe, 22 },
+ { "unknown-23", "X", &agent_universe, 23 },
+ { "unknown-24", "X", &agent_universe, 24 },
+ { "unknown-25", "X", &agent_universe, 25 },
+ { "unknown-26", "X", &agent_universe, 26 },
+ { "unknown-27", "X", &agent_universe, 27 },
+ { "unknown-28", "X", &agent_universe, 28 },
+ { "unknown-29", "X", &agent_universe, 29 },
+ { "unknown-30", "X", &agent_universe, 30 },
+ { "unknown-31", "X", &agent_universe, 31 },
+ { "unknown-32", "X", &agent_universe, 32 },
+ { "unknown-33", "X", &agent_universe, 33 },
+ { "unknown-34", "X", &agent_universe, 34 },
+ { "unknown-35", "X", &agent_universe, 35 },
+ { "unknown-36", "X", &agent_universe, 36 },
+ { "unknown-37", "X", &agent_universe, 37 },
+ { "unknown-38", "X", &agent_universe, 38 },
+ { "unknown-39", "X", &agent_universe, 39 },
+ { "unknown-40", "X", &agent_universe, 40 },
+ { "unknown-41", "X", &agent_universe, 41 },
+ { "unknown-42", "X", &agent_universe, 42 },
+ { "unknown-43", "X", &agent_universe, 43 },
+ { "unknown-44", "X", &agent_universe, 44 },
+ { "unknown-45", "X", &agent_universe, 45 },
+ { "unknown-46", "X", &agent_universe, 46 },
+ { "unknown-47", "X", &agent_universe, 47 },
+ { "unknown-48", "X", &agent_universe, 48 },
+ { "unknown-49", "X", &agent_universe, 49 },
+ { "unknown-50", "X", &agent_universe, 50 },
+ { "unknown-51", "X", &agent_universe, 51 },
+ { "unknown-52", "X", &agent_universe, 52 },
+ { "unknown-53", "X", &agent_universe, 53 },
+ { "unknown-54", "X", &agent_universe, 54 },
+ { "unknown-55", "X", &agent_universe, 55 },
+ { "unknown-56", "X", &agent_universe, 56 },
+ { "unknown-57", "X", &agent_universe, 57 },
+ { "unknown-58", "X", &agent_universe, 58 },
+ { "unknown-59", "X", &agent_universe, 59 },
+ { "unknown-60", "X", &agent_universe, 60 },
+ { "unknown-61", "X", &agent_universe, 61 },
+ { "unknown-62", "X", &agent_universe, 62 },
+ { "unknown-63", "X", &agent_universe, 63 },
+ { "unknown-64", "X", &agent_universe, 64 },
+ { "unknown-65", "X", &agent_universe, 65 },
+ { "unknown-66", "X", &agent_universe, 66 },
+ { "unknown-67", "X", &agent_universe, 67 },
+ { "unknown-68", "X", &agent_universe, 68 },
+ { "unknown-69", "X", &agent_universe, 69 },
+ { "unknown-70", "X", &agent_universe, 70 },
+ { "unknown-71", "X", &agent_universe, 71 },
+ { "unknown-72", "X", &agent_universe, 72 },
+ { "unknown-73", "X", &agent_universe, 73 },
+ { "unknown-74", "X", &agent_universe, 74 },
+ { "unknown-75", "X", &agent_universe, 75 },
+ { "unknown-76", "X", &agent_universe, 76 },
+ { "unknown-77", "X", &agent_universe, 77 },
+ { "unknown-78", "X", &agent_universe, 78 },
+ { "unknown-79", "X", &agent_universe, 79 },
+ { "unknown-80", "X", &agent_universe, 80 },
+ { "unknown-81", "X", &agent_universe, 81 },
+ { "unknown-82", "X", &agent_universe, 82 },
+ { "unknown-83", "X", &agent_universe, 83 },
+ { "unknown-84", "X", &agent_universe, 84 },
+ { "unknown-85", "X", &agent_universe, 85 },
+ { "unknown-86", "X", &agent_universe, 86 },
+ { "unknown-87", "X", &agent_universe, 87 },
+ { "unknown-88", "X", &agent_universe, 88 },
+ { "unknown-89", "X", &agent_universe, 89 },
+ { "unknown-90", "X", &agent_universe, 90 },
+ { "unknown-91", "X", &agent_universe, 91 },
+ { "unknown-92", "X", &agent_universe, 92 },
+ { "unknown-93", "X", &agent_universe, 93 },
+ { "unknown-94", "X", &agent_universe, 94 },
+ { "unknown-95", "X", &agent_universe, 95 },
+ { "unknown-96", "X", &agent_universe, 96 },
+ { "unknown-97", "X", &agent_universe, 97 },
+ { "unknown-98", "X", &agent_universe, 98 },
+ { "unknown-99", "X", &agent_universe, 99 },
+ { "unknown-100", "X", &agent_universe, 100 },
+ { "unknown-101", "X", &agent_universe, 101 },
+ { "unknown-102", "X", &agent_universe, 102 },
+ { "unknown-103", "X", &agent_universe, 103 },
+ { "unknown-104", "X", &agent_universe, 104 },
+ { "unknown-105", "X", &agent_universe, 105 },
+ { "unknown-106", "X", &agent_universe, 106 },
+ { "unknown-107", "X", &agent_universe, 107 },
+ { "unknown-108", "X", &agent_universe, 108 },
+ { "unknown-109", "X", &agent_universe, 109 },
+ { "unknown-110", "X", &agent_universe, 110 },
+ { "unknown-111", "X", &agent_universe, 111 },
+ { "unknown-112", "X", &agent_universe, 112 },
+ { "unknown-113", "X", &agent_universe, 113 },
+ { "unknown-114", "X", &agent_universe, 114 },
+ { "unknown-115", "X", &agent_universe, 115 },
+ { "unknown-116", "X", &agent_universe, 116 },
+ { "unknown-117", "X", &agent_universe, 117 },
+ { "unknown-118", "X", &agent_universe, 118 },
+ { "unknown-119", "X", &agent_universe, 119 },
+ { "unknown-120", "X", &agent_universe, 120 },
+ { "unknown-121", "X", &agent_universe, 121 },
+ { "unknown-122", "X", &agent_universe, 122 },
+ { "unknown-123", "X", &agent_universe, 123 },
+ { "unknown-124", "X", &agent_universe, 124 },
+ { "unknown-125", "X", &agent_universe, 125 },
+ { "unknown-126", "X", &agent_universe, 126 },
+ { "unknown-127", "X", &agent_universe, 127 },
+ { "unknown-128", "X", &agent_universe, 128 },
+ { "unknown-129", "X", &agent_universe, 129 },
+ { "unknown-130", "X", &agent_universe, 130 },
+ { "unknown-131", "X", &agent_universe, 131 },
+ { "unknown-132", "X", &agent_universe, 132 },
+ { "unknown-133", "X", &agent_universe, 133 },
+ { "unknown-134", "X", &agent_universe, 134 },
+ { "unknown-135", "X", &agent_universe, 135 },
+ { "unknown-136", "X", &agent_universe, 136 },
+ { "unknown-137", "X", &agent_universe, 137 },
+ { "unknown-138", "X", &agent_universe, 138 },
+ { "unknown-139", "X", &agent_universe, 139 },
+ { "unknown-140", "X", &agent_universe, 140 },
+ { "unknown-141", "X", &agent_universe, 141 },
+ { "unknown-142", "X", &agent_universe, 142 },
+ { "unknown-143", "X", &agent_universe, 143 },
+ { "unknown-144", "X", &agent_universe, 144 },
+ { "unknown-145", "X", &agent_universe, 145 },
+ { "unknown-146", "X", &agent_universe, 146 },
+ { "unknown-147", "X", &agent_universe, 147 },
+ { "unknown-148", "X", &agent_universe, 148 },
+ { "unknown-149", "X", &agent_universe, 149 },
+ { "unknown-150", "X", &agent_universe, 150 },
+ { "unknown-151", "X", &agent_universe, 151 },
+ { "unknown-152", "X", &agent_universe, 152 },
+ { "unknown-153", "X", &agent_universe, 153 },
+ { "unknown-154", "X", &agent_universe, 154 },
+ { "unknown-155", "X", &agent_universe, 155 },
+ { "unknown-156", "X", &agent_universe, 156 },
+ { "unknown-157", "X", &agent_universe, 157 },
+ { "unknown-158", "X", &agent_universe, 158 },
+ { "unknown-159", "X", &agent_universe, 159 },
+ { "unknown-160", "X", &agent_universe, 160 },
+ { "unknown-161", "X", &agent_universe, 161 },
+ { "unknown-162", "X", &agent_universe, 162 },
+ { "unknown-163", "X", &agent_universe, 163 },
+ { "unknown-164", "X", &agent_universe, 164 },
+ { "unknown-165", "X", &agent_universe, 165 },
+ { "unknown-166", "X", &agent_universe, 166 },
+ { "unknown-167", "X", &agent_universe, 167 },
+ { "unknown-168", "X", &agent_universe, 168 },
+ { "unknown-169", "X", &agent_universe, 169 },
+ { "unknown-170", "X", &agent_universe, 170 },
+ { "unknown-171", "X", &agent_universe, 171 },
+ { "unknown-172", "X", &agent_universe, 172 },
+ { "unknown-173", "X", &agent_universe, 173 },
+ { "unknown-174", "X", &agent_universe, 174 },
+ { "unknown-175", "X", &agent_universe, 175 },
+ { "unknown-176", "X", &agent_universe, 176 },
+ { "unknown-177", "X", &agent_universe, 177 },
+ { "unknown-178", "X", &agent_universe, 178 },
+ { "unknown-179", "X", &agent_universe, 179 },
+ { "unknown-180", "X", &agent_universe, 180 },
+ { "unknown-181", "X", &agent_universe, 181 },
+ { "unknown-182", "X", &agent_universe, 182 },
+ { "unknown-183", "X", &agent_universe, 183 },
+ { "unknown-184", "X", &agent_universe, 184 },
+ { "unknown-185", "X", &agent_universe, 185 },
+ { "unknown-186", "X", &agent_universe, 186 },
+ { "unknown-187", "X", &agent_universe, 187 },
+ { "unknown-188", "X", &agent_universe, 188 },
+ { "unknown-189", "X", &agent_universe, 189 },
+ { "unknown-190", "X", &agent_universe, 190 },
+ { "unknown-191", "X", &agent_universe, 191 },
+ { "unknown-192", "X", &agent_universe, 192 },
+ { "unknown-193", "X", &agent_universe, 193 },
+ { "unknown-194", "X", &agent_universe, 194 },
+ { "unknown-195", "X", &agent_universe, 195 },
+ { "unknown-196", "X", &agent_universe, 196 },
+ { "unknown-197", "X", &agent_universe, 197 },
+ { "unknown-198", "X", &agent_universe, 198 },
+ { "unknown-199", "X", &agent_universe, 199 },
+ { "unknown-200", "X", &agent_universe, 200 },
+ { "unknown-201", "X", &agent_universe, 201 },
+ { "unknown-202", "X", &agent_universe, 202 },
+ { "unknown-203", "X", &agent_universe, 203 },
+ { "unknown-204", "X", &agent_universe, 204 },
+ { "unknown-205", "X", &agent_universe, 205 },
+ { "unknown-206", "X", &agent_universe, 206 },
+ { "unknown-207", "X", &agent_universe, 207 },
+ { "unknown-208", "X", &agent_universe, 208 },
+ { "unknown-209", "X", &agent_universe, 209 },
+ { "unknown-210", "X", &agent_universe, 210 },
+ { "unknown-211", "X", &agent_universe, 211 },
+ { "unknown-212", "X", &agent_universe, 212 },
+ { "unknown-213", "X", &agent_universe, 213 },
+ { "unknown-214", "X", &agent_universe, 214 },
+ { "unknown-215", "X", &agent_universe, 215 },
+ { "unknown-216", "X", &agent_universe, 216 },
+ { "unknown-217", "X", &agent_universe, 217 },
+ { "unknown-218", "X", &agent_universe, 218 },
+ { "unknown-219", "X", &agent_universe, 219 },
+ { "unknown-220", "X", &agent_universe, 220 },
+ { "unknown-221", "X", &agent_universe, 221 },
+ { "unknown-222", "X", &agent_universe, 222 },
+ { "unknown-223", "X", &agent_universe, 223 },
+ { "unknown-224", "X", &agent_universe, 224 },
+ { "unknown-225", "X", &agent_universe, 225 },
+ { "unknown-226", "X", &agent_universe, 226 },
+ { "unknown-227", "X", &agent_universe, 227 },
+ { "unknown-228", "X", &agent_universe, 228 },
+ { "unknown-229", "X", &agent_universe, 229 },
+ { "unknown-230", "X", &agent_universe, 230 },
+ { "unknown-231", "X", &agent_universe, 231 },
+ { "unknown-232", "X", &agent_universe, 232 },
+ { "unknown-233", "X", &agent_universe, 233 },
+ { "unknown-234", "X", &agent_universe, 234 },
+ { "unknown-235", "X", &agent_universe, 235 },
+ { "unknown-236", "X", &agent_universe, 236 },
+ { "unknown-237", "X", &agent_universe, 237 },
+ { "unknown-238", "X", &agent_universe, 238 },
+ { "unknown-239", "X", &agent_universe, 239 },
+ { "unknown-240", "X", &agent_universe, 240 },
+ { "unknown-241", "X", &agent_universe, 241 },
+ { "unknown-242", "X", &agent_universe, 242 },
+ { "unknown-243", "X", &agent_universe, 243 },
+ { "unknown-244", "X", &agent_universe, 244 },
+ { "unknown-245", "X", &agent_universe, 245 },
+ { "unknown-246", "X", &agent_universe, 246 },
+ { "unknown-247", "X", &agent_universe, 247 },
+ { "unknown-248", "X", &agent_universe, 248 },
+ { "unknown-249", "X", &agent_universe, 249 },
+ { "unknown-250", "X", &agent_universe, 250 },
+ { "unknown-251", "X", &agent_universe, 251 },
+ { "unknown-252", "X", &agent_universe, 252 },
+ { "unknown-253", "X", &agent_universe, 253 },
+ { "unknown-254", "X", &agent_universe, 254 },
+ { "option-end", "e", &agent_universe, 255 },
};
struct universe server_universe;
struct option server_options [256] = {
- { "pad", "", &server_universe, 0 },
- { "default-lease-time", "T", &server_universe, 1 },
- { "max-lease-time", "T", &server_universe, 2 },
- { "min-lease-time", "T", &server_universe, 3 },
- { "dynamic-bootp-lease-cutoff", "T", &server_universe, 4 },
- { "dynamic-bootp-lease-length", "L", &server_universe, 5 },
- { "boot-unknown-clients", "f", &server_universe, 6 },
- { "dynamic-bootp", "f", &server_universe, 7 },
- { "allow-bootp", "f", &server_universe, 8 },
- { "allow-booting", "f", &server_universe, 9 },
- { "one-lease-per-client", "f", &server_universe, 10 },
- { "get-lease-hostnames", "f", &server_universe, 11 },
- { "use-host-decl-names", "f", &server_universe, 12 },
- { "use-lease-addr-for-default-route", "f", &server_universe, 13 },
- { "min-secs", "B", &server_universe, 14 },
- { "filename", "t", &server_universe, 15 },
- { "server-name", "t", &server_universe, 16 },
- { "next-server", "I", &server_universe, 17 },
- { "authoritative", "f", &server_universe, 18 },
- { "vendor-option-space", "U", &server_universe, 19 },
- { "always-reply-rfc1048", "f", &server_universe, 20 },
- { "site-option-space", "X", &server_universe, 21 },
- { "always-broadcast", "f", &server_universe, 22 },
- { "ddns-domainname", "t", &server_universe, 23 },
- { "ddns-hostname", "t", &server_universe, 24 },
- { "ddns-rev-domainname", "t", &server_universe, 25 },
- { "lease-file-name", "t", &server_universe, 26 },
- { "pid-file-name", "t", &server_universe, 27 },
- { "duplicates", "f", &server_universe, 28 },
- { "declines", "f", &server_universe, 29 },
- { "ddns-updates", "f", &server_universe, 30 },
- { "omapi-port", "S", &server_universe, 31 },
- { "local-port", "S", &server_universe, 32 },
- { "limited-broadcast-address", "I", &server_universe, 33 },
- { "remote-port", "S", &server_universe, 34 },
- { "local-address", "I", &server_universe, 35 },
- { "omapi-key", "d", &server_universe, 36 },
- { "stash-agent-options", "f", &server_universe, 37 },
- { "ddns-ttl", "T", &server_universe, 38 },
- { "ddns-update-style", "Nddns-styles.", &server_universe, 39 },
- { "client-updates", "f", &server_universe, 40 },
- { "update-optimization", "f", &server_universe, 41 },
- { "ping-check", "f", &server_universe, 42 },
- { "update-static-leases", "f", &server_universe, 43 },
- { "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
- { "#45", "X", &server_universe, 45 },
- { "#46", "X", &server_universe, 46 },
- { "#47", "X", &server_universe, 47 },
- { "#48", "X", &server_universe, 48 },
- { "#49", "X", &server_universe, 49 },
- { "#50", "X", &server_universe, 50 },
- { "#51", "X", &server_universe, 51 },
- { "#52", "X", &server_universe, 52 },
- { "#53", "X", &server_universe, 53 },
- { "#54", "X", &server_universe, 54 },
- { "#55", "X", &server_universe, 55 },
- { "#56", "X", &server_universe, 56 },
- { "#57", "X", &server_universe, 57 },
- { "#58", "X", &server_universe, 58 },
- { "#59", "X", &server_universe, 59 },
- { "#60", "X", &server_universe, 60 },
- { "#61", "X", &server_universe, 61 },
- { "#62", "X", &server_universe, 62 },
- { "#63", "X", &server_universe, 63 },
- { "#64", "X", &server_universe, 64 },
- { "#65", "X", &server_universe, 65 },
- { "#66", "X", &server_universe, 66 },
- { "#67", "X", &server_universe, 67 },
- { "#68", "X", &server_universe, 68 },
- { "#69", "X", &server_universe, 69 },
- { "#70", "X", &server_universe, 70 },
- { "#71", "X", &server_universe, 71 },
- { "#72", "X", &server_universe, 72 },
- { "#73", "X", &server_universe, 73 },
- { "#74", "X", &server_universe, 74 },
- { "#75", "X", &server_universe, 75 },
- { "#76", "X", &server_universe, 76 },
- { "#77", "X", &server_universe, 77 },
- { "#78", "X", &server_universe, 78 },
- { "#79", "X", &server_universe, 79 },
- { "#80", "X", &server_universe, 80 },
- { "#81", "X", &server_universe, 81 },
- { "#82", "X", &server_universe, 82 },
- { "#83", "X", &server_universe, 83 },
- { "#84", "X", &server_universe, 84 },
- { "#85", "X", &server_universe, 85 },
- { "#86", "X", &server_universe, 86 },
- { "#87", "X", &server_universe, 87 },
- { "#88", "X", &server_universe, 88 },
- { "#89", "X", &server_universe, 89 },
- { "#90", "X", &server_universe, 90 },
- { "#91", "X", &server_universe, 91 },
- { "#92", "X", &server_universe, 92 },
- { "#93", "X", &server_universe, 93 },
- { "#94", "X", &server_universe, 94 },
- { "#95", "X", &server_universe, 95 },
- { "#96", "X", &server_universe, 96 },
- { "#97", "X", &server_universe, 97 },
- { "#98", "X", &server_universe, 98 },
- { "#99", "X", &server_universe, 99 },
- { "#100", "X", &server_universe, 100 },
- { "#101", "X", &server_universe, 101 },
- { "#102", "X", &server_universe, 102 },
- { "#103", "X", &server_universe, 103 },
- { "#104", "X", &server_universe, 104 },
- { "#105", "X", &server_universe, 105 },
- { "#106", "X", &server_universe, 106 },
- { "#107", "X", &server_universe, 107 },
- { "#108", "X", &server_universe, 108 },
- { "#109", "X", &server_universe, 109 },
- { "#110", "X", &server_universe, 110 },
- { "#111", "X", &server_universe, 111 },
- { "#112", "X", &server_universe, 112 },
- { "#113", "X", &server_universe, 113 },
- { "#114", "X", &server_universe, 114 },
- { "#115", "X", &server_universe, 115 },
- { "#116", "X", &server_universe, 116 },
- { "#117", "X", &server_universe, 117 },
- { "#118", "X", &server_universe, 118 },
- { "#119", "X", &server_universe, 119 },
- { "#120", "X", &server_universe, 120 },
- { "#121", "X", &server_universe, 121 },
- { "#122", "X", &server_universe, 122 },
- { "#123", "X", &server_universe, 123 },
- { "#124", "X", &server_universe, 124 },
- { "#125", "X", &server_universe, 125 },
- { "#126", "X", &server_universe, 126 },
- { "#127", "X", &server_universe, 127 },
- { "#128", "X", &server_universe, 128 },
- { "#129", "X", &server_universe, 129 },
- { "#130", "X", &server_universe, 130 },
- { "#131", "X", &server_universe, 131 },
- { "#132", "X", &server_universe, 132 },
- { "#133", "X", &server_universe, 133 },
- { "#134", "X", &server_universe, 134 },
- { "#135", "X", &server_universe, 135 },
- { "#136", "X", &server_universe, 136 },
- { "#137", "X", &server_universe, 137 },
- { "#138", "X", &server_universe, 138 },
- { "#139", "X", &server_universe, 139 },
- { "#140", "X", &server_universe, 140 },
- { "#141", "X", &server_universe, 141 },
- { "#142", "X", &server_universe, 142 },
- { "#143", "X", &server_universe, 143 },
- { "#144", "X", &server_universe, 144 },
- { "#145", "X", &server_universe, 145 },
- { "#146", "X", &server_universe, 146 },
- { "#147", "X", &server_universe, 147 },
- { "#148", "X", &server_universe, 148 },
- { "#149", "X", &server_universe, 149 },
- { "#150", "X", &server_universe, 150 },
- { "#151", "X", &server_universe, 151 },
- { "#152", "X", &server_universe, 152 },
- { "#153", "X", &server_universe, 153 },
- { "#154", "X", &server_universe, 154 },
- { "#155", "X", &server_universe, 155 },
- { "#156", "X", &server_universe, 156 },
- { "#157", "X", &server_universe, 157 },
- { "#158", "X", &server_universe, 158 },
- { "#159", "X", &server_universe, 159 },
- { "#160", "X", &server_universe, 160 },
- { "#161", "X", &server_universe, 161 },
- { "#162", "X", &server_universe, 162 },
- { "#163", "X", &server_universe, 163 },
- { "#164", "X", &server_universe, 164 },
- { "#165", "X", &server_universe, 165 },
- { "#166", "X", &server_universe, 166 },
- { "#167", "X", &server_universe, 167 },
- { "#168", "X", &server_universe, 168 },
- { "#169", "X", &server_universe, 169 },
- { "#170", "X", &server_universe, 170 },
- { "#171", "X", &server_universe, 171 },
- { "#172", "X", &server_universe, 172 },
- { "#173", "X", &server_universe, 173 },
- { "#174", "X", &server_universe, 174 },
- { "#175", "X", &server_universe, 175 },
- { "#176", "X", &server_universe, 176 },
- { "#177", "X", &server_universe, 177 },
- { "#178", "X", &server_universe, 178 },
- { "#179", "X", &server_universe, 179 },
- { "#180", "X", &server_universe, 180 },
- { "#181", "X", &server_universe, 181 },
- { "#182", "X", &server_universe, 182 },
- { "#183", "X", &server_universe, 183 },
- { "#184", "X", &server_universe, 184 },
- { "#185", "X", &server_universe, 185 },
- { "#186", "X", &server_universe, 186 },
- { "#187", "X", &server_universe, 187 },
- { "#188", "X", &server_universe, 188 },
- { "#189", "X", &server_universe, 189 },
- { "#190", "X", &server_universe, 190 },
- { "#191", "X", &server_universe, 191 },
- { "#192", "X", &server_universe, 192 },
- { "#193", "X", &server_universe, 193 },
- { "#194", "X", &server_universe, 194 },
- { "#195", "X", &server_universe, 195 },
- { "#196", "X", &server_universe, 196 },
- { "#197", "X", &server_universe, 197 },
- { "#198", "X", &server_universe, 198 },
- { "#199", "X", &server_universe, 199 },
- { "#200", "X", &server_universe, 200 },
- { "#201", "X", &server_universe, 201 },
- { "#202", "X", &server_universe, 202 },
- { "#203", "X", &server_universe, 203 },
- { "#204", "X", &server_universe, 204 },
- { "#205", "X", &server_universe, 205 },
- { "#206", "X", &server_universe, 206 },
- { "#207", "X", &server_universe, 207 },
- { "#208", "X", &server_universe, 208 },
- { "#209", "X", &server_universe, 209 },
- { "#210", "X", &server_universe, 210 },
- { "#211", "X", &server_universe, 211 },
- { "#212", "X", &server_universe, 212 },
- { "#213", "X", &server_universe, 213 },
- { "#214", "X", &server_universe, 214 },
- { "#215", "X", &server_universe, 215 },
- { "#216", "X", &server_universe, 216 },
- { "#217", "X", &server_universe, 217 },
- { "#218", "X", &server_universe, 218 },
- { "#219", "X", &server_universe, 219 },
- { "#220", "X", &server_universe, 220 },
- { "#221", "X", &server_universe, 221 },
- { "#222", "X", &server_universe, 222 },
- { "#223", "X", &server_universe, 223 },
- { "#224", "X", &server_universe, 224 },
- { "#225", "X", &server_universe, 225 },
- { "#226", "X", &server_universe, 226 },
- { "#227", "X", &server_universe, 227 },
- { "#228", "X", &server_universe, 228 },
- { "#229", "X", &server_universe, 229 },
- { "#230", "X", &server_universe, 230 },
- { "#231", "X", &server_universe, 231 },
- { "#232", "X", &server_universe, 232 },
- { "#233", "X", &server_universe, 233 },
- { "#234", "X", &server_universe, 234 },
- { "#235", "X", &server_universe, 235 },
- { "#236", "X", &server_universe, 236 },
- { "#237", "X", &server_universe, 237 },
- { "#238", "X", &server_universe, 238 },
- { "#239", "X", &server_universe, 239 },
- { "#240", "X", &server_universe, 240 },
- { "#241", "X", &server_universe, 241 },
- { "#242", "X", &server_universe, 242 },
- { "#243", "X", &server_universe, 243 },
- { "#244", "X", &server_universe, 244 },
- { "#245", "X", &server_universe, 245 },
- { "#246", "X", &server_universe, 246 },
- { "#247", "X", &server_universe, 247 },
- { "#248", "X", &server_universe, 248 },
- { "#249", "X", &server_universe, 249 },
- { "#250", "X", &server_universe, 250 },
- { "#251", "X", &server_universe, 251 },
- { "#252", "X", &server_universe, 252 },
- { "#253", "X", &server_universe, 253 },
- { "#254", "X", &server_universe, 254 },
- { "option-end", "e", &server_universe, 255 },
+ { "pad", "", &server_universe, 0 },
+ { "default-lease-time", "T", &server_universe, 1 },
+ { "max-lease-time", "T", &server_universe, 2 },
+ { "min-lease-time", "T", &server_universe, 3 },
+ { "dynamic-bootp-lease-cutoff", "T", &server_universe, 4 },
+ { "dynamic-bootp-lease-length", "L", &server_universe, 5 },
+ { "boot-unknown-clients", "f", &server_universe, 6 },
+ { "dynamic-bootp", "f", &server_universe, 7 },
+ { "allow-bootp", "f", &server_universe, 8 },
+ { "allow-booting", "f", &server_universe, 9 },
+ { "one-lease-per-client", "f", &server_universe, 10 },
+ { "get-lease-hostnames", "f", &server_universe, 11 },
+ { "use-host-decl-names", "f", &server_universe, 12 },
+ { "use-lease-addr-for-default-route", "f", &server_universe, 13 },
+ { "min-secs", "B", &server_universe, 14 },
+ { "filename", "t", &server_universe, 15 },
+ { "server-name", "t", &server_universe, 16 },
+ { "next-server", "I", &server_universe, 17 },
+ { "authoritative", "f", &server_universe, 18 },
+ { "vendor-option-space", "U", &server_universe, 19 },
+ { "always-reply-rfc1048", "f", &server_universe, 20 },
+ { "site-option-space", "X", &server_universe, 21 },
+ { "always-broadcast", "f", &server_universe, 22 },
+ { "ddns-domainname", "t", &server_universe, 23 },
+ { "ddns-hostname", "t", &server_universe, 24 },
+ { "ddns-rev-domainname", "t", &server_universe, 25 },
+ { "lease-file-name", "t", &server_universe, 26 },
+ { "pid-file-name", "t", &server_universe, 27 },
+ { "duplicates", "f", &server_universe, 28 },
+ { "declines", "f", &server_universe, 29 },
+ { "ddns-updates", "f", &server_universe, 30 },
+ { "omapi-port", "S", &server_universe, 31 },
+ { "local-port", "S", &server_universe, 32 },
+ { "limited-broadcast-address", "I", &server_universe, 33 },
+ { "remote-port", "S", &server_universe, 34 },
+ { "local-address", "I", &server_universe, 35 },
+ { "omapi-key", "d", &server_universe, 36 },
+ { "stash-agent-options", "f", &server_universe, 37 },
+ { "ddns-ttl", "T", &server_universe, 38 },
+ { "ddns-update-style", "Nddns-styles.", &server_universe, 39 },
+ { "client-updates", "f", &server_universe, 40 },
+ { "update-optimization", "f", &server_universe, 41 },
+ { "ping-check", "f", &server_universe, 42 },
+ { "update-static-leases", "f", &server_universe, 43 },
+ { "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
+ { "do-forward-updates", "f", &server_universe, 45 },
+ { "ping-timeout", "T", &server_universe, 46 },
+ { "unknown-47", "X", &server_universe, 47 },
+ { "unknown-48", "X", &server_universe, 48 },
+ { "unknown-49", "X", &server_universe, 49 },
+ { "unknown-50", "X", &server_universe, 50 },
+ { "unknown-51", "X", &server_universe, 51 },
+ { "unknown-52", "X", &server_universe, 52 },
+ { "unknown-53", "X", &server_universe, 53 },
+ { "unknown-54", "X", &server_universe, 54 },
+ { "unknown-55", "X", &server_universe, 55 },
+ { "unknown-56", "X", &server_universe, 56 },
+ { "unknown-57", "X", &server_universe, 57 },
+ { "unknown-58", "X", &server_universe, 58 },
+ { "unknown-59", "X", &server_universe, 59 },
+ { "unknown-60", "X", &server_universe, 60 },
+ { "unknown-61", "X", &server_universe, 61 },
+ { "unknown-62", "X", &server_universe, 62 },
+ { "unknown-63", "X", &server_universe, 63 },
+ { "unknown-64", "X", &server_universe, 64 },
+ { "unknown-65", "X", &server_universe, 65 },
+ { "unknown-66", "X", &server_universe, 66 },
+ { "unknown-67", "X", &server_universe, 67 },
+ { "unknown-68", "X", &server_universe, 68 },
+ { "unknown-69", "X", &server_universe, 69 },
+ { "unknown-70", "X", &server_universe, 70 },
+ { "unknown-71", "X", &server_universe, 71 },
+ { "unknown-72", "X", &server_universe, 72 },
+ { "unknown-73", "X", &server_universe, 73 },
+ { "unknown-74", "X", &server_universe, 74 },
+ { "unknown-75", "X", &server_universe, 75 },
+ { "unknown-76", "X", &server_universe, 76 },
+ { "unknown-77", "X", &server_universe, 77 },
+ { "unknown-78", "X", &server_universe, 78 },
+ { "unknown-79", "X", &server_universe, 79 },
+ { "unknown-80", "X", &server_universe, 80 },
+ { "unknown-81", "X", &server_universe, 81 },
+ { "unknown-82", "X", &server_universe, 82 },
+ { "unknown-83", "X", &server_universe, 83 },
+ { "unknown-84", "X", &server_universe, 84 },
+ { "unknown-85", "X", &server_universe, 85 },
+ { "unknown-86", "X", &server_universe, 86 },
+ { "unknown-87", "X", &server_universe, 87 },
+ { "unknown-88", "X", &server_universe, 88 },
+ { "unknown-89", "X", &server_universe, 89 },
+ { "unknown-90", "X", &server_universe, 90 },
+ { "unknown-91", "X", &server_universe, 91 },
+ { "unknown-92", "X", &server_universe, 92 },
+ { "unknown-93", "X", &server_universe, 93 },
+ { "unknown-94", "X", &server_universe, 94 },
+ { "unknown-95", "X", &server_universe, 95 },
+ { "unknown-96", "X", &server_universe, 96 },
+ { "unknown-97", "X", &server_universe, 97 },
+ { "unknown-98", "X", &server_universe, 98 },
+ { "unknown-99", "X", &server_universe, 99 },
+ { "unknown-100", "X", &server_universe, 100 },
+ { "unknown-101", "X", &server_universe, 101 },
+ { "unknown-102", "X", &server_universe, 102 },
+ { "unknown-103", "X", &server_universe, 103 },
+ { "unknown-104", "X", &server_universe, 104 },
+ { "unknown-105", "X", &server_universe, 105 },
+ { "unknown-106", "X", &server_universe, 106 },
+ { "unknown-107", "X", &server_universe, 107 },
+ { "unknown-108", "X", &server_universe, 108 },
+ { "unknown-109", "X", &server_universe, 109 },
+ { "unknown-110", "X", &server_universe, 110 },
+ { "unknown-111", "X", &server_universe, 111 },
+ { "unknown-112", "X", &server_universe, 112 },
+ { "unknown-113", "X", &server_universe, 113 },
+ { "unknown-114", "X", &server_universe, 114 },
+ { "unknown-115", "X", &server_universe, 115 },
+ { "unknown-116", "X", &server_universe, 116 },
+ { "unknown-117", "X", &server_universe, 117 },
+ { "unknown-118", "X", &server_universe, 118 },
+ { "unknown-119", "X", &server_universe, 119 },
+ { "unknown-120", "X", &server_universe, 120 },
+ { "unknown-121", "X", &server_universe, 121 },
+ { "unknown-122", "X", &server_universe, 122 },
+ { "unknown-123", "X", &server_universe, 123 },
+ { "unknown-124", "X", &server_universe, 124 },
+ { "unknown-125", "X", &server_universe, 125 },
+ { "unknown-126", "X", &server_universe, 126 },
+ { "unknown-127", "X", &server_universe, 127 },
+ { "unknown-128", "X", &server_universe, 128 },
+ { "unknown-129", "X", &server_universe, 129 },
+ { "unknown-130", "X", &server_universe, 130 },
+ { "unknown-131", "X", &server_universe, 131 },
+ { "unknown-132", "X", &server_universe, 132 },
+ { "unknown-133", "X", &server_universe, 133 },
+ { "unknown-134", "X", &server_universe, 134 },
+ { "unknown-135", "X", &server_universe, 135 },
+ { "unknown-136", "X", &server_universe, 136 },
+ { "unknown-137", "X", &server_universe, 137 },
+ { "unknown-138", "X", &server_universe, 138 },
+ { "unknown-139", "X", &server_universe, 139 },
+ { "unknown-140", "X", &server_universe, 140 },
+ { "unknown-141", "X", &server_universe, 141 },
+ { "unknown-142", "X", &server_universe, 142 },
+ { "unknown-143", "X", &server_universe, 143 },
+ { "unknown-144", "X", &server_universe, 144 },
+ { "unknown-145", "X", &server_universe, 145 },
+ { "unknown-146", "X", &server_universe, 146 },
+ { "unknown-147", "X", &server_universe, 147 },
+ { "unknown-148", "X", &server_universe, 148 },
+ { "unknown-149", "X", &server_universe, 149 },
+ { "unknown-150", "X", &server_universe, 150 },
+ { "unknown-151", "X", &server_universe, 151 },
+ { "unknown-152", "X", &server_universe, 152 },
+ { "unknown-153", "X", &server_universe, 153 },
+ { "unknown-154", "X", &server_universe, 154 },
+ { "unknown-155", "X", &server_universe, 155 },
+ { "unknown-156", "X", &server_universe, 156 },
+ { "unknown-157", "X", &server_universe, 157 },
+ { "unknown-158", "X", &server_universe, 158 },
+ { "unknown-159", "X", &server_universe, 159 },
+ { "unknown-160", "X", &server_universe, 160 },
+ { "unknown-161", "X", &server_universe, 161 },
+ { "unknown-162", "X", &server_universe, 162 },
+ { "unknown-163", "X", &server_universe, 163 },
+ { "unknown-164", "X", &server_universe, 164 },
+ { "unknown-165", "X", &server_universe, 165 },
+ { "unknown-166", "X", &server_universe, 166 },
+ { "unknown-167", "X", &server_universe, 167 },
+ { "unknown-168", "X", &server_universe, 168 },
+ { "unknown-169", "X", &server_universe, 169 },
+ { "unknown-170", "X", &server_universe, 170 },
+ { "unknown-171", "X", &server_universe, 171 },
+ { "unknown-172", "X", &server_universe, 172 },
+ { "unknown-173", "X", &server_universe, 173 },
+ { "unknown-174", "X", &server_universe, 174 },
+ { "unknown-175", "X", &server_universe, 175 },
+ { "unknown-176", "X", &server_universe, 176 },
+ { "unknown-177", "X", &server_universe, 177 },
+ { "unknown-178", "X", &server_universe, 178 },
+ { "unknown-179", "X", &server_universe, 179 },
+ { "unknown-180", "X", &server_universe, 180 },
+ { "unknown-181", "X", &server_universe, 181 },
+ { "unknown-182", "X", &server_universe, 182 },
+ { "unknown-183", "X", &server_universe, 183 },
+ { "unknown-184", "X", &server_universe, 184 },
+ { "unknown-185", "X", &server_universe, 185 },
+ { "unknown-186", "X", &server_universe, 186 },
+ { "unknown-187", "X", &server_universe, 187 },
+ { "unknown-188", "X", &server_universe, 188 },
+ { "unknown-189", "X", &server_universe, 189 },
+ { "unknown-190", "X", &server_universe, 190 },
+ { "unknown-191", "X", &server_universe, 191 },
+ { "unknown-192", "X", &server_universe, 192 },
+ { "unknown-193", "X", &server_universe, 193 },
+ { "unknown-194", "X", &server_universe, 194 },
+ { "unknown-195", "X", &server_universe, 195 },
+ { "unknown-196", "X", &server_universe, 196 },
+ { "unknown-197", "X", &server_universe, 197 },
+ { "unknown-198", "X", &server_universe, 198 },
+ { "unknown-199", "X", &server_universe, 199 },
+ { "unknown-200", "X", &server_universe, 200 },
+ { "unknown-201", "X", &server_universe, 201 },
+ { "unknown-202", "X", &server_universe, 202 },
+ { "unknown-203", "X", &server_universe, 203 },
+ { "unknown-204", "X", &server_universe, 204 },
+ { "unknown-205", "X", &server_universe, 205 },
+ { "unknown-206", "X", &server_universe, 206 },
+ { "unknown-207", "X", &server_universe, 207 },
+ { "unknown-208", "X", &server_universe, 208 },
+ { "unknown-209", "X", &server_universe, 209 },
+ { "unknown-210", "X", &server_universe, 210 },
+ { "unknown-211", "X", &server_universe, 211 },
+ { "unknown-212", "X", &server_universe, 212 },
+ { "unknown-213", "X", &server_universe, 213 },
+ { "unknown-214", "X", &server_universe, 214 },
+ { "unknown-215", "X", &server_universe, 215 },
+ { "unknown-216", "X", &server_universe, 216 },
+ { "unknown-217", "X", &server_universe, 217 },
+ { "unknown-218", "X", &server_universe, 218 },
+ { "unknown-219", "X", &server_universe, 219 },
+ { "unknown-220", "X", &server_universe, 220 },
+ { "unknown-221", "X", &server_universe, 221 },
+ { "unknown-222", "X", &server_universe, 222 },
+ { "unknown-223", "X", &server_universe, 223 },
+ { "unknown-224", "X", &server_universe, 224 },
+ { "unknown-225", "X", &server_universe, 225 },
+ { "unknown-226", "X", &server_universe, 226 },
+ { "unknown-227", "X", &server_universe, 227 },
+ { "unknown-228", "X", &server_universe, 228 },
+ { "unknown-229", "X", &server_universe, 229 },
+ { "unknown-230", "X", &server_universe, 230 },
+ { "unknown-231", "X", &server_universe, 231 },
+ { "unknown-232", "X", &server_universe, 232 },
+ { "unknown-233", "X", &server_universe, 233 },
+ { "unknown-234", "X", &server_universe, 234 },
+ { "unknown-235", "X", &server_universe, 235 },
+ { "unknown-236", "X", &server_universe, 236 },
+ { "unknown-237", "X", &server_universe, 237 },
+ { "unknown-238", "X", &server_universe, 238 },
+ { "unknown-239", "X", &server_universe, 239 },
+ { "unknown-240", "X", &server_universe, 240 },
+ { "unknown-241", "X", &server_universe, 241 },
+ { "unknown-242", "X", &server_universe, 242 },
+ { "unknown-243", "X", &server_universe, 243 },
+ { "unknown-244", "X", &server_universe, 244 },
+ { "unknown-245", "X", &server_universe, 245 },
+ { "unknown-246", "X", &server_universe, 246 },
+ { "unknown-247", "X", &server_universe, 247 },
+ { "unknown-248", "X", &server_universe, 248 },
+ { "unknown-249", "X", &server_universe, 249 },
+ { "unknown-250", "X", &server_universe, 250 },
+ { "unknown-251", "X", &server_universe, 251 },
+ { "unknown-252", "X", &server_universe, 252 },
+ { "unknown-253", "X", &server_universe, 253 },
+ { "unknown-254", "X", &server_universe, 254 },
+ { "option-end", "e", &server_universe, 255 },
};
struct enumeration_value ddns_styles_values [] = {
@@ -806,7 +797,7 @@ void initialize_server_option_spaces()
agent_universe.store_tag = putUChar;
agent_universe.store_length = putUChar;
universes [agent_universe.index] = &agent_universe;
- agent_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&agent_universe.hash, 1, MDL);
if (!agent_universe.hash)
log_fatal ("Can't allocate agent option hash table.");
for (i = 0; i < 256; i++) {
@@ -833,7 +824,7 @@ void initialize_server_option_spaces()
server_universe.store_length = putUChar;
server_universe.index = universe_count++;
universes [server_universe.index] = &server_universe;
- server_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&server_universe.hash, 1, MDL);
if (!server_universe.hash)
log_fatal ("Can't allocate server option hash table.");
for (i = 0; i < 256; i++) {
diff --git a/tests/failover/dhcp-1.cf b/tests/failover/dhcp-1.cf
index 12515991..07842ab0 100644
--- a/tests/failover/dhcp-1.cf
+++ b/tests/failover/dhcp-1.cf
@@ -1,5 +1,16 @@
authoritative;
+class "even" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 0);
+}
+class "odd" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 1);
+}
+
lease-file-name "dhcp-1.leases";
pid-file-name "dhcp-1.pid";
ddns-update-style none;
@@ -17,7 +28,7 @@ failover peer "foo" {
port 51000;
peer address 10.0.0.1;
peer port 51001;
- max-response-delay 7;
+ max-response-delay 60;
max-unacked-updates 10;
mclt 100;
hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
@@ -100,18 +111,6 @@ shared-network LOCAL {
}
}
-shared-network LOCAL {
- subnet 127.0.0.0 netmask 255.255.255.0 {
- }
- subnet 10.0.2.0 netmask 255.255.255.0 {
- pool {
- deny dynamic bootp clients;
- failover peer "foo";
- range 10.0.2.100 10.0.2.200;
- }
- }
-}
-
shared-network NET-187 {
subnet 204.152.187.0 netmask 255.255.255.0 {
}
@@ -129,9 +128,19 @@ shared-network NET-187 {
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
- deny members of "sniffer";
+ allow members of "even";
+ option impress-servers 10.0.0.0;
+ failover peer "foo";
+ range 10.0.0.10 10.0.0.54;
+ range 10.0.0.100 10.0.0.149;
+ }
+ pool {
+ deny dynamic bootp clients;
+ allow members of "odd";
failover peer "foo";
- range 10.0.0.10 10.0.0.200;
+ option impress-servers 10.0.0.1;
+ range 10.0.0.55 10.0.0.99;
+ range 10.0.0.150 10.0.0.200;
}
pool {
deny dynamic bootp clients;
diff --git a/tests/failover/dhcp-2.cf b/tests/failover/dhcp-2.cf
index cbc47f46..c9dfabe8 100644
--- a/tests/failover/dhcp-2.cf
+++ b/tests/failover/dhcp-2.cf
@@ -1,5 +1,16 @@
authoritative;
+class "even" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 0);
+}
+class "odd" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 1);
+}
+
lease-file-name "dhcp-2.leases";
pid-file-name "dhcp-2.pid";
local-port 50000;
@@ -17,7 +28,7 @@ failover peer "foo" {
port 51001;
peer address 10.0.0.1;
peer port 51000;
- max-response-delay 7;
+ max-response-delay 60;
max-unacked-updates 10;
mclt 100;
load balance max seconds 2;
@@ -101,6 +112,8 @@ shared-network LOCAL {
shared-network 187-NET {
subnet 204.152.187.0 netmask 255.255.255.0 {
}
+ subnet 205.140.116.224 netmask 255.255.255.248 {
+ }
subnet 10.0.1.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
@@ -113,9 +126,19 @@ shared-network 187-NET {
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
- deny members of "sniffer";
+ allow members of "even";
+ option impress-servers 10.0.0.0;
+ failover peer "foo";
+ range 10.0.0.10 10.0.0.54;
+ range 10.0.0.100 10.0.0.149;
+ }
+ pool {
+ deny dynamic bootp clients;
+ allow members of "odd";
failover peer "foo";
- range 10.0.0.10 10.0.0.200;
+ option impress-servers 10.0.0.1;
+ range 10.0.0.55 10.0.0.99;
+ range 10.0.0.150 10.0.0.200;
}
pool {
deny dynamic bootp clients;