mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Merge changes between 3.0.3b1 and 3.0.3rc1 to HEAD.
This commit is contained in:
parent
13936722ca
commit
c75473d800
@ -47,6 +47,7 @@ INCDIR=/usr/local/include
|
|||||||
LIBS =
|
LIBS =
|
||||||
COPTS = $(BINDDEF) $(CC_OPTIONS)
|
COPTS = $(BINDDEF) $(CC_OPTIONS)
|
||||||
DEBUG = -g
|
DEBUG = -g
|
||||||
|
#WARNERR = -Werror
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
MKDEP = mkdep
|
MKDEP = mkdep
|
||||||
CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'
|
CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'
|
||||||
@ -128,7 +129,7 @@ MINORVERSION=MinorVersion
|
|||||||
#LIBS = -lresolv -lsocket -lnsl -lgen
|
#LIBS = -lresolv -lsocket -lnsl -lgen
|
||||||
#CC=gcc
|
#CC=gcc
|
||||||
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||||
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror \
|
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch $(WARNERR) \
|
||||||
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
|
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
|
||||||
# $(CC_OPTIONS)
|
# $(CC_OPTIONS)
|
||||||
#CF = cf/sunos5-5.h
|
#CF = cf/sunos5-5.h
|
||||||
@ -204,7 +205,7 @@ MINORVERSION=MinorVersion
|
|||||||
## FreeBSD
|
## FreeBSD
|
||||||
##--freebsd--
|
##--freebsd--
|
||||||
#CF = cf/freebsd.h
|
#CF = cf/freebsd.h
|
||||||
#COPTS = -O -Wall -Wno-unused -Werror $(CC_OPTIONS)
|
#COPTS = -O -Wall -Wno-unused $(WARNERR) $(CC_OPTIONS)
|
||||||
#SCRIPT=freebsd
|
#SCRIPT=freebsd
|
||||||
##--freebsd--
|
##--freebsd--
|
||||||
|
|
||||||
@ -212,7 +213,7 @@ MINORVERSION=MinorVersion
|
|||||||
##--rhapsody--
|
##--rhapsody--
|
||||||
#CF = cf/rhapsody.h
|
#CF = cf/rhapsody.h
|
||||||
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||||
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
|
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||||
##SCRIPT=rhapsody
|
##SCRIPT=rhapsody
|
||||||
##--rhapsody--
|
##--rhapsody--
|
||||||
|
|
||||||
@ -220,7 +221,7 @@ MINORVERSION=MinorVersion
|
|||||||
##--darwin--
|
##--darwin--
|
||||||
#CF = cf/rhapsody.h
|
#CF = cf/rhapsody.h
|
||||||
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||||
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
|
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||||
#SCRIPT=freebsd
|
#SCRIPT=freebsd
|
||||||
##--darwin--
|
##--darwin--
|
||||||
|
|
||||||
@ -228,7 +229,7 @@ MINORVERSION=MinorVersion
|
|||||||
##--netbsd--
|
##--netbsd--
|
||||||
#CF = cf/netbsd.h
|
#CF = cf/netbsd.h
|
||||||
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
|
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
|
||||||
# -Wno-uninitialized -Werror \
|
# -Wno-uninitialized $(WARNERR) \
|
||||||
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
|
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
|
||||||
# -Wwrite-strings -Wmissing-prototypes \
|
# -Wwrite-strings -Wmissing-prototypes \
|
||||||
# -Wmissing-declarations -Wnested-externs \
|
# -Wmissing-declarations -Wnested-externs \
|
||||||
|
25
RELNOTES
25
RELNOTES
@ -60,6 +60,31 @@ and for prodding me into improving it.
|
|||||||
- 'make install' now creates the initial zero-length dhcpd.leases file if
|
- 'make install' now creates the initial zero-length dhcpd.leases file if
|
||||||
one does not already exist on the system.
|
one does not already exist on the system.
|
||||||
|
|
||||||
|
Changes since 3.0.3b3
|
||||||
|
|
||||||
|
- dhclient.conf documentation for interface {} was updated to reflect recent
|
||||||
|
discussion on the dhcp-hackers mailing list.
|
||||||
|
|
||||||
|
- In response to reports that the software does not compile on GCC 4.0.0,
|
||||||
|
-Werror was removed from Makefile.conf for all platforms that used it.
|
||||||
|
We will address the true problem in a future release; this is a temporary
|
||||||
|
workaround.
|
||||||
|
|
||||||
|
Changes since 3.0.3b2
|
||||||
|
|
||||||
|
- An error in code changes introduced in 3.0.3b2 was corrected, which caused
|
||||||
|
static BOOTP clients to receive random addresses.
|
||||||
|
|
||||||
|
Changes since 3.0.3b1
|
||||||
|
|
||||||
|
- A bug was fixed in BOOTPREQUEST handling code wherein stale references to
|
||||||
|
host records would be left behind on leases that were not allocated to the
|
||||||
|
client currently booting (eg in the case where the host was denied booting).
|
||||||
|
|
||||||
|
- The dhcpd.conf.5 manpage was updated to be more clear in regards to
|
||||||
|
multiple host declarations (thanks to Vincent McIntyre). 'Interim' style
|
||||||
|
dynamic updates were also retouched.
|
||||||
|
|
||||||
Changes since 3.0.2
|
Changes since 3.0.2
|
||||||
|
|
||||||
- A bug was fixed where a server might load balance a DHCP REQUEST to its
|
- A bug was fixed where a server might load balance a DHCP REQUEST to its
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins Exp $
|
.\" $Id: dhclient.conf.5,v 1.16 2005/07/07 16:39:07 dhankins Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||||
@ -28,7 +28,7 @@
|
|||||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||||
.\" ``http://www.nominum.com''.
|
.\" ``http://www.nominum.com''.
|
||||||
.\"
|
.\"
|
||||||
.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins Exp $
|
.\" $Id: dhclient.conf.5,v 1.16 2005/07/07 16:39:07 dhankins Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH dhclient.conf 5
|
.TH dhclient.conf 5
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -524,6 +524,15 @@ parameters will then be used only for the interface that matches the
|
|||||||
specified name. Interfaces for which there is no interface
|
specified name. Interfaces for which there is no interface
|
||||||
declaration will use the parameters declared outside of any interface
|
declaration will use the parameters declared outside of any interface
|
||||||
declaration, or the default settings.
|
declaration, or the default settings.
|
||||||
|
.PP
|
||||||
|
.B Note well:
|
||||||
|
ISC dhclient only maintains one list of interfaces, which is either
|
||||||
|
determined at startup from command line arguments, or otherwise is
|
||||||
|
autodetected. If you supplied the list of interfaces on the command
|
||||||
|
line, this configuration clause will add the named interface to the
|
||||||
|
list in such a way that will cause it to be configured by DHCP. Which
|
||||||
|
may not be the result you had intended. This is an undesirable side
|
||||||
|
effect that will be addressed in a future release.
|
||||||
.PP
|
.PP
|
||||||
\fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
|
\fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
|
||||||
.PP
|
.PP
|
||||||
|
@ -1376,7 +1376,7 @@ void dhcpdecline PROTO ((struct packet *, int));
|
|||||||
void dhcpinform PROTO ((struct packet *, int));
|
void dhcpinform PROTO ((struct packet *, int));
|
||||||
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
|
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
|
||||||
void ack_lease PROTO ((struct packet *, struct lease *,
|
void ack_lease PROTO ((struct packet *, struct lease *,
|
||||||
unsigned int, TIME, char *, int));
|
unsigned int, TIME, char *, int, struct host_decl *));
|
||||||
void dhcp_reply PROTO ((struct lease *));
|
void dhcp_reply PROTO ((struct lease *));
|
||||||
int find_lease PROTO ((struct lease **, struct packet *,
|
int find_lease PROTO ((struct lease **, struct packet *,
|
||||||
struct shared_network *, int *, int *, struct lease *,
|
struct shared_network *, int *, int *, struct lease *,
|
||||||
|
102
server/bootp.c
102
server/bootp.c
@ -3,7 +3,7 @@
|
|||||||
BOOTP Protocol support. */
|
BOOTP Protocol support. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: bootp.c,v 1.72 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: bootp.c,v 1.73 2005/07/07 16:39:07 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -55,9 +55,7 @@ void bootp (packet)
|
|||||||
struct in_addr from;
|
struct in_addr from;
|
||||||
struct hardware hto;
|
struct hardware hto;
|
||||||
struct option_state *options = (struct option_state *)0;
|
struct option_state *options = (struct option_state *)0;
|
||||||
struct subnet *subnet;
|
struct lease *lease = (struct lease *)0;
|
||||||
struct lease *lease;
|
|
||||||
struct iaddr ip_address;
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
struct data_string d1;
|
struct data_string d1;
|
||||||
struct option_cache *oc;
|
struct option_cache *oc;
|
||||||
@ -79,90 +77,70 @@ void bootp (packet)
|
|||||||
? inet_ntoa (packet -> raw -> giaddr)
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
: packet -> interface -> name);
|
: packet -> interface -> name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!locate_network (packet)) {
|
if (!locate_network (packet)) {
|
||||||
log_info ("%s: network unknown", msgbuf);
|
log_info ("%s: network unknown", msgbuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
find_hosts_by_haddr (&hp, packet -> raw -> htype,
|
|
||||||
packet -> raw -> chaddr,
|
|
||||||
packet -> raw -> hlen, MDL);
|
|
||||||
|
|
||||||
lease = (struct lease *)0;
|
|
||||||
find_lease (&lease, packet, packet -> shared_network,
|
find_lease (&lease, packet, packet -> shared_network,
|
||||||
0, 0, (struct lease *)0, MDL);
|
0, 0, (struct lease *)0, MDL);
|
||||||
|
|
||||||
/* Find an IP address in the host_decl that matches the
|
if (lease && lease->host)
|
||||||
specified network. */
|
host_reference(&hp, lease->host, MDL);
|
||||||
subnet = (struct subnet *)0;
|
|
||||||
if (hp)
|
|
||||||
find_host_for_network (&subnet, &hp, &ip_address,
|
|
||||||
packet -> shared_network);
|
|
||||||
|
|
||||||
if (!subnet) {
|
if (!lease || ((lease->flags & STATIC_LEASE) == 0)) {
|
||||||
struct host_decl *h;
|
struct host_decl *h;
|
||||||
/* We didn't find an applicable host declaration.
|
/* We didn't find an applicable fixed-address host
|
||||||
Just in case we may be able to dynamically assign
|
declaration. Just in case we may be able to dynamically
|
||||||
an address, see if there's a host declaration
|
assign an address, see if there's a host declaration
|
||||||
that doesn't have an ip address associated with it. */
|
that doesn't have an ip address associated with it. */
|
||||||
|
|
||||||
|
if (!hp)
|
||||||
|
find_hosts_by_haddr(&hp, packet->raw->htype,
|
||||||
|
packet->raw->chaddr,
|
||||||
|
packet->raw->hlen, MDL);
|
||||||
|
|
||||||
for (h = hp; h; h = h -> n_ipaddr) {
|
for (h = hp; h; h = h -> n_ipaddr) {
|
||||||
if (!h -> fixed_addr) {
|
if (!h -> fixed_addr) {
|
||||||
host_reference (&host, h, MDL);
|
host_reference(&host, h, MDL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hp) {
|
|
||||||
host_dereference (&hp, MDL);
|
|
||||||
if (host)
|
|
||||||
host_reference (&hp, host, MDL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If a lease has already been assigned to this client,
|
if (hp)
|
||||||
use it. */
|
host_dereference(&hp, MDL);
|
||||||
if (lease) {
|
|
||||||
if (host && host != lease -> host) {
|
if (host) {
|
||||||
if (lease -> host)
|
host_reference(&hp, host, MDL);
|
||||||
host_dereference (&lease -> host, MDL);
|
host_dereference(&host, MDL);
|
||||||
host_reference (&lease -> host, host, MDL);
|
|
||||||
}
|
|
||||||
ack_lease (packet, lease, 0, 0, msgbuf, 0);
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, try to allocate one. */
|
/* Allocate a lease if we have not yet found one. */
|
||||||
allocate_lease (&lease, packet,
|
if (!lease)
|
||||||
packet -> shared_network -> pools,
|
allocate_lease (&lease, packet,
|
||||||
&peer_has_leases);
|
packet -> shared_network -> pools,
|
||||||
if (lease) {
|
&peer_has_leases);
|
||||||
if (host && host != lease -> host) {
|
|
||||||
if (lease -> host)
|
if (lease)
|
||||||
host_dereference (&lease -> host, MDL);
|
ack_lease (packet, lease, 0, 0, msgbuf, 0, hp);
|
||||||
host_reference (&lease -> host, host, MDL);
|
else
|
||||||
} else if (lease -> host)
|
log_info ("%s: BOOTP from dynamic client and no "
|
||||||
host_dereference (&lease -> host, MDL);
|
"dynamic leases", msgbuf);
|
||||||
ack_lease (packet, lease, 0, 0, msgbuf, 0);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We couldn't find an address to give this bootp client. */
|
|
||||||
log_info ("%s: BOOTP from unknown client and no dynamic leases",
|
|
||||||
msgbuf);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run the executable statements to compute the client and server
|
/* Run the executable statements to compute the client and server
|
||||||
options. */
|
options. */
|
||||||
option_state_allocate (&options, MDL);
|
option_state_allocate (&options, MDL);
|
||||||
|
|
||||||
/* Execute the subnet statements. */
|
/* Execute the subnet statements. */
|
||||||
execute_statements_in_scope ((struct binding_value **)0,
|
execute_statements_in_scope ((struct binding_value **)0,
|
||||||
packet, lease, (struct client_state *)0,
|
packet, lease, (struct client_state *)0,
|
||||||
packet -> options, options,
|
packet -> options, options,
|
||||||
&lease -> scope, lease -> subnet -> group,
|
&lease -> scope, lease -> subnet -> group,
|
||||||
(struct group *)0);
|
(struct group *)0);
|
||||||
|
|
||||||
/* Execute statements from class scopes. */
|
/* Execute statements from class scopes. */
|
||||||
for (i = packet -> class_count; i > 0; i--) {
|
for (i = packet -> class_count; i > 0; i--) {
|
||||||
execute_statements_in_scope
|
execute_statements_in_scope
|
||||||
@ -178,7 +156,7 @@ void bootp (packet)
|
|||||||
packet, lease, (struct client_state *)0,
|
packet, lease, (struct client_state *)0,
|
||||||
packet -> options, options,
|
packet -> options, options,
|
||||||
&lease -> scope,
|
&lease -> scope,
|
||||||
hp -> group, subnet -> group);
|
hp -> group, lease -> subnet -> group);
|
||||||
|
|
||||||
/* Drop the request if it's not allowed for this client. */
|
/* Drop the request if it's not allowed for this client. */
|
||||||
if ((oc = lookup_option (&server_universe, options, SV_ALLOW_BOOTP)) &&
|
if ((oc = lookup_option (&server_universe, options, SV_ALLOW_BOOTP)) &&
|
||||||
@ -266,7 +244,9 @@ void bootp (packet)
|
|||||||
raw.secs = packet -> raw -> secs;
|
raw.secs = packet -> raw -> secs;
|
||||||
raw.flags = packet -> raw -> flags;
|
raw.flags = packet -> raw -> flags;
|
||||||
raw.ciaddr = packet -> raw -> ciaddr;
|
raw.ciaddr = packet -> raw -> ciaddr;
|
||||||
memcpy (&raw.yiaddr, ip_address.iabuf, sizeof raw.yiaddr);
|
|
||||||
|
/* yiaddr is an ipv4 address, it must be 4 octets. */
|
||||||
|
memcpy (&raw.yiaddr, lease->ip_addr.iabuf, 4);
|
||||||
|
|
||||||
/* If we're always supposed to broadcast to this client, set
|
/* If we're always supposed to broadcast to this client, set
|
||||||
the broadcast bit in the bootp flags field. */
|
the broadcast bit in the bootp flags field. */
|
||||||
@ -350,7 +330,7 @@ void bootp (packet)
|
|||||||
/* Report what we're doing... */
|
/* Report what we're doing... */
|
||||||
log_info ("%s", msgbuf);
|
log_info ("%s", msgbuf);
|
||||||
log_info ("BOOTREPLY for %s to %s (%s) via %s",
|
log_info ("BOOTREPLY for %s to %s (%s) via %s",
|
||||||
piaddr (ip_address), hp -> name,
|
piaddr (lease->ip_addr), hp -> name,
|
||||||
print_hw_addr (packet -> raw -> htype,
|
print_hw_addr (packet -> raw -> htype,
|
||||||
packet -> raw -> hlen,
|
packet -> raw -> hlen,
|
||||||
packet -> raw -> chaddr),
|
packet -> raw -> chaddr),
|
||||||
@ -406,6 +386,4 @@ void bootp (packet)
|
|||||||
host_dereference (&hp, MDL);
|
host_dereference (&hp, MDL);
|
||||||
if (host)
|
if (host)
|
||||||
host_dereference (&host, MDL);
|
host_dereference (&host, MDL);
|
||||||
if (subnet)
|
|
||||||
subnet_dereference (&subnet, MDL);
|
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: dhcp.c,v 1.197 2005/03/17 20:15:27 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: dhcp.c,v 1.198 2005/07/07 16:39:08 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -387,7 +387,8 @@ void dhcpdiscover (packet, ms_nulltp)
|
|||||||
if (when < lease -> ends)
|
if (when < lease -> ends)
|
||||||
when = lease -> ends;
|
when = lease -> ends;
|
||||||
|
|
||||||
ack_lease (packet, lease, DHCPOFFER, when, msgbuf, ms_nulltp);
|
ack_lease (packet, lease, DHCPOFFER, when, msgbuf, ms_nulltp,
|
||||||
|
(struct host_decl *)0);
|
||||||
out:
|
out:
|
||||||
if (lease)
|
if (lease)
|
||||||
lease_dereference (&lease, MDL);
|
lease_dereference (&lease, MDL);
|
||||||
@ -664,7 +665,8 @@ void dhcprequest (packet, ms_nulltp, ip_lease)
|
|||||||
|
|
||||||
/* Otherwise, send the lease to the client if we found one. */
|
/* Otherwise, send the lease to the client if we found one. */
|
||||||
if (lease) {
|
if (lease) {
|
||||||
ack_lease (packet, lease, DHCPACK, 0, msgbuf, ms_nulltp);
|
ack_lease (packet, lease, DHCPACK, 0, msgbuf, ms_nulltp,
|
||||||
|
(struct host_decl *)0);
|
||||||
} else
|
} else
|
||||||
log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
|
log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
|
||||||
|
|
||||||
@ -1476,13 +1478,14 @@ void nak_lease (packet, cip)
|
|||||||
from, &to, (struct hardware *)0);
|
from, &to, (struct hardware *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
|
void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
|
||||||
struct packet *packet;
|
struct packet *packet;
|
||||||
struct lease *lease;
|
struct lease *lease;
|
||||||
unsigned int offer;
|
unsigned int offer;
|
||||||
TIME when;
|
TIME when;
|
||||||
char *msg;
|
char *msg;
|
||||||
int ms_nulltp;
|
int ms_nulltp;
|
||||||
|
struct host_decl *hp;
|
||||||
{
|
{
|
||||||
struct lease *lt;
|
struct lease *lt;
|
||||||
struct lease_state *state;
|
struct lease_state *state;
|
||||||
@ -1511,7 +1514,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the lease carries a host record, remember it. */
|
/* If the lease carries a host record, remember it. */
|
||||||
if (lease -> host)
|
if (hp)
|
||||||
|
host_reference (&host, hp, MDL);
|
||||||
|
else if (lease -> host)
|
||||||
host_reference (&host, lease -> host, MDL);
|
host_reference (&host, lease -> host, MDL);
|
||||||
|
|
||||||
/* Allocate a lease state structure... */
|
/* Allocate a lease state structure... */
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||||
.\" ``http://www.nominum.com''.
|
.\" ``http://www.nominum.com''.
|
||||||
.\"
|
.\"
|
||||||
.\" $Id: dhcpd.conf.5,v 1.67 2005/03/17 20:15:27 dhankins Exp $
|
.\" $Id: dhcpd.conf.5,v 1.68 2005/07/07 16:39:08 dhankins Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH dhcpd.conf 5
|
.TH dhcpd.conf 5
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -1040,8 +1040,8 @@ IP address, it can update its own A record, assuming that the
|
|||||||
.PP
|
.PP
|
||||||
If the server is configured not to allow client updates, or if the
|
If the server is configured not to allow client updates, or if the
|
||||||
client doesn't want to do its own update, the server will simply
|
client doesn't want to do its own update, the server will simply
|
||||||
choose a name for the client, possibly using the hostname supplied by
|
choose a name for the client from either the fqdn option (if present)
|
||||||
the client ("jschmoe" in the previous example). It will use its own
|
or the hostname option (if present). It will use its own
|
||||||
domain name for the client, just as in the ad-hoc update scheme.
|
domain name for the client, just as in the ad-hoc update scheme.
|
||||||
It will then update both the A and PTR record, using the name that it
|
It will then update both the A and PTR record, using the name that it
|
||||||
chose for the client. If the client sends a fully-qualified domain
|
chose for the client. If the client sends a fully-qualified domain
|
||||||
@ -1049,6 +1049,14 @@ name in the fqdn option, the server uses only the leftmost part of the
|
|||||||
domain name - in the example above, "jschmoe" instead of
|
domain name - in the example above, "jschmoe" instead of
|
||||||
"jschmoe.radish.org".
|
"jschmoe.radish.org".
|
||||||
.PP
|
.PP
|
||||||
|
Also, if the
|
||||||
|
.I use-host-decl-names
|
||||||
|
configuration option is enabled, then the host declaration's
|
||||||
|
.I hostname
|
||||||
|
will be used in place of the
|
||||||
|
.I hostname
|
||||||
|
option, and the same rules will apply as described above.
|
||||||
|
.PP
|
||||||
The other difference between the ad-hoc scheme and the interim
|
The other difference between the ad-hoc scheme and the interim
|
||||||
scheme is that with the interim scheme, a method is used that
|
scheme is that with the interim scheme, a method is used that
|
||||||
allows more than one DHCP server to update the DNS database without
|
allows more than one DHCP server to update the DNS database without
|
||||||
@ -1352,26 +1360,32 @@ a specific client, and also provides a way to assign a client a fixed address.
|
|||||||
The host declaration provides a way for the DHCP server to identify a DHCP or
|
The host declaration provides a way for the DHCP server to identify a DHCP or
|
||||||
BOOTP client, and also a way to assign the client a static IP address.
|
BOOTP client, and also a way to assign the client a static IP address.
|
||||||
.PP
|
.PP
|
||||||
If it is desirable to be able to boot a DHCP or BOOTP
|
If it is desirable to be able to boot a DHCP or BOOTP client on more than one
|
||||||
client on more than one subnet with fixed addresses, more than one
|
subnet with fixed addresses, more than one address may be specified in the
|
||||||
address may be specified in the
|
|
||||||
.I fixed-address
|
.I fixed-address
|
||||||
declaration, or more than one
|
declaration, or more than one
|
||||||
.B host
|
.B host
|
||||||
statement may be specified.
|
statement may be specified matching the same client.
|
||||||
.PP
|
.PP
|
||||||
If client-specific boot parameters must change based on the network
|
If client-specific boot parameters must change based on the network
|
||||||
to which the client is attached, then multiple
|
to which the client is attached, then multiple
|
||||||
.B host
|
.B host
|
||||||
declaration should
|
declarations should be used. The
|
||||||
be used.
|
|
||||||
.PP
|
|
||||||
If a client is to be booted using a fixed address if it's
|
|
||||||
possible, but should be allocated a dynamic address otherwise, then a
|
|
||||||
.B host
|
.B host
|
||||||
declaration must be specified without a
|
declarations will only match a client if one of their
|
||||||
.B fixed-address
|
.I fixed-address
|
||||||
declaration.
|
statements is viable on the subnet (or shared network) where the client is
|
||||||
|
attached. Conversely, for a
|
||||||
|
.B host
|
||||||
|
declaration to match a client being allocated a dynamic address, it must not
|
||||||
|
have any
|
||||||
|
.I fixed-address
|
||||||
|
statements. You may therefore need a mixture of
|
||||||
|
.B host
|
||||||
|
declarations for any given client...some having
|
||||||
|
.I fixed-address
|
||||||
|
statements, others without.
|
||||||
|
.PP
|
||||||
.I hostname
|
.I hostname
|
||||||
should be a name identifying the host. If a \fIhostname\fR option is
|
should be a name identifying the host. If a \fIhostname\fR option is
|
||||||
not specified for the host, \fIhostname\fR is used.
|
not specified for the host, \fIhostname\fR is used.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user