Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
64
Issues
64
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
d758ad8c
Commit
d758ad8c
authored
Jun 27, 2001
by
Ted Lemon
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge changes between 3.0rc7 and 3.0rc8pl2.
parent
07b95800
Changes
99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
99 changed files
with
5909 additions
and
2698 deletions
+5909
-2698
Makefile.conf
Makefile.conf
+75
-15
RELNOTES
RELNOTES
+114
-0
client/clparse.c
client/clparse.c
+62
-31
client/dhclient.8
client/dhclient.8
+31
-0
client/dhclient.c
client/dhclient.c
+203
-15
client/dhclient.conf.5
client/dhclient.conf.5
+20
-0
client/scripts/bsdos
client/scripts/bsdos
+8
-5
client/scripts/freebsd
client/scripts/freebsd
+8
-5
client/scripts/linux
client/scripts/linux
+8
-5
client/scripts/netbsd
client/scripts/netbsd
+8
-5
client/scripts/nextstep
client/scripts/nextstep
+8
-5
client/scripts/openbsd
client/scripts/openbsd
+8
-5
client/scripts/solaris
client/scripts/solaris
+8
-5
common/alloc.c
common/alloc.c
+136
-71
common/comapi.c
common/comapi.c
+252
-5
common/conflex.c
common/conflex.c
+5
-1
common/dhcp-options.5
common/dhcp-options.5
+9
-2
common/discover.c
common/discover.c
+23
-4
common/dispatch.c
common/dispatch.c
+24
-3
common/dns.c
common/dns.c
+438
-31
common/ethernet.c
common/ethernet.c
+3
-3
common/execute.c
common/execute.c
+104
-23
common/icmp.c
common/icmp.c
+20
-29
common/inet.c
common/inet.c
+59
-2
common/memory.c
common/memory.c
+5
-9
common/options.c
common/options.c
+37
-11
common/packet.c
common/packet.c
+12
-6
common/parse.c
common/parse.c
+71
-40
common/print.c
common/print.c
+52
-2
common/tables.c
common/tables.c
+497
-496
common/tree.c
common/tree.c
+119
-87
configure
configure
+49
-21
dhcpctl/Makefile.dist
dhcpctl/Makefile.dist
+17
-5
dhcpctl/cltest.c
dhcpctl/cltest.c
+1
-1
dhcpctl/dhcpctl.3
dhcpctl/dhcpctl.3
+11
-4
dhcpctl/dhcpctl.c
dhcpctl/dhcpctl.c
+38
-9
dhcpctl/dhcpctl.h
dhcpctl/dhcpctl.h
+1
-0
dhcpctl/omshell.c
dhcpctl/omshell.c
+97
-9
dhcpctl/remote.c
dhcpctl/remote.c
+2
-0
dst/dst_internal.h
dst/dst_internal.h
+1
-1
includes/cdefs.h
includes/cdefs.h
+1
-1
includes/cf/qnx.h
includes/cf/qnx.h
+64
-6
includes/cf/rhapsody.h
includes/cf/rhapsody.h
+3
-1
includes/cf/sunos4.h
includes/cf/sunos4.h
+2
-0
includes/dhcpd.h
includes/dhcpd.h
+121
-12
includes/dhctoken.h
includes/dhctoken.h
+3
-1
includes/failover.h
includes/failover.h
+1
-1
includes/minires/minires.h
includes/minires/minires.h
+1
-1
includes/minires/res_update.h
includes/minires/res_update.h
+2
-2
includes/netinet/if_ether.h
includes/netinet/if_ether.h
+4
-18
includes/omapip/alloc.h
includes/omapip/alloc.h
+11
-11
includes/omapip/hash.h
includes/omapip/hash.h
+3
-1
includes/omapip/omapip.h
includes/omapip/omapip.h
+20
-3
includes/omapip/omapip_p.h
includes/omapip/omapip_p.h
+8
-3
includes/omapip/trace.h
includes/omapip/trace.h
+1
-0
includes/osdep.h
includes/osdep.h
+1
-1
includes/statement.h
includes/statement.h
+1
-1
includes/version.h
includes/version.h
+1
-1
minires/ns_sign.c
minires/ns_sign.c
+2
-2
minires/ns_verify.c
minires/ns_verify.c
+2
-2
minires/res_findzonecut.c
minires/res_findzonecut.c
+2
-2
minires/res_init.c
minires/res_init.c
+4
-4
minires/res_sendsigned.c
minires/res_sendsigned.c
+2
-2
minires/res_update.c
minires/res_update.c
+8
-7
omapip/Makefile.dist
omapip/Makefile.dist
+7
-4
omapip/alloc.c
omapip/alloc.c
+185
-51
omapip/array.c
omapip/array.c
+19
-0
omapip/auth.c
omapip/auth.c
+7
-4
omapip/buffer.c
omapip/buffer.c
+10
-6
omapip/connection.c
omapip/connection.c
+15
-7
omapip/dispatch.c
omapip/dispatch.c
+23
-0
omapip/generic.c
omapip/generic.c
+73
-23
omapip/hash.c
omapip/hash.c
+76
-7
omapip/message.c
omapip/message.c
+7
-11
omapip/omapi.3
omapip/omapi.3
+182
-120
omapip/protocol.c
omapip/protocol.c
+8
-3
omapip/result.c
omapip/result.c
+3
-1
omapip/support.c
omapip/support.c
+13
-0
omapip/test.c
omapip/test.c
+1
-1
omapip/toisc.c
omapip/toisc.c
+1
-1
omapip/trace.c
omapip/trace.c
+36
-0
relay/dhcrelay.8
relay/dhcrelay.8
+11
-12
server/bootp.c
server/bootp.c
+8
-3
server/class.c
server/class.c
+15
-15
server/confpars.c
server/confpars.c
+71
-44
server/db.c
server/db.c
+92
-16
server/ddns.c
server/ddns.c
+29
-415
server/dhcp.c
server/dhcp.c
+257
-150
server/dhcpd.8
server/dhcpd.8
+16
-0
server/dhcpd.c
server/dhcpd.c
+200
-30
server/dhcpd.conf.5
server/dhcpd.conf.5
+16
-28
server/failover.c
server/failover.c
+188
-43
server/mdb.c
server/mdb.c
+367
-84
server/omapi.c
server/omapi.c
+408
-84
server/salloc.c
server/salloc.c
+110
-3
server/stables.c
server/stables.c
+468
-468
tests/failover/dhcp-1.cf
tests/failover/dhcp-1.cf
+43
-3
tests/failover/dhcp-2.cf
tests/failover/dhcp-2.cf
+29
-4
tests/failover/new-failover
tests/failover/new-failover
+3
-3
No files found.
Makefile.conf
View file @
d758ad8c
...
...
@@ -19,6 +19,7 @@
## Defaults...
SCRIPT
=
none
USERBINDIR
= /
usr
/
bin
BINDIR
= /
usr
/
sbin
CLIENTBINDIR
=/
sbin
ADMMANDIR
= /
usr
/
share
/
man
/
cat8
...
...
@@ -27,6 +28,8 @@ FFMANDIR = /usr/share/man/cat5
FFMANEXT
= .
0
LIBMANDIR
= /
usr
/
share
/
man
/
cat3
LIBMANEXT
= .
0
USRMANDIR
= /
usr
/
share
/
man
/
cat1
USRMANEXT
= .
0
MANCAT
=
cat
INSTALL
=
install
-
c
-
m
444
MANINSTALL
=
install
-
c
...
...
@@ -38,7 +41,7 @@ VARDB = /var/db
LIBDIR
=/
usr
/
local
/
lib
INCDIR
=/
usr
/
local
/
include
LIBS
=
COPTS
= $(
BINDDEF
)
COPTS
= $(
BINDDEF
)
$(
CC_OPTIONS
)
DEBUG
= -
g
RANLIB
=
ranlib
MKDEP
=
mkdep
...
...
@@ -86,14 +89,16 @@ MINORVERSION=MinorVersion
##--nextstep--
#CF = cf/nextstep.h
#CC=cc
#COPTS = -Wall $(BINDDEF)
#COPTS = -Wall $(BINDDEF)
$(CC_OPTIONS)
#BINDIR=/usr/etc
#ADMMANDIR = /usr/local/man/cat8
#FFMANDIR = /usr/local/man/cat5
#LIBMANDIR = /usr/local/man/cat3
#USRMANDIR = /usr/local/man/cat1
#ADMMANEXT = .8
#FFMANEXT = .5
#LIBMANEXT = .3
#USRMANEXT = .3
#VARRUN = /etc
#VARDB = /etc
##--nextstep--
...
...
@@ -119,7 +124,8 @@ MINORVERSION=MinorVersion
#CC=gcc
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror \
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION)
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
# $(CC_OPTIONS)
#CF = cf/sunos5-5.h
#ADMMANDIR = /usr/share/man/man1m
#ADMMANEXT = .1m
...
...
@@ -127,6 +133,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/share/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /etc
#VARDB = /etc
...
...
@@ -140,7 +148,8 @@ MINORVERSION=MinorVersion
#LIBS = -lresolv -lsocket -lnsl -lgen
#CC=cc
#COPTS = -D__svr4__ $(BINDDEF) -erroff=E_END_OF_LOOP_CODE_NOT_REACHED \
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION)
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
# $(CC_OPTIONS)
#CF = cf/sunos5-5.h
#ADMMANDIR = /usr/share/man/man1m
#ADMMANEXT = .1m
...
...
@@ -148,6 +157,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/share/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /etc
#VARDB = /etc
...
...
@@ -156,7 +167,7 @@ MINORVERSION=MinorVersion
## DEC Alpha/OSF1
##--alphaosf--
#COPTS = -std
#COPTS = -std
$(CC_OPTIONS)
#INSTALL=/usr/ucb/installbsd -c
#MANINSTALL=/usr/ucb/installbsd -c
#CF = cf/alphaosf.h
...
...
@@ -195,10 +206,18 @@ MINORVERSION=MinorVersion
##--rhapsody--
#CF = cf/rhapsody.h
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF)
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF)
$(CC_OPTIONS)
##SCRIPT=rhapsody
##--rhapsody--
## Darwin/MacOSX
##--darwin--
#CF = cf/rhapsody.h
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
##SCRIPT=rhapsody
##--darwin--
## NetBSD
##--netbsd--
#CF = cf/netbsd.h
...
...
@@ -207,7 +226,7 @@ MINORVERSION=MinorVersion
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
# -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF)
# -pipe $(BINDDEF)
$(CC_OPTIONS)
#SCRIPT=netbsd
##MKDEP=makedepend
##--netbsd--
...
...
@@ -224,7 +243,7 @@ MINORVERSION=MinorVersion
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
# -Wwrite-strings -Wmissing-prototypes \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF)
# -pipe $(BINDDEF)
$(CC_OPTIONS)
#SCRIPT=netbsd
##--netbsd-nocast--
...
...
@@ -241,11 +260,14 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/cat1
#USRMANEXT = .1
##--ultrix--
## Linux 1.x
##--linux-1--
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) $(BINDDEF)
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) \
# $(BINDDEF) $(CC_OPTIONS)
#CF = cf/linux.h
#ADMMANDIR = /usr/man/man8
#ADMMANEXT = .8
...
...
@@ -253,6 +275,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
...
...
@@ -261,7 +285,8 @@ MINORVERSION=MinorVersion
## Linux 2.0
##--linux-2.0--
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) $(BINDDEF)
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) \
# $(BINDDEF) $(CC_OPTIONS)
#CF = cf/linux.h
#ADMMANDIR = /usr/man/man8
#ADMMANEXT = .8
...
...
@@ -269,6 +294,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
...
...
@@ -277,7 +304,8 @@ MINORVERSION=MinorVersion
## Linux 2.1
##--linux-2.1--
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) $(BINDDEF)
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) \
# $(BINDDEF) $(CC_OPTIONS)
#CF = cf/linux.h
#ADMMANDIR = /usr/man/man8
#ADMMANEXT = .8
...
...
@@ -285,6 +313,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
...
...
@@ -293,7 +323,8 @@ MINORVERSION=MinorVersion
## Linux 2.2
##--linux-2.2--
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) $(BINDDEF)
#COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) \
# $(BINDDEF) $(CC_OPTIONS)
#CF = cf/linux.h
#ADMMANDIR = /usr/man/man8
#ADMMANEXT = .8
...
...
@@ -301,6 +332,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
...
...
@@ -340,6 +373,7 @@ MINORVERSION=MinorVersion
#CC=gcc
#PREDEFINES=-DSCO
#LIBS = -lsocket
#USERBINDIR = /usr/local/dhcp/bin
#BINDIR = /usr/local/dhcp/bin
#CLIENTBINDIR = /usr/local/dhcp/bin
#ADMMANDIR = /usr/local/dhcp/man/cat.ADMN
...
...
@@ -365,9 +399,11 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#MANCAT = man
#VARRUN = /etc
#COPTS=-w3 -Dlint $(BINDDEF)
#COPTS=-w3 -Dlint $(BINDDEF)
$(CC_OPTIONS)
#LFLAGS=$(DEBUG) "-Wl,op symfile" -l socket
#MANINSTALL = /bin/true
#INSTALL = cp
...
...
@@ -375,6 +411,26 @@ MINORVERSION=MinorVersion
#CLIENTBINDIR = /etc
##--qnx--
## QNX RTP (v6, NTO)
##--qnxnto--
#CF = cf/qnx.h
#ADMMANDIR = /opt/man/man8
#ADMMANEXT = .8
#FFMANDIR = /opt/man/man5
#FFMANEXT = .5
#LIBMANDIR = /opt/man/man3
#LIBMANEXT = .3
#MANCAT = man
#COPTS=-w3 -Dlint $(BINDDEF)
#LFLAGS=-l socket
#MANINSTALL = /bin/cp
#INSTALL = /bin/cp
#BINDIR = /opt/sbin
#USERBINDIR= /opt/bin
#CLIENTBINDIR = /opt/sbin
##--qnxnto--
## CygWin32
##--cygwin32--
#CF = cf/cygwin32.h
...
...
@@ -384,6 +440,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/man/man1
#USRMANEXT = .1
#VARRUN = /etc
#MANINSTALL = /bin/true
#INSTALL = cp
...
...
@@ -402,7 +460,7 @@ MINORVERSION=MinorVersion
##--irix--
#LFLAGS=$(DEBUG) -Wl,-woff,84 -Wl,-woff,85 -Wl,-woff,134
#CC=gcc
#COPTS = -I/usr/local/include $(BINDDEF)
#COPTS = -I/usr/local/include $(BINDDEF)
$(CC_OPTIONS)
#CF = cf/irix.h
#BINDIR = /usr/local/etc
#ADMMANDIR = /usr/local/man/man8
...
...
@@ -411,6 +469,8 @@ MINORVERSION=MinorVersion
#FFMANEXT = .5
#LIBMANDIR = /usr/local/man/man3
#LIBMANEXT = .3
#USRMANDIR = /usr/local/man/man1
#USRMANEXT = .1
#MANCAT = man
#INSTALL = install
#MANINSTALL = install
...
...
@@ -422,7 +482,7 @@ MINORVERSION=MinorVersion
## HP-UX
##--hpux-cc--
#COPTS = $(BINDDEF)
#COPTS = $(BINDDEF)
$(CC_OPTIONS)
#LFLAGS = -Wl,+vnocompatwarnings
#INSTALL = install -i
#MANINSTALL = install -i
...
...
RELNOTES
View file @
d758ad8c
...
...
@@ -56,6 +56,120 @@ Murrell at BC Tel Advanced Communications. I'd like to express my
thanks
to
all
of
these
good
people
here
,
both
for
working
on
the
code
and
for
prodding
me
into
improving
it
.
Changes
since
3.0
Release
Candidate
8
Patchlevel
1
-
Fix
a
parsing
bug
that
broke
dns
updates
(
both
interim
and
ad
-
hoc
).
This
was
introduced
in
rc8pl1
as
an
unintended
result
of
the
memory
leakage
fixes
that
were
in
pl1
.
-
Fix
a
long
-
standing
bug
where
the
server
would
record
that
an
update
had
been
done
for
a
client
with
no
name
,
even
though
no
update
had
been
done
,
and
then
when
the
client
's lease expired the deletion of
that nonexistant record would time out because the name was the null
string.
- Clean up the omshell, dhcpctl and omapi man pages a bit.
Changes since 3.0 Release Candidate 8
- Fix a bug that could cause the DHCP server to spin if
one-lease-per-client was enabled.
- Fix a bug that was causing core dumps on BSD/os in the presence of
malformed packets.
- In partner-down state, don'
t
restrict
lease
lengths
to
MCLT
.
-
On
the
failover
secondary
,
record
the
MCLT
received
from
the
primary
so
that
if
we
come
up
without
a
connection
to
the
primary
we
don
't
wind up giving out zero-length leases.
- Fix some compilation problems on BSD/os.
- Fix a bunch of memory leaks.
- Fix a couple of bugs in the option printer.
- Fix an obscure error reporting bug in the dns update code, and also
make the message clearer when a key algorithm isn'
t
supported
.
-
Fix
a
bug
in
the
tracing
code
that
prevented
trace
runs
that
used
tcp
connections
from
being
played
back
.
-
Add
some
additional
debugging
capability
for
catching
memory
leaks
on
exit
.
-
Make
the
client
release
the
lease
correctly
on
shutdown
.
-
Add
some
configurability
to
the
build
system
.
-
Install
omshell
manual
page
in
man1
,
not
man8
.
-
Craig
Gwydir
sent
in
a
patch
that
fixes
a
long
-
standing
bug
in
the
DHCP
client
that
could
cause
core
dumps
,
but
that
for
some
reason
hadn
't been noticed until now.
Changes since 3.0 Release Candidate 7
- Fix a bug in failover where we weren'
t
sending
updates
after
a
transition
from
communications
-
interrupted
to
normal
.
-
Handle
expired
/
released
/
reset
->
free
transition
according
to
the
protocol
specification
(
this
works
-
the
other
way
not
only
wasn
't
conformant, but also didn'
t
work
).
-
Add
a
control
object
in
both
client
and
server
that
allows
either
daemon
to
be
shut
down
cleanly
.
-
When
writing
a
lease
,
if
we
run
out
of
disk
space
,
shut
down
the
output
file
and
insist
on
writing
a
new
one
before
proceeding
.
-
In
the
server
,
if
the
OMAPI
listener
port
is
occupied
,
keep
trying
to
get
it
,
rather
than
simply
giving
up
and
exiting
.
-
Support
fetching
variables
from
leases
and
also
updating
and
adding
variables
to
leases
via
OMAPI
.
-
If
two
failover
peers
have
wildly
different
clocks
,
refuse
to
start
doing
failover
.
-
Fix
a
bug
in
the
DNS
update
code
that
could
cause
core
dumps
when
running
on
alpha
processors
.
-
Fixed
a
bug
in
ddns
updates
for
static
lease
entries
,
thanks
to
a
patch
from
Andrey
M
Linkevitch
.
-
Add
support
for
Darwin
/
MacOS
X
-
Install
omshell
(
including
new
documentation
).
-
Support
DNS
updates
in
the
client
(
this
is
a
very
obscure
feature
that
most
DHCP
client
users
probably
will
not
be
able
to
use
).
-
Somewhat
cleaner
status
logging
in
the
client
.
-
Make
OMAPI
key
naming
syntax
compatible
with
the
way
keys
are
actually
named
(
key
names
are
domain
names
).
-
Fix
a
bug
in
the
lease
file
writer
.
-
Install
DHCP
ISC
headers
in
a
different
place
than
BIND
9
ISC
headers
,
to
avoid
causing
trouble
in
BIND
9
builds
.
-
Don
't send updates for attributes on an object when the attributes
haven'
t
changed
.
Support
deleting
attributes
on
remote
objects
.
-
Fix
a
number
of
bugs
in
omshell
,
and
add
the
unset
and
refresh
statements
.
-
Handle
disconnects
in
OMAPI
a
little
bit
more
intelligently
(
so
that
the
caller
gets
ECONNRESET
instead
of
EINVAL
).
-
Fix
a
bunch
of
bugs
in
the
handling
of
clients
that
have
existing
leases
when
the
try
to
renew
their
leases
while
failover
is
operating
.
Changes
since
3.0
Release
Candidate
3
-
Do
lease
billing
on
startup
in
a
way
that
I
*
think
*
will
finally
do
...
...
client/clparse.c
View file @
d758ad8c
...
...
@@ -43,7 +43,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: clparse.c,v 1.6
2 2001/05/04 00:51:35
mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: clparse.c,v 1.6
3 2001/06/27 00:29:27
mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -70,11 +70,6 @@ u_int32_t default_requested_options [] = {
isc_result_t
read_client_conf
()
{
int
file
;
struct
parse
*
cfile
;
const
char
*
val
;
int
token
;
int
declaration
=
0
;
struct
client_config
*
config
;
struct
client_state
*
state
;
struct
interface_info
*
ip
;
...
...
@@ -106,26 +101,12 @@ isc_result_t read_client_conf ()
if
(
!
top_level_config
.
on_transmission
)
log_fatal
(
"no memory for top-level on_transmission group"
);
if
((
file
=
open
(
path_dhclient_conf
,
O_RDONLY
))
>=
0
)
{
cfile
=
(
struct
parse
*
)
0
;
new_parse
(
&
cfile
,
file
,
(
char
*
)
0
,
0
,
path_dhclient_conf
,
0
);
do
{
token
=
peek_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
if
(
token
==
END_OF_FILE
)
break
;
parse_client_statement
(
cfile
,
(
struct
interface_info
*
)
0
,
&
top_level_config
);
}
while
(
1
);
token
=
next_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
status
=
(
cfile
->
warnings_occurred
?
ISC_R_BADPARSE
:
ISC_R_SUCCESS
);
close
(
file
);
end_parse
(
&
cfile
);
status
=
read_client_conf_file
(
path_dhclient_conf
,
(
struct
interface_info
*
)
0
,
&
top_level_config
);
if
(
status
!=
ISC_R_SUCCESS
)
{
;
#ifdef LATER
}
else
{
/* Set up the standard name service updater routine. */
parse
=
(
struct
parse
*
)
0
;
status
=
new_parse
(
&
parse
,
-
1
,
default_client_config
,
...
...
@@ -175,6 +156,37 @@ isc_result_t read_client_conf ()
return
status
;
}
int
read_client_conf_file
(
const
char
*
name
,
struct
interface_info
*
ip
,
struct
client_config
*
client
)
{
int
file
;
struct
parse
*
cfile
;
const
char
*
val
;
int
token
;
isc_result_t
status
;
if
((
file
=
open
(
name
,
O_RDONLY
))
<
0
)
return
uerr2isc
(
errno
);
cfile
=
(
struct
parse
*
)
0
;
new_parse
(
&
cfile
,
file
,
(
char
*
)
0
,
0
,
path_dhclient_conf
,
0
);
do
{
token
=
peek_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
if
(
token
==
END_OF_FILE
)
break
;
parse_client_statement
(
cfile
,
ip
,
client
);
}
while
(
1
);
token
=
next_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
status
=
(
cfile
->
warnings_occurred
?
ISC_R_BADPARSE
:
ISC_R_SUCCESS
);
close
(
file
);
end_parse
(
&
cfile
);
return
status
;
}
/* lease-file :== client-lease-statements END_OF_FILE
client-lease-statements :== <nil>
| client-lease-statements LEASE client-lease-statement */
...
...
@@ -246,8 +258,23 @@ void parse_client_statement (cfile, ip, config)
enum
policy
policy
;
int
known
;
int
tmp
,
i
;
isc_result_t
status
;
switch
(
peek_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
))
{
case
INCLUDE
:
next_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
token
=
next_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
if
(
token
!=
STRING
)
{
parse_warn
(
cfile
,
"filename string expected."
);
skip_to_semi
(
cfile
);
}
else
{
status
=
read_client_conf_file
(
val
,
ip
,
config
);
if
(
status
!=
ISC_R_SUCCESS
)
parse_warn
(
cfile
,
"%s: bad parse."
,
val
);
parse_semi
(
cfile
);
}
return
;
case
KEY
:
next_token
(
&
val
,
(
unsigned
*
)
0
,
cfile
);
if
(
ip
)
{
...
...
@@ -531,9 +558,10 @@ void parse_client_statement (cfile, ip, config)
}
}
else
{
struct
executable_statement
**
eptr
,
*
sptr
;
if
(
stmt
->
op
==
send_option_statement
||
(
stmt
->
op
==
on_statement
&&
(
stmt
->
data
.
on
.
evtypes
&
ON_TRANSMISSION
)))
{
if
(
stmt
&&
(
stmt
->
op
==
send_option_statement
||
(
stmt
->
op
==
on_statement
&&
(
stmt
->
data
.
on
.
evtypes
&
ON_TRANSMISSION
))))
{
eptr
=
&
config
->
on_transmission
->
statements
;
if
(
stmt
->
op
==
on_statement
)
{
sptr
=
(
struct
executable_statement
*
)
0
;
...
...
@@ -551,9 +579,12 @@ void parse_client_statement (cfile, ip, config)
}
else
eptr
=
&
config
->
on_receipt
->
statements
;
for
(;
*
eptr
;
eptr
=
&
(
*
eptr
)
->
next
)
;
executable_statement_reference
(
eptr
,
stmt
,
MDL
);
if
(
stmt
)
{
for
(;
*
eptr
;
eptr
=
&
(
*
eptr
)
->
next
)
;
executable_statement_reference
(
eptr
,
stmt
,
MDL
);
}
return
;
}
break
;
...
...
client/dhclient.8
View file @
d758ad8c
...
...
@@ -246,6 +246,37 @@ supplying the
flag.
.SH CONFIGURATION
The syntax of the dhclient.conf(8) file is discussed seperately.
.SH OMAPI
The DHCP client provides some ability to control it while it is
running, without stopping it. This capability is provided using OMAPI,
an API for manipulating remote objects. OMAPI clients connect to the
client using TCP/IP, authenticate, and can then examine the client's
current status and make changes to it.
.PP
Rather than implementing the underlying OMAPI protocol directly, user
programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a
wrapper that handles some of the housekeeping chores that OMAPI does
not do automatically. Dhcpctl and OMAPI are documented in \fBdhcpctl(3)\fR
and \fBomapi(3)\fR. Most things you'd want to do with the client can
be done directly using the \fBomshell(1)\fR command, rather than
having to write a special program.
.SH THE CONTROL OBJECT
The control object allows you to shut the client down, releasing all
leases that it holds and deleting any DNS records it may have added.
It also allows you to pause the client - this unconfigures any
interfaces the client is using. You can then restart it, which
causes it to reconfigure those interfaces. You would normally pause
the client prior to going into hibernation or sleep on a laptop
computer. You would then resume it after the power comes back.
This allows PC cards to be shut down while the computer is hibernating
or sleeping, and then reinitialized to their previous state once the
computer comes out of hibernation or sleep.
.PP
The control object has one attribute - the state attribute. To shut
the client down, set its state attribute to 2. It will automatically
do a DHCPRELEASE. To pause it, set its state attribute to 3. To
resume it, set its state attribute to 4.
.PP
.SH FILES
.B CLIENTBINDIR/dhclient-script,
.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
...
...
client/dhclient.c
View file @
d758ad8c
...
...
@@ -41,7 +41,7 @@
#ifndef lint
static
char
ocopyright
[]
=
"$Id: dhclient.c,v 1.1
29 2001/04/16 22:07:33
mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: dhclient.c,v 1.1
30 2001/06/27 00:29:29
mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -445,7 +445,8 @@ int main (argc, argv, envp)
/* Set up the bootp packet handler... */
bootp_packet_handler
=
do_packet
;
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
dmalloc_cutoff_generation
=
dmalloc_generation
;
dmalloc_longterm
=
dmalloc_outstanding
;
dmalloc_outstanding
=
0
;
...
...
@@ -551,7 +552,8 @@ void state_reboot (cpp)
/* If we don't remember an active lease, go straight to INIT. */
if
(
!
client
->
active
||
client
->
active
->
is_bootp
)
{
client
->
active
->
is_bootp
||
client
->
active
->
expiry
<=
cur_time
)
{
state_init
(
client
);
return
;
}
...
...
@@ -880,6 +882,7 @@ void bind_lease (client)
client
->
state
=
S_BOUND
;
reinitialize_interfaces
();
go_daemon
();
client_dns_update
(
client
,
1
);
}
/* state_bound is called when we've successfully bound to a particular
...
...
@@ -925,6 +928,32 @@ void state_bound (cpp)
send_request
(
client
);
}
/* state_stop is called when we've been told to shut down. We unconfigure
the interfaces, and then stop operating until told otherwise. */
void
state_stop
(
cpp
)
void
*
cpp
;
{
struct
client_state
*
client
=
cpp
;
int
i
;
/* Cancel all timeouts. */
cancel_timeout
(
state_selecting
,
client
);
cancel_timeout
(
send_discover
,
client
);
cancel_timeout
(
send_request
,
client
);