mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Import Patchlevel 1 of the ISC 2.0 dhcp client.
This commit is contained in:
parent
f1b2a73d60
commit
ee4f4a92db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/isc-dhcp/dist/; revision=62104
332
contrib/isc-dhcp/Makefile.conf
Normal file
332
contrib/isc-dhcp/Makefile.conf
Normal file
@ -0,0 +1,332 @@
|
||||
# Makefile.conf
|
||||
#
|
||||
# Copyright (c) 1996, 1997, 1998, 1999 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.
|
||||
#
|
||||
|
||||
## Defaults...
|
||||
SCRIPT = none
|
||||
BINDIR = /usr/sbin
|
||||
CLIENTBINDIR=/sbin
|
||||
ADMMANEXT = .0
|
||||
FFMANEXT = .0
|
||||
ADMMANDIR = /usr/share/man/cat8
|
||||
FFMANDIR = /usr/share/man/cat5
|
||||
INSTALL = install -c
|
||||
MANINSTALL = install -c -m 444
|
||||
CHMOD = chmod
|
||||
CATMANPAGES =
|
||||
MANCAT = cat
|
||||
ETC = /etc
|
||||
VARRUN = /var/run
|
||||
VARDB = /var/db
|
||||
|
||||
# Major version number (if applicable)
|
||||
##--majver--
|
||||
MAJORVERSION=MajorVersion
|
||||
##--majver--
|
||||
|
||||
# Minor version number (if applicable)
|
||||
##--minver--
|
||||
MINORVERSION=MinorVersion
|
||||
##--minver--
|
||||
|
||||
## Porting::
|
||||
#
|
||||
# For each supported operating system, there is a block of text below
|
||||
# beginning with #--os-name-- and ending with #--os-name--. Between
|
||||
# these delimiters are assignments, commented out, which define the
|
||||
# Makefile variables required for that operating system.
|
||||
#
|
||||
# The configure shell script figures out what operating system it's
|
||||
# being run on and then runs Makefile.dist through a sed script which
|
||||
# removes the comment characters from the appropriate set of
|
||||
# assignments, and writes the output to Makefile.
|
||||
|
||||
## AIX 4.1.5.0
|
||||
##--aix--
|
||||
#CF = cf/aix.h
|
||||
#CC=cc -Daix
|
||||
#INSTALL=/usr/ucb/install
|
||||
#MANINSTALL=/usr/ucb/install
|
||||
#ADMMANEXT = .8
|
||||
#FFMANEXT = .5
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
##--aix--
|
||||
|
||||
## NEXTSTEP 3.x,4.x
|
||||
##--nextstep--
|
||||
#LIBS =
|
||||
#CF = cf/nextstep.h
|
||||
#CC=cc
|
||||
#COPTS = -Wall
|
||||
#BINDIR=/usr/etc
|
||||
#ADMMANDIR = /usr/local/man/cat8
|
||||
#FFMANDIR = /usr/local/man/cat5
|
||||
#ADMMANEXT = .8
|
||||
#FFMANEXT = .5
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
##--nextstep--
|
||||
|
||||
## SunOS 4.1
|
||||
##--sunos4--
|
||||
#LIBS = -lresolv
|
||||
#CF = cf/sunos4.h
|
||||
#BINDIR=/usr/etc
|
||||
#CLIENTBINDIR=/etc
|
||||
#ADMMANEXT = .8
|
||||
#FFMANEXT = .5
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
##--sunos4--
|
||||
|
||||
## Solaris 2.5 (with gcc)
|
||||
##--sunos5-gcc--
|
||||
#INSTALL=/usr/ucb/install
|
||||
#MANINSTALL=/usr/ucb/install
|
||||
#LIBS = -lresolv -lsocket -lnsl -lgen
|
||||
#CC=gcc
|
||||
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Wno-char-subscripts -Werror
|
||||
#CF = cf/sunos5-5.h
|
||||
#ADMMANDIR = /usr/share/man/cat1m
|
||||
#ADMMANEXT = .1m
|
||||
#FFMANDIR = /usr/share/man/cat4
|
||||
#FFMANEXT = .4
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
#SCRIPT=solaris
|
||||
##--sunos5-gcc--
|
||||
|
||||
## Solaris 2.5 (with Sun cc)
|
||||
##--sunos5-cc--
|
||||
#INSTALL=/usr/ucb/install
|
||||
#MANINSTALL=/usr/ucb/install
|
||||
#LIBS = -lresolv -lsocket -lnsl -lgen
|
||||
#CC=cc
|
||||
#COPTS = -D__svr4__
|
||||
#CF = cf/sunos5-5.h
|
||||
#ADMMANDIR = /usr/share/man/cat1m
|
||||
#ADMMANEXT = .1m
|
||||
#FFMANDIR = /usr/share/man/cat4
|
||||
#FFMANEXT = .4
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
#SCRIPT=solaris
|
||||
##--sunos5-cc--
|
||||
|
||||
## DEC Alpha/OSF1
|
||||
##--alphaosf--
|
||||
#CC=cc -std0
|
||||
#INSTALL=/usr/ucb/installbsd
|
||||
#MANINSTALL=/usr/ucb/installbsd
|
||||
#LIBS=
|
||||
#CF = cf/alphaosf.h
|
||||
#ADMMANEXT = .8
|
||||
#FFMANEXT = .5
|
||||
#VARDB = /etc
|
||||
##--alphaosf--
|
||||
|
||||
## BSD/OS 2.1
|
||||
##--bsdos--
|
||||
#LIBS= -lresolv
|
||||
#CC=gcc2
|
||||
#CF = cf/bsdos.h
|
||||
##--bsdos--
|
||||
|
||||
## FreeBSD
|
||||
##--freebsd--
|
||||
#CF = cf/freebsd.h
|
||||
#SCRIPT=freebsd
|
||||
##--freebsd--
|
||||
|
||||
## Rhapsody
|
||||
##--rhapsody--
|
||||
#CF = cf/rhapsody.h
|
||||
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Werror -pipe
|
||||
#SCRIPT=rhapsody
|
||||
##--rhapsody--
|
||||
|
||||
## NetBSD
|
||||
##--netbsd--
|
||||
#CF = cf/netbsd.h
|
||||
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Werror -pipe
|
||||
#SCRIPT=netbsd
|
||||
##--netbsd--
|
||||
|
||||
## Ultrix
|
||||
##--ultrix--
|
||||
#BINDIR = /usr/etc
|
||||
#CLIENTBINDIR=/etc
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
#CF = cf/ultrix.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/man/man5
|
||||
#FFMANEXT = .5
|
||||
##--ultrix--
|
||||
|
||||
## Linux 1.x
|
||||
##--linux-1--
|
||||
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION)
|
||||
#CF = cf/linux.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#VARRUN = /var/run
|
||||
#VARDB = /var/state/dhcp # see rationale in includes/cf/linux.h
|
||||
#SCRIPT=linux
|
||||
##--linux-1--
|
||||
|
||||
## Linux 2.0
|
||||
##--linux-2.0--
|
||||
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION)
|
||||
#CF = cf/linux.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#VARRUN = /var/run
|
||||
#VARDB = /var/state/dhcp # see rationale in includes/cf/linux.h
|
||||
#SCRIPT=linux
|
||||
##--linux-2.0--
|
||||
|
||||
## Linux 2.1
|
||||
##--linux-2.1--
|
||||
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION)
|
||||
#CF = cf/linux.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/share/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#VARRUN = /var/run
|
||||
#VARDB = /var/state/dhcp # see rationale in includes/cf/linux.h
|
||||
#SCRIPT=linux
|
||||
##--linux-2.1--
|
||||
|
||||
## Linux 2.2
|
||||
##--linux-2.2--
|
||||
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION)
|
||||
#CF = cf/linux.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/share/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#VARRUN = /var/run
|
||||
#VARDB = /var/state/dhcp # see rationale in includes/cf/linux.h
|
||||
#SCRIPT=linux
|
||||
##--linux-2.2--
|
||||
|
||||
## SCO
|
||||
##--sco--
|
||||
#CF = cf/sco.h
|
||||
#PREDEFINES=-DSCO -DBROKEN_ANSI
|
||||
#BINDIR = /usr/etc
|
||||
#CLIENTBINDIR=/etc
|
||||
#ADMMANDIR = /usr/man/cat.ADMN
|
||||
#ADMMANEXT = .ADMN.Z
|
||||
#FFMANDIR = /usr/man/cat.SFF
|
||||
#FFMANEXT = .SFF.Z
|
||||
#INSTALL = cp
|
||||
#MANFROM = <
|
||||
#MANINSTALL = compress
|
||||
#MANTO = >
|
||||
#VARRUN = /etc
|
||||
#VARDB = /etc
|
||||
#CATMANPAGES=
|
||||
##--sco--
|
||||
|
||||
## QNX
|
||||
##--qnx--
|
||||
#CF = cf/qnx.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#VARRUN = /etc
|
||||
#COPTS=-w3 -Dlint
|
||||
#LFLAGS=$(DEBUG) "-Wl,op symfile" -l socket
|
||||
#MANINSTALL = /bin/true
|
||||
#INSTALL = cp
|
||||
#BINDIR = /etc
|
||||
#CLIENTBINDIR = /etc
|
||||
##--qnx--
|
||||
|
||||
## CygWin32
|
||||
##--cygwin32--
|
||||
#CF = cf/cygwin32.h
|
||||
#ADMMANDIR = /usr/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/man/man5
|
||||
#FFMANEXT = .5
|
||||
#VARRUN = /etc
|
||||
#MANINSTALL = /bin/true
|
||||
#INSTALL = cp
|
||||
#BINDIR = /etc
|
||||
#CLIENTBINDIR = /etc
|
||||
#CC=/usr/local/i386-unknown-cygwin32/bin/gcc
|
||||
#AR=/usr/local/i386-unknown-cygwin32/bin/ar
|
||||
#AS=/usr/local/i386-unknown-cygwin32/bin/as
|
||||
#LD=/usr/local/i386-unknown-cygwin32/bin/ld
|
||||
#NM=/usr/local/i386-unknown-cygwin32/bin/nm
|
||||
#RANLIB=/usr/local/i386-unknown-cygwin32/bin/ranlib
|
||||
#STRIP=/usr/local/i386-unknown-cygwin32/bin/strip
|
||||
##--cygwin32--
|
||||
|
||||
## IRIX 6.x
|
||||
##--irix--
|
||||
#LIBS = -lbind
|
||||
#LFLAGS=$(DEBUG) -L/usr/local/lib -Wl,-woff,84 -Wl,-woff,85 -Wl,-woff,134
|
||||
#CC=gcc
|
||||
#COPTS = -I/usr/local/include
|
||||
#CF = cf/irix.h
|
||||
#BINDIR = /usr/local/etc
|
||||
#ADMMANDIR = /usr/local/man/man8
|
||||
#ADMMANEXT = .8
|
||||
#FFMANDIR = /usr/local/man/man5
|
||||
#FFMANEXT = .5
|
||||
#MANCAT = man
|
||||
#INSTALL = install
|
||||
#MANINSTALL = install
|
||||
#CHMOD = chmod
|
||||
#ETC = /etc
|
||||
#VARRUN = /etc
|
||||
#VARDB = /usr/local/etc/dhcp
|
||||
##--irix--
|
94
contrib/isc-dhcp/Makefile.dist
Normal file
94
contrib/isc-dhcp/Makefile.dist
Normal file
@ -0,0 +1,94 @@
|
||||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996, 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.
|
||||
#
|
||||
|
||||
SUBDIRS= common server client relay
|
||||
|
||||
all:
|
||||
@for dir in ${SUBDIRS}; do \
|
||||
echo "Making all in $$dir"; \
|
||||
(cd $$dir; $(MAKE) all) || exit 1; \
|
||||
done
|
||||
@if [ `uname` = Linux ]; then \
|
||||
echo; \
|
||||
echo " !!!! WARNING !!!!"; \
|
||||
echo ; \
|
||||
echo "The default location for the dhcpd.leases file has \
|
||||
changed!!!"; \
|
||||
echo; \
|
||||
echo "It is now in /var/state/dhcp. If you are not"; \
|
||||
echo "installing this for the first time, please move your"; \
|
||||
echo "lease database to the new location before using this"; \
|
||||
echo "software."; \
|
||||
echo; \
|
||||
echo " !!!! WARNING !!!!"; \
|
||||
echo; \
|
||||
fi
|
||||
|
||||
install:
|
||||
@for dir in ${SUBDIRS}; do \
|
||||
echo "Installing in $$dir"; \
|
||||
(cd $$dir; $(MAKE) install) || exit 1; \
|
||||
done
|
||||
@if [ `uname` = Linux ]; then \
|
||||
echo; \
|
||||
echo " !!!! WARNING !!!!"; \
|
||||
echo ; \
|
||||
echo "The default location for the dhcpd.leases file has \
|
||||
changed!!!"; \
|
||||
echo; \
|
||||
echo "It is now in /var/state/dhcp. If you are not"; \
|
||||
echo "installing this for the first time, please move your"; \
|
||||
echo "lease database to the new location before using this"; \
|
||||
echo "software."; \
|
||||
echo; \
|
||||
echo " !!!! WARNING !!!!"; \
|
||||
echo; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
@for dir in ${SUBDIRS}; do \
|
||||
echo "Cleaning in $$dir"; \
|
||||
(cd $$dir; $(MAKE) clean) || exit 1; \
|
||||
done
|
||||
|
||||
realclean:
|
||||
@for dir in ${SUBDIRS}; do \
|
||||
echo "Really cleaning in $$dir"; \
|
||||
(cd $$dir; $(MAKE) realclean) || exit 1; \
|
||||
done
|
||||
|
||||
distclean:
|
||||
@for dir in ${SUBDIRS}; do \
|
||||
echo "Really, really cleaning in $$dir"; \
|
||||
(cd $$dir; $(MAKE) distclean) || exit 1; \
|
||||
done
|
||||
@rm -f Makefile
|
@ -1,74 +1,81 @@
|
||||
Internet Software Consortium
|
||||
Dynamic Host Configuration Protocol Distribution
|
||||
Version 2
|
||||
June 22, 1999
|
||||
<C><H4>Internet Software Consortium</H4></C>
|
||||
<C><H4>Dynamic Host Configuration Protocol Distribution</H4></C>
|
||||
<C><H4>Version 2 Patchlevel 1</H4></C>
|
||||
<C><H4>June 24, 2000</H4></C>
|
||||
|
||||
README FILE
|
||||
<C><H4>README FILE</H4></C>
|
||||
|
||||
You should read this file carefully before trying to install or use
|
||||
the ISC DHCP Distribution.
|
||||
<P>You should read this file carefully before trying to install or use
|
||||
the ISC DHCP Distribution.</P>
|
||||
|
||||
TABLE OF CONTENTS
|
||||
<OL>
|
||||
<C><B>TABLE OF CONTENTS</B></C>
|
||||
<DL>
|
||||
<DT><A HREF="#1"1</A><DD>WHERE TO FIND DOCUMENTATION
|
||||
<DT><A HREF="#2"2</A><DD>RELEASE STATUS
|
||||
<DT><A HREF="#3"3</A><DD>BUILDING THE DHCP DISTRIBUTION
|
||||
<DT><A HREF="#4"4</A><DD>INSTALLING THE DHCP DISTRIBUTION
|
||||
<DT><A HREF="#5"5</A><DD>USING THE DHCP DISTRIBUTION
|
||||
<DL>
|
||||
<DT><A HREF="#5.1"5.1</A><DD>LINUX
|
||||
<DL>
|
||||
<DT><A HREF="#5.1.1"5.1.1</A><DD>SO_ATTACH_FILTER UNDECLARED
|
||||
<DT><A HREF="#5.1.2"5.1.2</A><DD>PROTOCOL NOT CONFIGURED
|
||||
<DT><A HREF="#5.1.3"5.1.3</A><DD>BROADCAST
|
||||
<DT><A HREF="#5.1.4"5.1.4</A><DD>FIREWALL RULES
|
||||
<DT><A HREF="#5.1.5"5.1.5</A><DD>IP BOOTP AGENT
|
||||
<DT><A HREF="#5.1.6"5.1.6</A><DD>MULTIPLE INTERFACES
|
||||
</DL>
|
||||
<DT><A HREF="#5.2"5.2</A><DD>SCO
|
||||
<DT><A HREF="#5.3"5.3</A><DD>HP-UX
|
||||
<DT><A HREF="#5.4"5.4</A><DD>ULTRIX
|
||||
<DT><A HREF="#5.5"5.5</A><DD>FreeBSD
|
||||
<DT><A HREF="#5.6"5.6</A><DD>NeXTSTEP
|
||||
<DT><A HREF="#5.7"5.7</A><DD>SOLARIS
|
||||
</DL>
|
||||
<DT><A HREF="#6"6</A><DD>SUPPORT
|
||||
<DL>
|
||||
<DT><A HREF="#6.1"6.1</A><DD>HOW TO REPORT BUGS
|
||||
</DL>
|
||||
<DT><A HREF="#7"7</A><DD>KNOWN BUGS
|
||||
|
||||
1 WHERE TO FIND DOCUMENTATION
|
||||
2 RELEASE STATUS
|
||||
3 BUILDING THE DHCP DISTRIBUTION
|
||||
4 INSTALLING THE DHCP DISTRIBUTION
|
||||
5 USING THE DHCP DISTRIBUTION
|
||||
5.1 LINUX
|
||||
5.1.1 SO_ATTACH_FILTER UNDECLARED
|
||||
5.1.2 PROTOCOL NOT CONFIGURED
|
||||
5.1.3 BROADCAST
|
||||
5.1.4 FIREWALL RULES
|
||||
5.1.5 IP BOOTP AGENT
|
||||
5.1.6 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
|
||||
<H4 ID="1">Where to find documentation</H4>
|
||||
|
||||
WHERE TO FIND DOCUMENTATION
|
||||
|
||||
Documentation for this software includes this README file, the
|
||||
<P>Documentation for this software includes this README file, the
|
||||
RELNOTES file, and the manual pages, which are in the server, common,
|
||||
client and relay subdirectories. Internet standards relating to the
|
||||
DHCP protocol are stored in the doc subdirectory. You will have the
|
||||
best luck reading the manual pages if you build this software and then
|
||||
install it, although you can read them directly out of the
|
||||
distribution if you need to.
|
||||
distribution if you need to.</P>
|
||||
|
||||
DHCP server documentation is in the dhcpd man page. Information about
|
||||
<P>DHCP server documentation is in the dhcpd man page. Information about
|
||||
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. 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.
|
||||
man page is in the common/ subdirectory.</P>
|
||||
|
||||
DHCP Client documentation is in the dhclient man page. DHCP client
|
||||
<P>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.
|
||||
referred to for information about DHCP options.</P>
|
||||
|
||||
DHCP relay agent documentation is in the dhcrelay man page, the source
|
||||
for which is distributed in the relay/ subdirectory.
|
||||
<P>DHCP relay agent documentation is in the dhcrelay man page, the source
|
||||
for which is distributed in the relay/ subdirectory.</P>
|
||||
|
||||
To read installed manual pages, use the man command. Type "man page"
|
||||
<P>To read installed manual pages, use the man command. Type "man 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).
|
||||
command (described later).</P>
|
||||
|
||||
If you want to read manual pages that aren't installed, you can type
|
||||
<P>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
|
||||
@ -76,75 +83,78 @@ number - 5 for documentation about files, and 8 for documentation
|
||||
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.
|
||||
DHCP Distribution.</P>
|
||||
|
||||
If you do not have the nroff command, you can type ``more catpage''
|
||||
<P>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
|
||||
pages names are the name of the manual page followed by ".cat"
|
||||
followed by 5 or 8, as with unformatted manual pages.
|
||||
followed by 5 or 8, as with unformatted manual pages.</P>
|
||||
|
||||
Please note that until you install the manual pages, the pathnames of
|
||||
<P>Please note that until you install the manual pages, the pathnames of
|
||||
files to which they refer will not be correct for your operating
|
||||
system.
|
||||
system.</P>
|
||||
|
||||
RELEASE STATUS
|
||||
<H4 ID="2">Release status</H4>
|
||||
|
||||
This is the final release of Version 2 of the Internet Software
|
||||
<P>This is the final 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 release is stable.
|
||||
This release is stable.</P>
|
||||
|
||||
In this release, the server and relay agent currently work well on
|
||||
<P>In this release, the server and relay agent currently work well on
|
||||
NetBSD, Linux after kernel version 2.0.30, FreeBSD, BSD/OS, Ultrix,
|
||||
Digital Alpha OSF/1, Solaris and SunOS 4.1.4. On AIX, HPUX, IRIX and
|
||||
Linux 2.0.30, only a single broadcast network interface is supported.
|
||||
They also runs on QNX as long as only one broadcast network interface
|
||||
is configured and a host route is added from that interface to the
|
||||
255.255.255.255 broadcast address.
|
||||
255.255.255.255 broadcast address.</P>
|
||||
|
||||
The DHCP client currently only knows how to configure the network on
|
||||
<P>The DHCP client currently only knows how to configure the network on
|
||||
NetBSD, FreeBSD, BSD/os, Linux, Solaris and NextStep. The client
|
||||
depends on a system-dependent shell script to do network
|
||||
configuration - support for other operating systems is simply a matter
|
||||
of porting this shell script to the new platform.
|
||||
of porting this shell script to the new platform.</P>
|
||||
|
||||
If you wish to run the DHCP Distribution on Linux, please see the
|
||||
<P>If you wish to run the DHCP Distribution on Linux, please see the
|
||||
Linux-specific notes later in this document. If you wish to run on an
|
||||
SCO release, please see the SCO-specific notes later in this document.
|
||||
You particularly need to read these notes if you intend to support
|
||||
Windows 95 clients. If you are running a version of FreeBSD prior to
|
||||
2.2, please read the note on FreeBSD. If you are running HP-UX or
|
||||
Ultrix, please read the notes for those operating systems below.
|
||||
If you are running NeXTSTEP, please see the notes on NeXTSTEP below.
|
||||
If you are running NeXTSTEP, please see the notes on NeXTSTEP below.</P>
|
||||
|
||||
If you start dhcpd and get a message, "no free bpf", that means you
|
||||
<P>If you start dhcpd and get a message, "no free bpf", that means you
|
||||
need to configure the Berkeley Packet Filter into your operating
|
||||
system kernel. On NetBSD, FreeBSD and BSD/os, type ``man bpf'' for
|
||||
information. On Digital Unix, type ``man pfilt''.
|
||||
information. On Digital Unix, type ``man pfilt''.</P>
|
||||
|
||||
<H4 ID="3">Building the DHCP Distribution</H4>
|
||||
|
||||
BUILDING THE DHCP DISTRIBUTION
|
||||
<P>To build the DHCP Distribution, unpack the compressed tar file using
|
||||
the tar utility and the gzip command - type something like:</P>
|
||||
|
||||
To build the DHCP Distribution, unpack the compressed tar file using
|
||||
the tar utility and the gzip command - type something like:
|
||||
<BLOCKQUOTE>
|
||||
zcat dhcp-2.0pl1.tar.gz |tar xvf -
|
||||
</BLOCKQUOTE>
|
||||
|
||||
zcat dhcp-2.0b1pl29.tar.gz |tar xvf -
|
||||
<P>On BSD/OS, you have to type gzcat, not zcat, and you may run into
|
||||
similar problems on other operating systems.</P>
|
||||
|
||||
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.0b1pl29 subdirectory that you've just created and
|
||||
configure the source tree by typing:
|
||||
<P>Now, cd to the dhcp-2.0pl1 subdirectory that you've just created and
|
||||
configure the source tree by typing:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
./configure
|
||||
</BLOCKQUOTE>
|
||||
|
||||
If the configure utility can figure out what sort of system you're
|
||||
<P>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
|
||||
system; otherwise, it will complain. If it can't figure out what
|
||||
system you are using, that system is not supported - you are on
|
||||
your own.
|
||||
your own.</P>
|
||||
|
||||
Once you've run configure, just type ``make'', and after a while
|
||||
<P>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.
|
||||
If you get warnings, it's not likely to be a problem - the DHCP
|
||||
@ -152,99 +162,126 @@ server compiles completely warning-free on as many architectures
|
||||
as we can manage, but there are a few for which this is difficult.
|
||||
If you get errors on a system not mentioned above, you will need
|
||||
to do some programming or debugging on your own to get the DHCP
|
||||
Distribution working.
|
||||
Distribution working.</P>
|
||||
|
||||
INSTALLING THE DHCP DISTRIBUTION
|
||||
<H4 ID="4">Installing the dhcp distribution</H4>
|
||||
|
||||
Once you have successfully gotten the DHCP Distribution to build, you
|
||||
<P>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''.
|
||||
before typing ``make install''.</P>
|
||||
|
||||
USING THE DHCP DISTRIBUTION
|
||||
<H4 ID="5">Using the dhcp distribution</H4>
|
||||
|
||||
LINUX
|
||||
<H4 ID="5.1">Linux</H4>
|
||||
|
||||
There are three big LINUX issues: the all-ones broadcast address,
|
||||
<P>There are three big LINUX issues: the all-ones broadcast address,
|
||||
Linux 2.1 ip_bootp_agent enabling, and operations with more than one
|
||||
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.
|
||||
and the "protocol not configured" problem.</P>
|
||||
|
||||
LINUX: SO_ATTACH_FILTER UNDECLARED
|
||||
<H4 ID="5.1.1">So_attach_filter undeclared</H4>
|
||||
|
||||
In addition, there is a minor issue that we will mention here because
|
||||
<P>In addition, there is a minor issue that we will mention here because
|
||||
this release is so close on the heels of the Linux 2.2 release: there
|
||||
is a symlink in /usr/include that points at the linux asm headers. It
|
||||
appears to be not uncommon that this link won't be updated correctly,
|
||||
in which case you'll get the following error when you try to build:
|
||||
in which case you'll get the following error when you try to build:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
lpf.c: In function `if_register_receive':
|
||||
lpf.c:152: `SO_ATTACH_FILTER' undeclared (first use this function)
|
||||
lpf.c:152: (Each undeclared identifier is reported only once
|
||||
lpf.c:152: for each function it appears in.)
|
||||
</BLOCKQUOTE>
|
||||
|
||||
The line numbers may be different, of course. If you see this
|
||||
<P>The line numbers may be different, of course. If you see this
|
||||
header, your linux asm header link is probably bad, and you should
|
||||
make sure it's pointing to correct linux source directory.
|
||||
make sure it's pointing to correct linux source directory.</P>
|
||||
|
||||
LINUX: PROTOCOL NOT CONFIGURED
|
||||
<H4 ID="5.1.2">Protocol not configured</H4>
|
||||
|
||||
One additional Linux 2.1/2.2 issue: if you get the following message,
|
||||
<P>One additional Linux 2.1/2.2 issue: if you get the following message,
|
||||
it's because your kernel doesn't have the linux packetfilter or raw
|
||||
packet socket configured:
|
||||
packet socket configured:</P>
|
||||
|
||||
Set CONFIG_PACKET=y and CONFIG_FILTER=y in your kernel configuration
|
||||
<BLOCKQUOTE>
|
||||
Make sure CONFIG_PACKET (Packet socket) and CONFIG_FILTER (Socket
|
||||
Filtering) are enabled in your kernel configuration
|
||||
</BLOCKQUOTE>
|
||||
|
||||
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.
|
||||
<P>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.</P>
|
||||
|
||||
If you set CONFIG_PACKET=m or CONFIG_FILTER=m, then you must tell the
|
||||
<P>If the preceding paragraph made no sense to you, ask your Linux
|
||||
vendor/guru for help - please don't ask us.</P>
|
||||
|
||||
<P>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.</P>
|
||||
|
||||
LINUX: BROADCAST
|
||||
<H4 ID="5.1.3">Broadcast</H4>
|
||||
|
||||
In order for dhcpd to work correctly with picky DHCP clients (e.g.,
|
||||
<P>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.</P>
|
||||
|
||||
It is possible to work around this problem on some versions of Linux
|
||||
<P>It is possible to work around this problem on some versions of Linux
|
||||
by creating a host route from your network interface address to
|
||||
255.255.255.255. The command you need to use to do this on Linux
|
||||
varies from version to version. The easiest version is:
|
||||
varies from version to version. The easiest version is:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
route add -host 255.255.255.255 dev eth0
|
||||
</BLOCKQUOTE>
|
||||
|
||||
On some older Linux systems, you will get an error if you try to do
|
||||
<P>On some older Linux systems, you will get an error if you try to do
|
||||
this. On those systems, try adding the following entry to your
|
||||
/etc/hosts file:
|
||||
/etc/hosts file:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
255.255.255.255 all-ones
|
||||
</BLOCKQUOTE>
|
||||
|
||||
Then, try:
|
||||
<P>Then, try:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
route add -host all-ones dev eth0
|
||||
</BLOCKQUOTE>
|
||||
|
||||
Another route that has worked for some users is:
|
||||
<P>Another route that has worked for some users is:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
route add -net 255.255.255.0 dev eth0
|
||||
</BLOCKQUOTE>
|
||||
|
||||
If you are not using eth0 as your network interface, you should
|
||||
specify the network interface you *are* using in your route command.
|
||||
<P>If you are not using eth0 as your network interface, you should
|
||||
specify the network interface you *are* using in your route command.</P>
|
||||
|
||||
LINUX: FIREWALL RULES
|
||||
<H4 ID="5.1.4">Firewall rules</H4>
|
||||
|
||||
If you are running the DHCP server or client on a Linux system that's
|
||||
<P>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
|
||||
@ -255,19 +292,20 @@ port 68 to UDP port 67 through. They must also allow packets from
|
||||
your local firewall's IP address and UDP port 67 through to any
|
||||
address your DHCP server might serve on UDP port 68. Finally,
|
||||
packets from relay agents on port 67 to the DHCP server on port 67,
|
||||
and vice versa, must be permitted.
|
||||
and vice versa, must be permitted.</P>
|
||||
|
||||
LINUX: IP BOOTP AGENT
|
||||
<H4 ID="5.1.5">IP BOOTP agent</H4>
|
||||
|
||||
Some versions of the Linux 2.1 kernel apparently prevent dhcpd from
|
||||
working unless you enable it by doing the following:
|
||||
<P>Some versions of the Linux 2.1 kernel apparently prevent dhcpd from
|
||||
working unless you enable it by doing the following:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
echo 1 >/proc/sys/net/ipv4/ip_bootp_agent
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<H4 ID="5.1.6">Multiple interfaces</H4>
|
||||
|
||||
LINUX: MULTIPLE INTERFACES
|
||||
|
||||
Very old versions of the Linux kernel do not provide a networking API
|
||||
<P>Very old versions of the Linux kernel do not provide a networking API
|
||||
that allows dhcpd to operate correctly if the system has more than one
|
||||
broadcast network interface. However, Linux 2.0 kernels with version
|
||||
numbers greater than or equal to 2.0.31 add an API feature: the
|
||||
@ -275,85 +313,89 @@ SO_BINDTODEVICE socket option. If SO_BINDTODEVICE is present, it is
|
||||
possible for dhcpd to operate on Linux with more than one network
|
||||
interface. In order to take advantage of this, you must be running a
|
||||
2.0.31 or greater kernel, and you must have 2.0.31 or later system
|
||||
headers installed *before* you build the DHCP Distribution.
|
||||
headers installed *before* you build the DHCP Distribution.</P>
|
||||
|
||||
We have heard reports that you must still add routes to 255.255.255.255
|
||||
<P>We have heard reports that you must still add routes to 255.255.255.255
|
||||
in order for the all-ones broadcast to work, even on 2.0.31 kernels.
|
||||
In fact, you now need to add a route for each interface. Hopefully
|
||||
the Linux kernel gurus will get this straight eventually.
|
||||
the Linux kernel gurus will get this straight eventually.</P>
|
||||
|
||||
Linux 2.1 and later kernels do not use SO_BINDTODEVICE or require the
|
||||
<P>Linux 2.1 and later kernels do not use SO_BINDTODEVICE or require the
|
||||
broadcast address hack, but do support multiple interfaces, using the
|
||||
Linux Packet Filter.
|
||||
Linux Packet Filter.</P>
|
||||
|
||||
SCO
|
||||
<H4 ID="5.2">SCO</H4>
|
||||
|
||||
SCO has the same problem as Linux (described earlier). The thing is,
|
||||
<P>SCO has the same problem as Linux (described earlier). The thing is,
|
||||
SCO *really* doesn't want to let you add a host route to the all-ones
|
||||
broadcast address. One technique that has been successful on some
|
||||
versions of SCO is the very bizarre command:
|
||||
versions of SCO is the very bizarre command:</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
ifconfig net0 alias 10.1.1.1 netmask 8.0.0.0
|
||||
</BLOCKQUOTE>
|
||||
|
||||
Apparently this works because of an interaction between SCO's support
|
||||
<P>Apparently this works because of an interaction between SCO's support
|
||||
for network classes and the weird netmask. The 10.* network is just a
|
||||
dummy that can generally be assumed to be safe. Don't ask why this
|
||||
works. Just try it. If it works for you, great. If not, SCO is
|
||||
supposedly adding hooks to support real DHCP service in a future
|
||||
release - I have this on good authority from the people at SCO who do
|
||||
*their* DHCP server and client.
|
||||
*their* DHCP server and client.</P>
|
||||
|
||||
HP-UX
|
||||
<H4 ID="5.3">HP-UX</H4>
|
||||
|
||||
HP-UX has the same problem with the all-ones broadcast address that
|
||||
<P>HP-UX has the same problem with the all-ones broadcast address that
|
||||
SCO and Linux have. One user reported that adding the following to
|
||||
/etc/rc.config.d/netconf helped (you may have to modify this to suit
|
||||
your local configuration):
|
||||
your local configuration):</P>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
INTERFACE_NAME[0]=lan0
|
||||
IP_ADDRESS[0]=1.1.1.1
|
||||
SUBNET_MASK[0]=255.255.255.0
|
||||
BROADCAST_ADDRESS[0]="255.255.255.255"
|
||||
LANCONFIG_ARGS[0]="ether"
|
||||
DHCP_ENABLE[0]=0
|
||||
</BLOCKQUOTE>
|
||||
|
||||
ULTRIX
|
||||
<H4 ID="5.4">Ultrix</H4>
|
||||
|
||||
Now that we have Ultrix packet filter support, the DHCP Distribution
|
||||
<P>Now that we have Ultrix packet filter support, the DHCP Distribution
|
||||
on Ultrix should be pretty trouble-free. However, one thing you do
|
||||
need to be aware of is that it now requires that the pfilt device be
|
||||
configured into your kernel and present in /dev. If you type ``man
|
||||
packetfilter'', you will get some information on how to configure your
|
||||
kernel for the packet filter (if it isn't already) and how to make an
|
||||
entry for it in /dev.
|
||||
entry for it in /dev.</P>
|
||||
|
||||
FreeBSD
|
||||
<H4 ID="5.5">FreeBSD</H4>
|
||||
|
||||
Versions of FreeBSD prior to 2.2 have a bug in BPF support in that the
|
||||
<P>Versions of FreeBSD prior to 2.2 have a bug in BPF support in that the
|
||||
ethernet driver swaps the ethertype field in the ethernet header
|
||||
downstream from BPF, which corrupts the output packet. If you are
|
||||
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.
|
||||
in site.h and recompile.</P>
|
||||
|
||||
NeXTSTEP
|
||||
<H4 ID="5.6">NeXTStep</H4>
|
||||
|
||||
The NeXTSTEP support uses the NeXTSTEP Berkeley Packet Filter
|
||||
<P>The NeXTSTEP support uses the NeXTSTEP Berkeley Packet Filter
|
||||
extension, which is not included in the base NextStep system. You
|
||||
must install this extension in order to get dhcpd or dhclient to work.
|
||||
must install this extension in order to get dhcpd or dhclient to work.</P>
|
||||
|
||||
SOLARIS
|
||||
<H4 ID="5.7">Solaris</H4>
|
||||
|
||||
One problem which has been observed and is not fixed in this
|
||||
<P>One problem which has been observed and is not fixed in this
|
||||
patchlevel has to do with using DLPI on Solaris machines. The symptom
|
||||
of this problem is that the DHCP server never receives any requests.
|
||||
If you are using Solaris 2.6, and you encounter this symptom, and
|
||||
you are running the DHCP server on a machine with a single broadcast
|
||||
network interface, you may wish to edit the includes/site.h file and
|
||||
uncomment the #define USE_SOCKETS line. Then type ``make clean;
|
||||
make''.
|
||||
make''.</P>
|
||||
|
||||
The DHCP client on Solaris will only work with DLPI. If you run it
|
||||
<P>The DHCP client on Solaris will only work with DLPI. If you run it
|
||||
and it just keeps saying it's sending DHCPREQUEST packets, but never
|
||||
gets a response, you may be having DLPI trouble as described above.
|
||||
If so, you are SOL. Also, because Solaris requires you to "plumb" an
|
||||
@ -362,9 +404,9 @@ either specify the name(s) of the interface(s) you want to configure
|
||||
on the command line, or must plumb the interfaces prior to invoking
|
||||
the DHCP client. This can be done with ``ifconfig iface plumb'',
|
||||
where iface is the name of the interface (e.g., ``ifconfig hme0
|
||||
plumb'').
|
||||
plumb'').</P>
|
||||
|
||||
It should be noted that Solaris versions from 2.6 onward include a
|
||||
<P>It should be noted that Solaris versions from 2.6 onward include a
|
||||
DHCP client that you can run with ``/sbin/ifconfig iface dhcp start''
|
||||
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
|
||||
@ -373,22 +415,22 @@ 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
|
||||
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.
|
||||
matter, but please check with Sun first.</P>
|
||||
|
||||
SUPPORT
|
||||
<H4 ID="6">Support</H4>
|
||||
|
||||
The Internet Software Consortium DHCP server is not a commercial
|
||||
<P>The Internet Software Consortium DHCP server is not a commercial
|
||||
product, and is not supported in that sense. 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@fugue.com
|
||||
mailing list.
|
||||
mailing list.</P>
|
||||
|
||||
If you are going to use dhcpd, you should probably subscribe to the
|
||||
<P>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
|
||||
dhclient, you should subscribe to the dhcp-client mailing list.
|
||||
dhclient, you should subscribe to the dhcp-client mailing list.</P>
|
||||
|
||||
If you need help, you should ask on the dhcp-server or dhcp-client
|
||||
<P>If you need help, you should ask on the dhcp-server or dhcp-client
|
||||
mailing list (or both) - whichever is appropriate to your
|
||||
application. This includes reporting bugs. Please do not report
|
||||
bugs in old software releases - fetch the latest release and see if
|
||||
@ -396,89 +438,98 @@ the bug is still in that copy 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.
|
||||
before you can report bugs.</P>
|
||||
|
||||
PLEASE READ THIS README FILE CAREFULLY BEFORE REPORTING BUGS!
|
||||
<H4 ID="6.1">Please read this readme file carefully before reporting bugs!</H4>
|
||||
<H4>How to report bugs</H4>
|
||||
|
||||
HOW TO REPORT BUGS
|
||||
|
||||
When you report bugs, please provide us complete information. A list
|
||||
<P>When you report bugs, please provide us complete information. A list
|
||||
of information we need follows. Please read it carefully, and put
|
||||
all the information you can into your initial bug report, so that we
|
||||
don't have to ask you any questions in order to figure out your
|
||||
problem.
|
||||
problem.</P>
|
||||
|
||||
- The specific operating system name and version of the
|
||||
machine on which the DHCP server or client is running.
|
||||
- The specific operating system name and version of the
|
||||
machine on which the client is running, if you are having
|
||||
trouble getting a client working with the server.
|
||||
- If you're running Linux, the version number we care about is
|
||||
the kernel version and maybe the library version, not the
|
||||
distribution version - e.g., while we don't mind knowing
|
||||
that you're running Redhat version mumble.foo, we must know
|
||||
what kernel version you're running, and it helps if you can
|
||||
tell us what version of the C library you're running,
|
||||
although if you don't know that off the top of your head it
|
||||
may be hard for you to figure it out, so don't go crazy
|
||||
trying.
|
||||
- The specific version of the DHCP distribution you're
|
||||
running, for example 2.0b1pl19, not 2.0.
|
||||
- Please explain the problem carefully, thinking through what
|
||||
you're saying to ensure that you don't assume we know
|
||||
something about your situation that we don't know.
|
||||
- Include your dhcpd.conf and dhcpd.leases file if they're not
|
||||
huge (if they are huge, we may need them anyway, but don't
|
||||
send them until you're asked).
|
||||
- Include a log of your server or client running until it
|
||||
encounters the problem - for example, if you are having
|
||||
trouble getting some client to get an address, restart the
|
||||
server with the -d flag and then restart the client, and
|
||||
send us what the server prints. Likewise, with the client,
|
||||
include the output of the client as it fails to get an
|
||||
address or otherwise does the wrong thing. Do not leave
|
||||
out parts of the output that you think aren't interesting.
|
||||
- If the client or server is dumping core, please run the
|
||||
debugger and get a stack trace, and include that in your
|
||||
bug report. For example, if your debugger is gdb, do the
|
||||
following:
|
||||
<UL>
|
||||
<LI>The specific operating system name and version of the
|
||||
machine on which the DHCP server or client is running.
|
||||
<LI>The specific operating system name and version of the
|
||||
machine on which the client is running, if you are having
|
||||
trouble getting a client working with the server.
|
||||
<LI>If you're running Linux, the version number we care about is
|
||||
the kernel version and maybe the library version, not the
|
||||
distribution version - e.g., while we don't mind knowing
|
||||
that you're running Redhat version mumble.foo, we must know
|
||||
what kernel version you're running, and it helps if you can
|
||||
tell us what version of the C library you're running,
|
||||
although if you don't know that off the top of your head it
|
||||
may be hard for you to figure it out, so don't go crazy
|
||||
trying.
|
||||
<LI>The specific version of the DHCP distribution you're
|
||||
running, for example 2.0b1pl19, not 2.0.
|
||||
<LI>Please explain the problem carefully, thinking through what
|
||||
you're saying to ensure that you don't assume we know
|
||||
something about your situation that we don't know.
|
||||
<LI>Include your dhcpd.conf and dhcpd.leases file if they're not
|
||||
huge (if they are huge, we may need them anyway, but don't
|
||||
send them until you're asked).
|
||||
<LI>Include a log of your server or client running until it
|
||||
encounters the problem - for example, if you are having
|
||||
trouble getting some client to get an address, restart the
|
||||
server with the -d flag and then restart the client, and
|
||||
send us what the server prints. Likewise, with the client,
|
||||
include the output of the client as it fails to get an
|
||||
address or otherwise does the wrong thing. Do not leave
|
||||
out parts of the output that you think aren't interesting.
|
||||
<LI>If the client or server is dumping core, please run the
|
||||
debugger and get a stack trace, and include that in your
|
||||
bug report. For example, if your debugger is gdb, do the
|
||||
following:
|
||||
|
||||
<BLOCKQUOTE>
|
||||
gdb dhcpd dhcpd.core
|
||||
(gdb) where
|
||||
[...]
|
||||
(gdb) quit
|
||||
</BLOCKQUOTE>
|
||||
|
||||
This assumes that it's the dhcp server you're debugging, and
|
||||
that the core file is in dhcpd.core.
|
||||
<P>This assumes that it's the dhcp server you're debugging, and
|
||||
that the core file is in dhcpd.core.</P>
|
||||
</UL>
|
||||
|
||||
PLEASE DO NOT send queries about non-isc clients to the dhcp-client
|
||||
mailing list. If you're asking about them on an ISC mailing list,
|
||||
it's probably because you're using the ISC DHCP server, so ask there.
|
||||
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.
|
||||
<P><EM>Please, <B>do not</B></EM> send queries about non-isc clients
|
||||
to the dhcp-client mailing list. If you're asking about them on an
|
||||
ISC mailing list, it's probably because you're using the ISC DHCP
|
||||
server, so ask there. If you are having problems with a client whose
|
||||
executable is called dhcpcd, this is <EM>not</EM> the ISC DHCP client,
|
||||
and we probably can't help you with it.</P>
|
||||
|
||||
Please see http://www.fugue.com/dhcp/lists for details on how to
|
||||
subscribe. If you don't have WorldWide Web access, you can send mail
|
||||
to dhcp-request@fugue.com and tell me which lists you want to
|
||||
subscribe to, but please use the web interface if you can, since I
|
||||
have to handle the -request mailing list manually, and I will give you
|
||||
the third degree if you make me do your subscription manually.
|
||||
<P>Please see <A HREF="http://www.fugue.com/dhcp/lists">
|
||||
http://www.fugue.com/dhcp/lists</A> for details on how to subscribe.
|
||||
If you don't have WorldWide Web access, you can send mail to
|
||||
dhcp-request@fugue.com and tell me which lists you want to subscribe
|
||||
to, but please use the web interface if you can, since I have to
|
||||
handle the -request mailing list manually, and I will give you the
|
||||
third degree if you make me do your subscription manually.</P>
|
||||
|
||||
PLEASE DO NOT SEND REQUESTS FOR SUPPORT DIRECTLY TO ME! The number of
|
||||
people using the DHCP Distribution is sufficiently large that if I
|
||||
take an interrupt every time any one of those people runs into
|
||||
trouble, I will never get any more coding done.
|
||||
<P><EM>Please do not send requests for help directly to the author!</EM>
|
||||
The number of people using the DHCP Distribution is sufficiently large
|
||||
that if we take an interrupt every time any one of those people runs into
|
||||
trouble, we will never get any more coding done.</P>
|
||||
|
||||
PLEASE DO NOT CALL ME ON THE PHONE FOR SUPPORT! Answering the phone
|
||||
takes a lot more of my time and attention than answering email. If you
|
||||
do call me on the phone, I will tell you to send email to the mailing
|
||||
list, and I won't answer your question, so there's no point in doing
|
||||
it.
|
||||
<P><EM>Please do not call the author on the phone for support!</EM>
|
||||
Answering the phone takes a lot more time and attention than answering
|
||||
email. If you do call on the phone, you will be told to send email to
|
||||
the mailing list, so there's no point in doing it.</P>
|
||||
|
||||
KNOWN BUGS
|
||||
<P><B>Exception:</B> if you are a support customer, you already know
|
||||
how to get in touch with us. To become a support customer, see our
|
||||
<A HREF="/isc/ISC_HTML/services/support/index.phtml">Support web
|
||||
page</A>.
|
||||
|
||||
This release of the DHCP Distribution does not yet contain support for
|
||||
<H4 ID="7">Known bugs</H4>
|
||||
|
||||
<P>This release of the DHCP Distribution does not yet contain support for
|
||||
DHCPINFORM. The Vendor Specific Data option is not supported. Site-
|
||||
specific options are not supported. All of these are supported in the
|
||||
3.0 release of the DHCP distribution, which is now in beta testing.
|
||||
3.0 release of the DHCP distribution, which is now in beta testing.</P>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Internet Software Consortium
|
||||
Dynamic Host Configuration Protocol Distribution
|
||||
Version 2
|
||||
June 22, 1999
|
||||
Version 2 Patchlevel 1
|
||||
June 24, 2000
|
||||
|
||||
Release Notes
|
||||
|
||||
@ -22,6 +22,32 @@ the README file.
|
||||
This log describes the changes that have been made in version 2.0
|
||||
since June of 1997.
|
||||
|
||||
CHANGES FROM VERSION 2.0
|
||||
|
||||
- Clean up DHCPRELEASE support.
|
||||
|
||||
- Don't use the broadcast flag when doing BOOTP unless we need to.
|
||||
|
||||
- Clean up the fallback mess.
|
||||
|
||||
- Quote all shell special characters in the client script.
|
||||
|
||||
- Fix ethernet header alignment on arm32.
|
||||
|
||||
- Clarify the "no subnet declaration" message.
|
||||
|
||||
- Correctly store the tftp server name in the lease file and the
|
||||
client script file.
|
||||
|
||||
- Avoid a potential spin loop in client when script file creation
|
||||
fails for reasons other than the presence of an existing file of the
|
||||
same name.
|
||||
|
||||
- Add support for Linux kernel versions greater than 2.2.
|
||||
|
||||
- Fix a problem in raw.c on Irix. Thanks to Don Badrak for the
|
||||
patch.
|
||||
|
||||
CHANGES FROM VERSION 2.0 BETA 1 PATCHLEVEL 29
|
||||
|
||||
- Define BYTE_ORDER in includes/cf/hpux.h so that ip.h will compile
|
||||
|
136
contrib/isc-dhcp/client/Makefile.dist
Normal file
136
contrib/isc-dhcp/client/Makefile.dist
Normal file
@ -0,0 +1,136 @@
|
||||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996, 1997, 1999 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.
|
||||
#
|
||||
|
||||
CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
|
||||
dhclient.leases.cat5
|
||||
SEDMANPAGES = dhclient.man8 dhclient.conf.man5 dhclient-script.man8 \
|
||||
dhclient.leases.man5
|
||||
SRCS = dhclient.c clparse.c
|
||||
OBJS = dhclient.o clparse.o
|
||||
PROG = dhclient
|
||||
MAN = dhclient.8 dhclient.conf.5 dhclient-script.8 dhclient.leases.5
|
||||
|
||||
DEBUG = -g
|
||||
INCLUDES = -I.. -I../includes
|
||||
DHCPLIB = ../common/libdhcp.a
|
||||
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
||||
|
||||
all: $(PROG) $(CATMANPAGES)
|
||||
|
||||
install: all
|
||||
for dir in $(CLIENTBINDIR) $(ETC) $(FFMANDIR) $(ADMMANDIR) $(VARDB); \
|
||||
do \
|
||||
foo=""; \
|
||||
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
|
||||
foo=$${foo}/$$bar; \
|
||||
if [ ! -d $$foo ]; then \
|
||||
mkdir $$foo; \
|
||||
chmod 755 $$foo; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
$(INSTALL) dhclient $(DESTDIR)$(CLIENTBINDIR)
|
||||
$(CHMOD) 755 $(DESTDIR)$(CLIENTBINDIR)/dhclient
|
||||
if [ x$(SCRIPT) = xnone ]; then \
|
||||
echo "No client script available."; \
|
||||
else \
|
||||
$(INSTALL) scripts/$(SCRIPT) $(DESTDIR)$(ETC)/dhclient-script; \
|
||||
$(CHMOD) 700 $(DESTDIR)$(ETC)/dhclient-script; \
|
||||
fi
|
||||
$(MANINSTALL) $(MANFROM) dhclient.$(MANCAT)8 $(MANTO) \
|
||||
$(DESTDIR)$(ADMMANDIR)/dhclient$(ADMMANEXT)
|
||||
$(MANINSTALL) $(MANFROM) dhclient-script.$(MANCAT)8 $(MANTO) \
|
||||
$(DESTDIR)$(ADMMANDIR)/dhclient-script$(ADMMANEXT)
|
||||
$(MANINSTALL) $(MANFROM) dhclient.conf.$(MANCAT)5 $(MANTO) \
|
||||
$(DESTDIR)$(FFMANDIR)/dhclient.conf$(FFMANEXT)
|
||||
$(MANINSTALL) $(MANFROM) dhclient.leases.$(MANCAT)5 $(MANTO) \
|
||||
$(DESTDIR)$(FFMANDIR)/dhclient.leases$(FFMANEXT)
|
||||
|
||||
clean:
|
||||
-rm -f $(OBJS)
|
||||
|
||||
realclean: clean
|
||||
-rm -f $(PROG) $(CATMANPAGES) $(SEDMANPAGES) *~ #*
|
||||
|
||||
distclean: realclean
|
||||
-rm -f Makefile
|
||||
|
||||
# These should only be done on 4.4 BSD-based systems, since the mandoc
|
||||
# macros aren't available on older unices. Catted man pages are
|
||||
# provided in the distribution so that this doesn't become a problem.
|
||||
|
||||
dhclient.cat8: dhclient.man8
|
||||
nroff -man dhclient.man8 >dhclient.cat8
|
||||
|
||||
dhclient.man8: dhclient.8
|
||||
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhclient.8 >dhclient.man8
|
||||
|
||||
dhclient-script.cat8: dhclient-script.man8
|
||||
nroff -man dhclient-script.man8 >dhclient-script.cat8
|
||||
|
||||
dhclient-script.man8: dhclient-script.8
|
||||
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhclient-script.8 \
|
||||
>dhclient-script.man8
|
||||
|
||||
dhclient.conf.man5: dhclient.conf.5
|
||||
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhclient.conf.5 \
|
||||
>dhclient.conf.man5
|
||||
|
||||
dhclient.conf.cat5: dhclient.conf.man5
|
||||
nroff -man dhclient.conf.man5 >dhclient.conf.cat5
|
||||
|
||||
dhclient.leases.man5: dhclient.leases.5
|
||||
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhclient.leases.5 \
|
||||
>dhclient.leases.man5
|
||||
|
||||
dhclient.leases.cat5: dhclient.leases.man5
|
||||
nroff -man dhclient.leases.man5 >dhclient.leases.cat5
|
||||
|
||||
dhclient: $(OBJS) $(DHCPLIB)
|
||||
$(CC) $(LFLAGS) -o $(PROG) $(OBJS) $(DHCPLIB) $(LIBS)
|
||||
|
||||
# Dependencies (semi-automatically-generated)
|
||||
|
||||
dhclient.o: dhclient.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/version.h
|
||||
clparse.o: clparse.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/dhctoken.h
|
@ -56,7 +56,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char ocopyright[] =
|
||||
"$Id: dhclient.c,v 1.44.2.39 1999/06/22 13:36:46 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dhclient.c,v 1.44.2.44 2000/01/26 12:51:11 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -176,7 +176,8 @@ int main (argc, argv, envp)
|
||||
note (contrib);
|
||||
note (url);
|
||||
note ("");
|
||||
}
|
||||
} else
|
||||
log_perror = 0;
|
||||
|
||||
/* Default to the DHCP/BOOTP port. */
|
||||
if (!local_port) {
|
||||
@ -1847,7 +1848,7 @@ void write_client_lease (ip, lease, rewrite)
|
||||
lease -> filename);
|
||||
if (lease -> server_name)
|
||||
fprintf (leaseFile, " server-name \"%s\";\n",
|
||||
lease -> filename);
|
||||
lease -> server_name);
|
||||
if (lease -> medium)
|
||||
fprintf (leaseFile, " medium \"%s\";\n",
|
||||
lease -> medium -> string);
|
||||
@ -1910,9 +1911,11 @@ void script_init (ip, reason, medium)
|
||||
if (!mktemp (scriptName))
|
||||
error ("can't create temporary client script %s: %m",
|
||||
scriptName);
|
||||
fd = creat (scriptName, 0600);
|
||||
} while (fd < 0);
|
||||
fd = open (scriptName, O_EXCL | O_CREAT | O_WRONLY, 0600);
|
||||
} while (fd < 0 && errno == EEXIST);
|
||||
#endif
|
||||
if (fd < 0)
|
||||
error ("can't create temporary script %s: %m", scriptName);
|
||||
|
||||
scriptFile = fdopen (fd, "w");
|
||||
if (!scriptFile)
|
||||
|
206
contrib/isc-dhcp/common/Makefile.dist
Normal file
206
contrib/isc-dhcp/common/Makefile.dist
Normal file
@ -0,0 +1,206 @@
|
||||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996, 1999 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.
|
||||
#
|
||||
|
||||
CATMANPAGES = dhcp-options.cat5
|
||||
SEDMANPAGES = dhcp-options.man5
|
||||
SRC = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
|
||||
lpf.c packet.c memory.c print.c options.c inet.c convert.c \
|
||||
tree.c tables.c hash.c alloc.c errwarn.c inet_addr.c dlpi.c \
|
||||
tr.c ethernet.c
|
||||
OBJ = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
|
||||
lpf.o packet.o memory.o print.o options.o inet.o convert.o \
|
||||
tree.o tables.o hash.o alloc.o errwarn.o inet_addr.o dlpi.o \
|
||||
tr.o ethernet.o
|
||||
MAN = dhcp-options.5
|
||||
|
||||
DEBUG = -g
|
||||
INCLUDES = -I.. -I../includes
|
||||
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
|
||||
|
||||
all: libdhcp.a $(CATMANPAGES)
|
||||
|
||||
libdhcp.a: $(OBJ)
|
||||
rm -f libdhcp.a
|
||||
ar cruv libdhcp.a $(OBJ)
|
||||
ranlib libdhcp.a
|
||||
|
||||
install: all
|
||||
for dir in $(FFMANDIR); do \
|
||||
foo=""; \
|
||||
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
|
||||
foo=$${foo}/$$bar; \
|
||||
if [ ! -d $$foo ]; then \
|
||||
mkdir $$foo; \
|
||||
chmod 755 $$foo; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
$(MANINSTALL) $(MANFROM) dhcp-options.$(MANCAT)5 $(MANTO) \
|
||||
$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f $(OBJ)
|
||||
|
||||
realclean: clean
|
||||
-rm -f libdhcp.a *~ #* $(CATMANPAGES) $(SEDMANPAGES)
|
||||
|
||||
distclean: realclean
|
||||
-rm -f Makefile
|
||||
|
||||
dhcp-options.cat5: dhcp-options.man5
|
||||
nroff -man dhcp-options.man5 >dhcp-options.cat5
|
||||
|
||||
dhcp-options.man5: dhcp-options.5
|
||||
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
|
||||
-e "s#RUNDIR#$(VARRUN)#g" < dhcp-options.5 >dhcp-options.man5
|
||||
|
||||
# Dependencies (semi-automatically-generated)
|
||||
|
||||
raw.o: raw.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
parse.o: parse.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h \
|
||||
../includes/dhcp.h ../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/dhctoken.h
|
||||
nit.o: nit.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
icmp.o: icmp.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/netinet/ip.h \
|
||||
../includes/netinet/ip_icmp.h
|
||||
dispatch.o: dispatch.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h \
|
||||
conflex.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/dhctoken.h
|
||||
upf.o: upf.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
bpf.o: bpf.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/netinet/ip.h ../includes/netinet/udp.h \
|
||||
../includes/netinet/if_ether.h
|
||||
socket.o: socket.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
lpf.o: lpf.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
packet.o: packet.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h ../includes/netinet/ip.h \
|
||||
../includes/netinet/udp.h ../includes/netinet/if_ether.h
|
||||
memory.o: memory.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
print.o: print.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
options.o: options.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
inet.o: inet.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
convert.o: convert.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
tree.o: tree.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
tables.o: tables.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
hash.o: hash.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
alloc.o: alloc.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
errwarn.o: errwarn.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
inet_addr.o: inet_addr.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
||||
dlpi.o: dlpi.c ../includes/dhcpd.h \
|
||||
../includes/cdefs.h ../includes/osdep.h ../includes/site.h \
|
||||
../includes/cf/netbsd.h ../includes/dhcp.h \
|
||||
../includes/tree.h ../includes/hash.h ../includes/inet.h \
|
||||
../includes/sysconf.h
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dispatch.c,v 1.47.2.14 1999/03/29 22:16:36 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dispatch.c,v 1.47.2.15 1999/07/13 12:51:55 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -456,9 +456,10 @@ void discover_interfaces (state)
|
||||
if (!tmp -> shared_network && (state == DISCOVER_SERVER)) {
|
||||
warn ("No subnet declaration for %s (%s).",
|
||||
tmp -> name, inet_ntoa (foo.sin_addr));
|
||||
warn ("Please write a subnet declaration for the %s",
|
||||
"network segment to");
|
||||
error ("which interface %s is attached.", tmp -> name);
|
||||
warn ("Please write a subnet declaration in your %s",
|
||||
"dhcpd.conf file for the");
|
||||
error ("network segment to which interface %s %s",
|
||||
tmp -> name, "is attached.");
|
||||
}
|
||||
|
||||
/* Find subnets that don't have valid interface
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: ethernet.c,v 1.1.2.1 1999/05/27 17:35:47 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: ethernet.c,v 1.1.2.2 1999/11/11 16:10:41 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -79,8 +79,8 @@ void assemble_ethernet_header (interface, buf, bufix, to)
|
||||
eh.ether_type = htons (ETHERTYPE_IP);
|
||||
#endif
|
||||
|
||||
memcpy (&buf [*bufix], &eh, sizeof eh);
|
||||
*bufix += sizeof eh;
|
||||
memcpy (&buf [*bufix], &eh, ETHER_HEADER_SIZE);
|
||||
*bufix += ETHER_HEADER_SIZE;
|
||||
}
|
||||
#endif /* PACKET_ASSEMBLY */
|
||||
|
||||
@ -95,7 +95,7 @@ ssize_t decode_ethernet_header (interface, buf, bufix, from)
|
||||
{
|
||||
struct ether_header eh;
|
||||
|
||||
memcpy (&eh, buf + bufix, sizeof eh);
|
||||
memcpy (&eh, buf + bufix, ETHER_HEADER_SIZE);
|
||||
|
||||
#ifdef USERLAND_FILTER
|
||||
if (ntohs (eh.ether_type) != ETHERTYPE_IP)
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: lpf.c,v 1.1.2.9 1999/05/27 17:44:52 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: lpf.c,v 1.1.2.10 1999/10/25 15:39:02 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -155,6 +155,9 @@ extern int dhcp_bpf_filter_len;
|
||||
extern struct sock_filter dhcp_bpf_tr_filter [];
|
||||
extern int dhcp_bpf_tr_filter_len;
|
||||
|
||||
static void lpf_gen_filter_setup (struct interface_info *);
|
||||
static void lpf_tr_filter_setup (struct interface_info *);
|
||||
|
||||
void if_register_receive (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: options.c,v 1.26.2.10 1999/05/06 21:54:34 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: options.c,v 1.26.2.11 2000/06/24 07:24:02 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#define DHCP_OPTION_DATA
|
||||
@ -550,8 +550,22 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes)
|
||||
case 't':
|
||||
if (emit_quotes)
|
||||
*op++ = '"';
|
||||
strcpy (op, (char *)dp);
|
||||
op += strlen ((char *)dp);
|
||||
for (; dp < data + len; dp++) {
|
||||
if (!isascii (*dp) ||
|
||||
!isprint (*dp)) {
|
||||
sprintf (op, "\\%03o",
|
||||
*dp);
|
||||
op += 4;
|
||||
} else if (*dp == '"' ||
|
||||
*dp == '\'' ||
|
||||
*dp == '$' ||
|
||||
*dp == '`' ||
|
||||
*dp == '\\') {
|
||||
*op++ = '\\';
|
||||
*op++ = *dp;
|
||||
} else
|
||||
*op++ = *dp;
|
||||
}
|
||||
if (emit_quotes)
|
||||
*op++ = '"';
|
||||
*op = 0;
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: raw.c,v 1.11.2.3 1999/04/06 16:00:24 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: raw.c,v 1.11.2.4 1999/07/20 20:03:10 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -79,8 +79,14 @@ void if_register_send (info)
|
||||
|
||||
/* List addresses on which we're listening. */
|
||||
if (!quiet_interface_discovery)
|
||||
note ("Sending on %s, port %d",
|
||||
piaddr (info -> address), htons (local_port));
|
||||
note ("Sending on Raw Socket/%s/%s%s%s",
|
||||
info -> name,
|
||||
print_hw_addr (info -> hw_address.htype,
|
||||
info -> hw_address.hlen,
|
||||
info -> hw_address.haddr),
|
||||
(info -> shared_network ? "/" : ""),
|
||||
(info -> shared_network ?
|
||||
info -> shared_network -> name : ""));
|
||||
|
||||
if ((sock = socket (AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
|
||||
error ("Can't create dhcp socket: %m");
|
||||
@ -141,6 +147,12 @@ int can_unicast_without_arp ()
|
||||
return 1;
|
||||
}
|
||||
|
||||
int can_receive_unicast_unconfigured (ip)
|
||||
struct interface_info *ip;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void maybe_setup_fallback ()
|
||||
{
|
||||
}
|
||||
|
@ -50,16 +50,17 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: socket.c,v 1.26.2.11 1999/03/29 22:07:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: socket.c,v 1.26.2.12 1999/10/25 15:39:55 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
||||
#ifdef USE_SOCKET_FALLBACK
|
||||
# define USE_SOCKET_SEND
|
||||
# if !defined (USE_SOCKET_SEND)
|
||||
# define if_register_send if_register_fallback
|
||||
# define send_packet send_fallback
|
||||
# define if_reinitialize_send if_reinitialize_fallback
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static int once = 0;
|
||||
@ -67,7 +68,7 @@ static int once = 0;
|
||||
/* Reinitializes the specified interface after an address change. This
|
||||
is not required for packet-filter APIs. */
|
||||
|
||||
#ifdef USE_SOCKET_SEND
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_FALLBACK)
|
||||
void if_reinitialize_send (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
@ -93,7 +94,9 @@ void if_reinitialize_receive (info)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE)
|
||||
#if defined (USE_SOCKET_SEND) || \
|
||||
defined (USE_SOCKET_RECEIVE) || \
|
||||
defined (USE_SOCKET_FALLBACK)
|
||||
/* Generic interface registration routine... */
|
||||
int if_register_socket (info)
|
||||
struct interface_info *info;
|
||||
@ -147,9 +150,9 @@ int if_register_socket (info)
|
||||
|
||||
return sock;
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND || USE_SOCKET_RECEIVE */
|
||||
#endif /* USE_SOCKET_SEND || USE_SOCKET_RECEIVE || USE_SOCKET_FALLBACK */
|
||||
|
||||
#ifdef USE_SOCKET_SEND
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_FALLBACK)
|
||||
void if_register_send (info)
|
||||
struct interface_info *info;
|
||||
{
|
||||
@ -165,7 +168,7 @@ void if_register_send (info)
|
||||
(info -> shared_network ?
|
||||
info -> shared_network -> name : ""));
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND */
|
||||
#endif /* USE_SOCKET_SEND || USE_SOCKET_FALLBACK */
|
||||
|
||||
#ifdef USE_SOCKET_RECEIVE
|
||||
void if_register_receive (info)
|
||||
@ -183,7 +186,7 @@ void if_register_receive (info)
|
||||
}
|
||||
#endif /* USE_SOCKET_RECEIVE */
|
||||
|
||||
#ifdef USE_SOCKET_SEND
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_FALLBACK)
|
||||
ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||
struct interface_info *interface;
|
||||
struct packet *packet;
|
||||
@ -215,7 +218,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND */
|
||||
#endif /* USE_SOCKET_SEND || USE_SOCKET_FALLBACK */
|
||||
|
||||
#ifdef USE_SOCKET_RECEIVE
|
||||
ssize_t receive_packet (interface, buf, len, from, hfrom)
|
||||
@ -244,7 +247,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
||||
}
|
||||
#endif /* USE_SOCKET_RECEIVE */
|
||||
|
||||
#ifdef USE_SOCKET_SEND
|
||||
#if defined (USE_SOCKET_FALLBACK)
|
||||
/* This just reads in a packet and silently discards it. */
|
||||
|
||||
void fallback_discard (protocol)
|
||||
@ -261,9 +264,9 @@ void fallback_discard (protocol)
|
||||
if (status < 0)
|
||||
warn ("fallback_discard: %m");
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND */
|
||||
#endif /* USE_SOCKET_FALLBACK */
|
||||
|
||||
#if defined (USE_SOCKET_SEND) && !defined (USE_SOCKET_FALLBACK)
|
||||
#if defined (USE_SOCKET_SEND)
|
||||
int can_unicast_without_arp ()
|
||||
{
|
||||
return 0;
|
||||
@ -284,7 +287,7 @@ int can_receive_unicast_unconfigured (ip)
|
||||
|
||||
void maybe_setup_fallback ()
|
||||
{
|
||||
#if defined (SO_BINDTODEVICE)
|
||||
#if defined (USE_SOCKET_FALLBACK)
|
||||
struct interface_info *fbi;
|
||||
fbi = setup_fallback ();
|
||||
if (fbi) {
|
||||
@ -294,4 +297,4 @@ void maybe_setup_fallback ()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* USE_SOCKET_SEND && !USE_SOCKET_FALLBACK */
|
||||
#endif /* USE_SOCKET_SEND */
|
||||
|
100
contrib/isc-dhcp/configure
vendored
Executable file
100
contrib/isc-dhcp/configure
vendored
Executable file
@ -0,0 +1,100 @@
|
||||
#!/bin/sh
|
||||
|
||||
sysname=$1
|
||||
|
||||
uname=`uname -s`
|
||||
machine=`uname -m`
|
||||
|
||||
if [ "$sysname" = "" ]; then
|
||||
case $uname in
|
||||
AIX)
|
||||
sysname=aix;;
|
||||
Rhapsody)
|
||||
sysname=rhapsody;;
|
||||
ULTRIX)
|
||||
sysname=ultrix;;
|
||||
BSD/OS)
|
||||
sysname=bsdos;;
|
||||
OSF1)
|
||||
if [ $machine = 'alpha' ]; then
|
||||
sysname=alphaosf
|
||||
fi;;
|
||||
Linux)
|
||||
release=`uname -r`
|
||||
minor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
|
||||
major=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
|
||||
|
||||
case $major in
|
||||
1) sysname=linux-1 ;;
|
||||
2) case $minor in
|
||||
0) sysname=linux-2.0 ;;
|
||||
1) sysname=linux-2.1 ;;
|
||||
2) sysname=linux-2.2 ;;
|
||||
*) sysname=linux-2.2 ;;
|
||||
esac;;
|
||||
esac;;
|
||||
SunOS)
|
||||
case `uname -r` in
|
||||
4*) sysname=sunos4;;
|
||||
5*)
|
||||
set `which gcc`
|
||||
if [ $# = 1 ]; then
|
||||
sysname=sunos5-gcc
|
||||
else
|
||||
sysname=sunos5-cc
|
||||
fi;;
|
||||
esac;;
|
||||
NetBSD)
|
||||
sysname=netbsd;;
|
||||
FreeBSD)
|
||||
sysname=freebsd;;
|
||||
hpux)
|
||||
sysname=hpux;;
|
||||
HP-UX)
|
||||
sysname=hpux;;
|
||||
QNX)
|
||||
sysname=qnx;;
|
||||
NEXTSTEP)
|
||||
sysname=nextstep;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$sysname" = "" ]; then
|
||||
echo "UNIX name: $uname machine: $machine"
|
||||
echo
|
||||
echo "Unknown system. If this is an SCO system running ODT 3.0 or"
|
||||
echo "higher, type \`\`./configure sco''. Otherwise, this is a"
|
||||
echo "configuration that isn't supported or hasn't been tested."
|
||||
echo
|
||||
echo "Supported configurations are:"
|
||||
echo " aix AIX 4.1.5.0"
|
||||
echo " ultrix ULTRIX 4.2A or higher"
|
||||
echo " bsdos BSDI BSD/OS 2.1"
|
||||
echo " alphaosf DEC Alpha OSF/1"
|
||||
echo " linux Linux"
|
||||
echo " sunos4 Sunos 4.1.4 (earlier releases may work)"
|
||||
echo " sunos5-cc Solaris 2.4 or higher with Sun cc"
|
||||
echo " sunos5-gcc Solaris 2.4 or higher with gcc"
|
||||
echo " netbsd NetBSD 1.1 or higher"
|
||||
echo " freebsd FreeBSD"
|
||||
echo " hpux HP-UX"
|
||||
echo " qnx QNX 4.2 or higher"
|
||||
echo " NEXTSTEP NeXTSTEP"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "System Type: $sysname"
|
||||
|
||||
if [ x$major != x ] && [ x$minor != x ]; then
|
||||
majversubst="-e /^##--majver--/,/^##--majver--/s/MajorVersion/$major/"
|
||||
minversubst="-e /^##--minver--/,/^##--minver--/s/MinorVersion/$minor/"
|
||||
fi
|
||||
|
||||
for foo in . client server relay common; do
|
||||
(sed $majversubst $minversubst \
|
||||
-e "/^##--${sysname}--/,/^##--${sysname}--/s/^#//" \
|
||||
<Makefile.conf; cat $foo/Makefile.dist) \
|
||||
>$foo/Makefile
|
||||
done
|
||||
|
||||
exit 0
|
@ -660,7 +660,7 @@ void hash_dump PROTO ((struct hash_table *));
|
||||
int if_register_socket PROTO ((struct interface_info *));
|
||||
#endif
|
||||
|
||||
#ifdef USE_SOCKET_FALLBACK
|
||||
#if defined (USE_SOCKET_FALLBACK) && !defined (USE_SOCKET_SEND)
|
||||
void if_reinitialize_fallback PROTO ((struct interface_info *));
|
||||
void if_register_fallback PROTO ((struct interface_info *));
|
||||
ssize_t send_fallback PROTO ((struct interface_info *,
|
||||
@ -687,7 +687,7 @@ ssize_t receive_packet PROTO ((struct interface_info *,
|
||||
unsigned char *, size_t,
|
||||
struct sockaddr_in *, struct hardware *));
|
||||
#endif
|
||||
#if defined (USE_SOCKET_SEND) && !defined (USE_SOCKET_FALLBACK)
|
||||
#if defined (USE_SOCKET_SEND)
|
||||
int can_unicast_without_arp PROTO ((void));
|
||||
int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
|
||||
void maybe_setup_fallback PROTO ((void));
|
||||
|
@ -72,3 +72,4 @@ struct ether_header {
|
||||
#define ETHERMTU 1500
|
||||
#define ETHERMIN (60-14)
|
||||
|
||||
#define ETHER_HEADER_SIZE (ETHER_ADDR_LEN * 2 + sizeof (u_int16_t))
|
||||
|
@ -107,7 +107,7 @@
|
||||
# include "cf/sco.h"
|
||||
#endif
|
||||
|
||||
#ifdef hpux
|
||||
#if defined (hpux) || defined (__hpux)
|
||||
# include "cf/hpux.h"
|
||||
#endif
|
||||
|
||||
@ -210,7 +210,9 @@
|
||||
|
||||
#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \
|
||||
defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \
|
||||
defined (USE_DLPI_RECEIVE) || defined (USE_LPF_RECEIVE)
|
||||
defined (USE_DLPI_RECEIVE) || \
|
||||
defined (USE_LPF_SEND) || \
|
||||
(defined (USE_SOCKET_SEND) && defined (SO_BINDTODEVICE))
|
||||
# define PACKET_DECODING
|
||||
#endif
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* Current version of ISC DHCP Distribution. */
|
||||
|
||||
#define DHCP_VERSION "2.0"
|
||||
#define DHCP_VERSION "2.0pl1"
|
||||
|
Loading…
Reference in New Issue
Block a user