Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/dhcp Initial merge of ISC DHCP 3.0 into NetBSD tree...
details: https://anonhg.NetBSD.org/src/rev/3b087e48dd22
branches: trunk
changeset: 485208:3b087e48dd22
user: mellon <mellon%NetBSD.org@localhost>
date: Sat Apr 22 08:18:11 2000 +0000
description:
Initial merge of ISC DHCP 3.0 into NetBSD tree (incomplete)
diffstat:
usr.sbin/dhcp/Makefile | 2 +-
usr.sbin/dhcp/Makefile.inc | 8 +-
usr.sbin/dhcp/README | 232 +-
usr.sbin/dhcp/RELNOTES | 906 +++------
usr.sbin/dhcp/client/Makefile | 2 +-
usr.sbin/dhcp/client/dhclient-script.8 | 68 +-
usr.sbin/dhcp/client/dhclient.8 | 159 +-
usr.sbin/dhcp/client/dhclient.c | 2378 ++++++++++++------------
usr.sbin/dhcp/client/dhclient.leases.5 | 2 +-
usr.sbin/dhcp/client/scripts/freebsd | 9 +-
usr.sbin/dhcp/client/scripts/netbsd | 16 +-
usr.sbin/dhcp/common/Makefile | 7 +-
usr.sbin/dhcp/common/dhcp-contrib.5 | 214 --
usr.sbin/dhcp/common/dhcp-contrib.cat5 | 330 ---
usr.sbin/dhcp/common/dhcp-eval.cat5 | 462 ----
usr.sbin/dhcp/common/dhcp-options.5 | 1321 +++++++++----
usr.sbin/dhcp/common/dispatch.c | 748 +-------
usr.sbin/dhcp/common/errwarn.c | 391 ----
usr.sbin/dhcp/common/sysconf.c | 134 -
usr.sbin/dhcp/common/tables.c | 450 +++-
usr.sbin/dhcp/includes/dhcpd.h | 1715 ++++++++++++++---
usr.sbin/dhcp/minires/Makefile | 47 +
usr.sbin/dhcp/omapip/Makefile | 43 +
usr.sbin/dhcp/omapip/Makefile.dist | 85 -
usr.sbin/dhcp/relay/dhcrelay.8 | 172 +-
usr.sbin/dhcp/relay/dhcrelay.c | 630 +++++-
usr.sbin/dhcp/server/Makefile | 3 +-
usr.sbin/dhcp/server/bootp.c | 345 +-
usr.sbin/dhcp/server/dhcp.c | 3047 +++++++++++++++++++++++--------
usr.sbin/dhcp/server/dhcpd.8 | 100 +-
usr.sbin/dhcp/server/dhcpd.c | 388 +++-
usr.sbin/dhcp/server/dhcpd.conf.5 | 837 +++++++-
usr.sbin/dhcp/server/dhcpd.leases.5 | 46 +-
33 files changed, 8776 insertions(+), 6521 deletions(-)
diffs (truncated from 18878 to 300 lines):
diff -r 0db1035ec3a0 -r 3b087e48dd22 usr.sbin/dhcp/Makefile
--- a/usr.sbin/dhcp/Makefile Sat Apr 22 07:11:26 2000 +0000
+++ b/usr.sbin/dhcp/Makefile Sat Apr 22 08:18:11 2000 +0000
@@ -30,7 +30,7 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
#
-SUBDIR= common server client relay statmsg sysconfd
+SUBDIR= common omapip minires server client relay dhcpctl
all-server all-client all-relay: all-common
diff -r 0db1035ec3a0 -r 3b087e48dd22 usr.sbin/dhcp/Makefile.inc
--- a/usr.sbin/dhcp/Makefile.inc Sat Apr 22 07:11:26 2000 +0000
+++ b/usr.sbin/dhcp/Makefile.inc Sat Apr 22 08:18:11 2000 +0000
@@ -34,10 +34,14 @@
COBJDIR!=cd $(.CURDIR)/../common; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
+OMOBJDIR!=cd $(.CURDIR)/../omapip; \
+ printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
+MROBJDIR!=cd $(.CURDIR)/../minires; \
+ printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
CPPFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../includes
-LDADD= ${COBJDIR}/libdhcp.a
-DPADD= ${COBJDIR}/libdhcp.a
+LDADD= ${COBJDIR}/libdhcp.a ${OMOBJDIR}/libomapi.a ${MROBJDIR}/libminires.a
+DPADD= ${COBJDIR}/libdhcp.a ${OMOBJDIR}/libomapi.a ${MROBJDIR}/libminires.a
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
diff -r 0db1035ec3a0 -r 3b087e48dd22 usr.sbin/dhcp/README
--- a/usr.sbin/dhcp/README Sat Apr 22 07:11:26 2000 +0000
+++ b/usr.sbin/dhcp/README Sat Apr 22 08:18:11 2000 +0000
@@ -1,7 +1,43 @@
Internet Software Consortium
Dynamic Host Configuration Protocol Distribution
- Version 2, Beta 1, Patchlevel 27
- April 23, 1999
+ Version 3, Beta 2, Patchlevel 0
+ January 21, 2000
+
+ README FILE
+
+You should read this file carefully before trying to install or use
+the ISC DHCP Distribution.
+
+ TABLE OF CONTENTS
+
+ 1 WHERE TO FIND DOCUMENTATION
+ 2 RELEASE STATUS
+ 3 BUILDING THE DHCP DISTRIBUTION
+ 3.1 UNPACKING IT
+ 3.2 CONFIGURING IT
+ 3.2.1 DYNAMIC DNS UPDATES
+ 3.3 BUILDING IT
+ 4 INSTALLING THE DHCP DISTRIBUTION
+ 5 USING THE DHCP DISTRIBUTION
+ 5.1 LINUX
+ 5.1.1 IF_TR.H NOT FOUND
+ 5.1.2 SO_ATTACH_FILTER UNDECLARED
+ 5.1.3 PROTOCOL NOT CONFIGURED
+ 5.1.4 BROADCAST
+ 5.1.5 FIREWALL RULES
+ 5.1.6 IP BOOTP AGENT
+ 5.1.7 MULTIPLE INTERFACES
+ 5.2 SCO
+ 5.3 HP-UX
+ 5.4 ULTRIX
+ 5.5 FreeBSD
+ 5.6 NeXTSTEP
+ 5.7 SOLARIS
+ 6 SUPPORT
+ 6.1 HOW TO REPORT BUGS
+ 7 KNOWN BUGS
+
+ WHERE TO FIND DOCUMENTATION
Documentation for this software includes this README file, the
RELNOTES file, and the manual pages, which are in the server, common,
@@ -15,25 +51,37 @@
the DHCP server lease database is in the dhcpd.leases man page.
Server configuration documentation is in the dhcpd.conf man page as
well as the dhcp-options man page. A sample DHCP server
-configuration is in the file server/dhcpd.conf.
+configuration is in the file server/dhcpd.conf. The source for the
+dhcpd, dhcpd.leases and dhcpd.conf man pages is in the server/ sub-
+directory in the distribution. The source for the dhcp-options.5
+man page is in the common/ subdirectory.
DHCP Client documentation is in the dhclient man page. DHCP client
configuration documentation is in the dhclient.conf man page and the
dhcp-options man page. The DHCP client configuration script is
documented in the dhclient-script man page. The format of the DHCP
client lease database is documented in the dhclient.leases man page.
+The source for all these man pages is in the client/ subdirectory in
+the distribution. In addition, the dhcp-options man page should be
+referred to for information about DHCP options.
-DHCP relay agent documentation is in the dhcrelay man page.
+DHCP relay agent documentation is in the dhcrelay man page, the source
+for which is distributed in the relay/ subdirectory.
To read installed manual pages, use the man command. Type "man page"
-where page is the name of the manual page.
+where page is the name of the manual page. This will only work if
+you have installed the ISC DHCP distribution using the ``make install''
+command (described later).
If you want to read manual pages that aren't installed, you can type
``nroff -man page |more'' where page is the filename of the
unformatted manual page. The filename of an unformatted manual page
is the name of the manual page, followed by '.', followed by some
number - 5 for documentation about files, and 8 for documentation
-about programs.
+about programs. For example, to read the dhcp-options man page,
+you would type ``nroff -man common/dhcp-options.5 |more'', assuming
+your current working directory is the top level directory of the ISC
+DHCP Distribution.
If you do not have the nroff command, you can type ``more catpage''
where catpage is the filename of the catted man page. Catted man
@@ -44,13 +92,12 @@
files to which they refer will not be correct for your operating
system.
-This is the first Beta release of Version 2 of the Internet Software
-Consortium DHCP Distribution. In version 2.0, this distribution
-includes a DHCP server, a DHCP client, and a BOOTP/DHCP relay agent.
-This beta is believed to be fairly stable. However, DHCP server users
-running a production environment should probably still use version
-1.0, which is more stable, having been in a feature freeze since
-November of 1996.
+ RELEASE STATUS
+
+This is the first 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.
In this release, the server and relay agent currently work well on
NetBSD, Linux after kernel version 2.0.30, FreeBSD, BSD/OS, Ultrix,
@@ -83,16 +130,20 @@
BUILDING THE DHCP DISTRIBUTION
+ UNPACKING IT
+
To build the DHCP Distribution, unpack the compressed tar file using
the tar utility and the gzip command - type something like:
- zcat dhcp-2.0b1pl27.tar.gz |tar xvf -
+ zcat dhcp-3.0b2pl0.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.
-Now, cd to the dhcp-2.0b1pl27 subdirectory that you've just created and
-configure the source tree by typing:
+ CONFIGURING IT
+
+Now, cd to the dhcp-3.0b2pl0 subdirectory that you've just
+created and configure the source tree by typing:
./configure
@@ -102,6 +153,30 @@
system you are using, that system is not supported - you are on
your own.
+ DYNAMIC DNS UPDATES
+
+An interim implementation of dynamic DNS updates is included in this
+release. This implementation is not built by default. To use this
+implementation, you must have installed the latest version of bind 8.2
+(see http://www.isc.org for more information about BIND). The
+configuration utility assumes that the BIND 8.2 distribution libraries
+and includes are under the /usr/local/bind directory, except on
+FreeBSD, where it assumes they are in /usr/local. If you have
+installed them elsewhere, you should set the BINDLIB and BINDINC
+variables in site.conf to override the values that will be set by the
+configure script from Makefile.conf.
+
+Assuming that you have BIND 8.2.2-P3 or later installed, you can build
+dynamic DNS update support using:
+
+ ./configure --with-nsupdate
+
+There is documentation for the DDNS support in the dhcpd.conf manual
+page - see the beginning of this document for information on finding
+manual pages.
+
+ BUILDING IT
+
Once you've run configure, just type ``make'', and after a while
you should have a dhcp server. If you get compile errors on one
of the supported systems mentioned earlier, please let us know.
@@ -112,11 +187,15 @@
to do some programming or debugging on your own to get the DHCP
Distribution working.
+ INSTALLING THE DHCP DISTRIBUTION
+
Once you have successfully gotten the DHCP Distribution to build, you
can install it by typing ``make install''. If you already have an old
version of the DHCP Distribution installed, you may want to save it
before typing ``make install''.
+ USING THE DHCP DISTRIBUTION
+
LINUX
There are three big LINUX issues: the all-ones broadcast address,
@@ -125,6 +204,16 @@
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
@@ -148,29 +237,46 @@
it's because your kernel doesn't have the linux packetfilter or raw
packet socket configured:
- Set CONFIG_PACKET=y and CONFIG_FILTER=y in your kernel configuration
+ Make sure CONFIG_PACKET (Packet socket) and CONFIG_FILTER (Socket
+ Filtering) are enabled in your kernel configuration
-If this happens, you need to edit your linux kernel .config file, set
-CONFIG_FILTER=y and CONFIG_PACKET=y, and rebuild your kernel. If the
-preceding sentence made no sense to you, ask your Linux vendor/guru
-for help - please don't ask us.
+If this happens, you need to configure your Linux kernel to support
+Socket Filtering and the Packet socket. You can do this by typing
+``make config'', ``make menuconfig'' or ``make xconfig'', and then
+enabling the Packet socket and Socket Filtering options that you'll
+see displayed on the menu or in the questionnaire. You can also edit
+your linux kernel .config file directly: set CONFIG_FILTER=y and
+CONFIG_PACKET=y. If you do this, make sure you run ``make oldconfig''
+afterwards, so that the changes you've made are propogated to the
+kernel header files. After you've reconfigured, you need to type
+``make'' to build a new Linux kernel, and then install it in the
+appropriate place (probably /linux). Make sure to save a copy of your
+old /linux.
+
+If the preceding paragraph made no sense to you, ask your Linux
+vendor/guru for help - please don't ask us.
If you set CONFIG_PACKET=m or CONFIG_FILTER=m, then you must tell the
kernel module loader to load the appropriate modules. If this doesn't
make sense to you, don't use CONFIG_whatever=m - use CONFIG_whatever=y.
Don't ask for help with this on the DHCP mailing list - it's a Linux
-kernel issue.
+kernel issue. This is probably not a problem with the most recent
+Linux 2.2.x kernels.
LINUX: BROADCAST
+On older versions of Linux (versions prior to 2.2), there is a
+potential problem with the broadcast address being sent incorrectly.
In order for dhcpd to work correctly with picky DHCP clients (e.g.,
Windows 95), it must be able to send packets with an IP destination
-address of 255.255.255.255. Unfortunately, Linux insists on changing
-255.255.255.255 into the local subnet broadcast address (here, that's
-192.5.5.223). This results in a DHCP protocol violation, and while
-many DHCP clients don't notice the problem, some (e.g., all Microsoft
-DHCP clients) do. Clients that have this problem will appear not to
-see DHCPOFFER messages from the server.
+address of 255.255.255.255. Unfortunately, Linux changes an IP
+destination of 255.255.255.255 into the local subnet broadcast address
+(here, that's 192.5.5.223). This isn't a problem on Linux 2.2 and
+later kernels, since we completely bypass the Linux IP stack, but on
+old versions of Linux 2.1 and all versions of Linux prior to 2.1, it
+is a problem - pickier DHCP clients connected to the same network as
+the ISC DHCP server or ISC relay agent will not see messages from the
+DHCP server.
It is possible to work around this problem on some versions of Linux
by creating a host route from your network interface address to
@@ -196,6 +302,21 @@
If you are not using eth0 as your network interface, you should
specify the network interface you *are* using in your route command.
+ LINUX: FIREWALL RULES
+
+If you are running the DHCP server or client on a Linux system that's
+also acting as a firewall, you must be sure to allow DHCP packets
+through the firewall - Linux firewalls make filtering decisions before
+they make the forwarding decision, so they will filter packets that
Home |
Main Index |
Thread Index |
Old Index