mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 13:28:14 +00:00
Add use-host-decl-names keyword
This commit is contained in:
parent
149f9e221e
commit
c256bae9ba
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -452,6 +452,8 @@ static int intern (atom, dfv)
|
||||
return UID;
|
||||
if (!strcasecmp (atom + 1, "ser-class"))
|
||||
return USER_CLASS;
|
||||
if (!strcasecmp (atom + 1, "se-host-decl-names"))
|
||||
return USE_HOST_DECL_NAMES;
|
||||
break;
|
||||
case 'v':
|
||||
if (!strcasecmp (atom + 1, "endor-class"))
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -452,6 +452,8 @@ static int intern (atom, dfv)
|
||||
return UID;
|
||||
if (!strcasecmp (atom + 1, "ser-class"))
|
||||
return USER_CLASS;
|
||||
if (!strcasecmp (atom + 1, "se-host-decl-names"))
|
||||
return USE_HOST_DECL_NAMES;
|
||||
break;
|
||||
case 'v':
|
||||
if (!strcasecmp (atom + 1, "endor-class"))
|
||||
|
21
confpars.c
21
confpars.c
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: confpars.c,v 1.32 1996/09/02 21:16:25 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: confpars.c,v 1.33 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -143,6 +143,7 @@ void read_leases ()
|
||||
| BOOT_UNKNOWN_CLIENTS boolean
|
||||
| ONE_LEASE_PER_CLIENT boolean
|
||||
| GET_LEASE_HOSTNAMES boolean
|
||||
| USE_HOST_DECL_NAME boolean
|
||||
| NEXT_SERVER ip-addr-or-hostname SEMI
|
||||
| option_parameter
|
||||
| SERVER-IDENTIFIER ip-addr-or-hostname SEMI
|
||||
@ -290,6 +291,12 @@ int parse_statement (cfile, group, type, host_decl, declaration)
|
||||
group -> get_lease_hostnames = parse_boolean (cfile);
|
||||
break;
|
||||
|
||||
case USE_HOST_DECL_NAMES:
|
||||
if (type == HOST_DECL)
|
||||
parse_warn ("use-host-decl-names not allowed here.");
|
||||
group -> use_host_decl_names = parse_boolean (cfile);
|
||||
break;
|
||||
|
||||
case NEXT_SERVER:
|
||||
tree = parse_ip_addr_or_hostname (cfile, 0);
|
||||
if (!tree)
|
||||
@ -518,7 +525,8 @@ void parse_host_declaration (cfile, group)
|
||||
declaration);
|
||||
} while (1);
|
||||
|
||||
if (!host -> group -> options [DHO_HOST_NAME]) {
|
||||
if (!host -> group -> options [DHO_HOST_NAME] &&
|
||||
host -> group -> use_host_decl_names) {
|
||||
host -> group -> options [DHO_HOST_NAME] =
|
||||
new_tree_cache ("parse_host_declaration");
|
||||
if (!host -> group -> options [DHO_HOST_NAME])
|
||||
@ -1321,15 +1329,22 @@ struct lease *parse_lease_declaration (cfile)
|
||||
lease.uid_len = strlen (val) + 1;
|
||||
lease.uid = (unsigned char *)
|
||||
malloc (lease.uid_len);
|
||||
if (!lease.uid) {
|
||||
warn ("no space for uid");
|
||||
return (struct lease *)0;
|
||||
}
|
||||
memcpy (lease.uid, val, lease.uid_len);
|
||||
} else {
|
||||
lease.uid_len = 0;
|
||||
lease.uid = parse_numeric_aggregate
|
||||
(cfile, (unsigned char *)0,
|
||||
&lease.uid_len, ':', 16, 8);
|
||||
if (!lease.uid)
|
||||
if (!lease.uid) {
|
||||
warn ("no space for uid");
|
||||
return (struct lease *)0;
|
||||
}
|
||||
if (lease.uid_len == 0) {
|
||||
lease.uid = (unsigned char *)0;
|
||||
parse_warn ("zero-length uid");
|
||||
seenbit = 0;
|
||||
break;
|
||||
|
33
dhcpd.conf.5
33
dhcpd.conf.5
@ -615,6 +615,39 @@ each address in the lease pool and use that address for the DHCP
|
||||
\fIhostname\fR option. If \fIflag\fR is true, then this lookup is
|
||||
done for all addresses in the current scope. By default, or if
|
||||
\fIflag\fR is false, no lookups are done.
|
||||
.PP
|
||||
.B The
|
||||
.I use-host-decl-names
|
||||
.B statement
|
||||
.PP
|
||||
\fBuse-host-decl-names\fR \fIflag\fR\fB;\fR
|
||||
.PP
|
||||
If the \fIuse-host-decl-names\fR parameter is true in a given scope,
|
||||
then for every host declaration within that scope, the name provided
|
||||
for the host declaration will be supplied to the client as its
|
||||
hostname. So, for example,
|
||||
.PP
|
||||
.nf
|
||||
group {
|
||||
use-host-decl-names on;
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
}
|
||||
}
|
||||
|
||||
is equivalent to
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
option host-name "joe";
|
||||
}
|
||||
.fi
|
||||
.PP
|
||||
An \fIoption host-name\fR statement within a host declaration will
|
||||
override the use of the name in the host declaration.
|
||||
.SH REFERENCE: OPTION STATEMENTS
|
||||
.PP
|
||||
DHCP \fIoption\fR statements always start with the \fIoption\fR
|
||||
|
256
dhcpd.conf.cat5
256
dhcpd.conf.cat5
@ -641,17 +641,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
current scope. By default, or if _f_l_a_g is false, no
|
||||
lookups are done.
|
||||
|
||||
RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key-
|
||||
word, followed by an option name, followed by option data.
|
||||
The option names and data formats are described below.
|
||||
It is not necessary to exhaustively specify all DHCP
|
||||
options - only those options which are needed by clients
|
||||
must be specified.
|
||||
TThhee _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s ssttaatteemmeenntt
|
||||
|
||||
Option data comes in a variety of formats, as defined
|
||||
below:
|
||||
uussee--hhoosstt--ddeeccll--nnaammeess _f_l_a_g;;
|
||||
|
||||
If the _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s parameter is true in a given
|
||||
scope, then for every host declaration within that scope,
|
||||
the name provided for the host declaration will be sup-
|
||||
plied to the client as its hostname. So, for example,
|
||||
|
||||
group {
|
||||
use-host-decl-names on;
|
||||
|
||||
|
||||
|
||||
@ -664,6 +664,34 @@ RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
}
|
||||
}
|
||||
|
||||
is equivalent to
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
option host-name "joe";
|
||||
}
|
||||
|
||||
An _o_p_t_i_o_n _h_o_s_t_-_n_a_m_e statement within a host declaration
|
||||
will override the use of the name in the host declaration.
|
||||
|
||||
RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key-
|
||||
word, followed by an option name, followed by option data.
|
||||
The option names and data formats are described below.
|
||||
It is not necessary to exhaustively specify all DHCP
|
||||
options - only those options which are needed by clients
|
||||
must be specified.
|
||||
|
||||
Option data comes in a variety of formats, as defined
|
||||
below:
|
||||
|
||||
The iipp--aaddddrreessss data type can be entered either as an
|
||||
explicit IP address (e.g., 239.254.197.10) or as a domain
|
||||
name (e.g., haagen.isc.org). When entering a domain name,
|
||||
@ -689,8 +717,20 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII
|
||||
string enclosed in double quotes, or a series of octets
|
||||
specified in hexadecimal, seperated by colons. For exam-
|
||||
ple:
|
||||
specified in hexadecimal, seperated by colons. For
|
||||
|
||||
|
||||
|
||||
11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
example:
|
||||
|
||||
option client-identifier "CLIENT-FOO";
|
||||
or
|
||||
@ -717,25 +757,13 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;;
|
||||
|
||||
The subnet mask option specifies the client's subnet mask
|
||||
as per RFC 950. If no subnet mask option is provided
|
||||
|
||||
|
||||
|
||||
11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
anywhere in scope, as a last resort dhcpd will use the
|
||||
subnet mask from the subnet declaration for the network on
|
||||
which an address is being assigned. However, _a_n_y subnet-
|
||||
mask option declaration that is in scope for the address
|
||||
being assigned will override the subnet mask specified in
|
||||
the subnet declaration.
|
||||
as per RFC 950. If no subnet mask option is provided any-
|
||||
where in scope, as a last resort dhcpd will use the subnet
|
||||
mask from the subnet declaration for the network on which
|
||||
an address is being assigned. However, _a_n_y subnet-mask
|
||||
option declaration that is in scope for the address being
|
||||
assigned will override the subnet mask specified in the
|
||||
subnet declaration.
|
||||
|
||||
ooppttiioonn ttiimmee--ooffffsseett _i_n_t_3_2;;
|
||||
|
||||
@ -757,6 +785,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];
|
||||
|
||||
|
||||
|
||||
12
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
The name-servers option specifies a list of IEN 116 name
|
||||
servers available to the client. Servers should be listed
|
||||
in order of preference.
|
||||
@ -784,18 +823,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn llpprr--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
The LPR server option specifies a list of RFC 1179 line
|
||||
|
||||
|
||||
|
||||
12
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
printer servers available to the client. Servers should
|
||||
be listed in order of preference.
|
||||
|
||||
@ -823,6 +850,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn bboooott--ssiizzee _u_i_n_t_1_6;;
|
||||
|
||||
This option specifies the length in 512-octet blocks of
|
||||
|
||||
|
||||
|
||||
13
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
the default boot image for the client.
|
||||
|
||||
ooppttiioonn mmeerriitt--dduummpp _s_t_r_i_n_g;;
|
||||
@ -851,17 +890,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn iipp--ffoorrwwaarrddiinngg _f_l_a_g;;
|
||||
|
||||
|
||||
|
||||
13
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies whether the client should configure
|
||||
its IP layer for packet forwarding. A value of 0 means
|
||||
disable IP forwarding, and a value of 1 means enable IP
|
||||
@ -888,6 +916,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
match one of the filters should be discarded by the
|
||||
client.
|
||||
|
||||
|
||||
|
||||
|
||||
14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
See STD 3 (RFC1122) for further information.
|
||||
|
||||
ooppttiioonn mmaaxx--ddggrraamm--rreeaasssseemmbbllyy _u_i_n_t_1_6;;
|
||||
@ -917,17 +957,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn iinntteerrffaaccee--mmttuu _u_i_n_t_1_6;;
|
||||
|
||||
|
||||
|
||||
14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies the MTU to use on this interface.
|
||||
The minimum legal value for the MTU is 68.
|
||||
|
||||
@ -953,6 +982,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
perform subnet mask discovery using ICMP. A value of 0
|
||||
indicates that the client should not perform mask discov-
|
||||
ery. A value of 1 means that the client should perform
|
||||
|
||||
|
||||
|
||||
15
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
mask discovery.
|
||||
|
||||
ooppttiioonn mmaasskk--ssuupppplliieerr _f_l_a_g;;
|
||||
@ -983,17 +1024,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
routes to the same destination are specified, they are
|
||||
listed in descending order of priority.
|
||||
|
||||
|
||||
|
||||
15
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
The routes consist of a list of IP address pairs. The
|
||||
first address is the destination address, and the second
|
||||
address is the router for the destination.
|
||||
@ -1018,6 +1048,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn iieeeeee880022--33--eennccaappssuullaattiioonn _f_l_a_g;;
|
||||
|
||||
This option specifies whether or not the client should use
|
||||
|
||||
|
||||
|
||||
16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042)
|
||||
encapsulation if the interface is an Ethernet. A value of
|
||||
0 indicates that the client should use RFC 894 encapsula-
|
||||
@ -1049,17 +1091,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn nniiss--ddoommaaiinn _s_t_r_i_n_g;;
|
||||
|
||||
|
||||
|
||||
16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies the name of the client's NIS (Sun
|
||||
Network Information Services) domain. The domain is for-
|
||||
matted as a character string consisting of characters from
|
||||
@ -1084,6 +1115,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
RFC 1001/1002 NBNS name servers listed in order of prefer-
|
||||
ence.
|
||||
|
||||
|
||||
|
||||
17
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
ooppttiioonn nneettbbiiooss--dddd--sseerrvveerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
The NetBIOS datagram distribution server (NBDD) option
|
||||
@ -1115,17 +1157,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn xx--ddiissppllaayy--mmaannaaggeerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
|
||||
|
||||
17
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies a list of systems that are running
|
||||
the X Window System Display Manager and are available to
|
||||
the client. Addresses should be listed in order of pref-
|
||||
@ -1152,37 +1183,6 @@ AAUUTTHHOORR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
18
|
||||
|
||||
|
||||
|
1
dhcpd.h
1
dhcpd.h
@ -138,6 +138,7 @@ struct group {
|
||||
int dynamic_bootp;
|
||||
int one_lease_per_client;
|
||||
int get_lease_hostnames;
|
||||
int use_host_decl_names;
|
||||
|
||||
struct tree_cache *options [256];
|
||||
};
|
||||
|
@ -89,6 +89,7 @@
|
||||
#define GROUP 293
|
||||
#define ONE_LEASE_PER_CLIENT 294
|
||||
#define GET_LEASE_HOSTNAMES 295
|
||||
#define USE_HOST_DECL_NAMES 296
|
||||
|
||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||
(x) != STRING && \
|
||||
|
@ -138,6 +138,7 @@ struct group {
|
||||
int dynamic_bootp;
|
||||
int one_lease_per_client;
|
||||
int get_lease_hostnames;
|
||||
int use_host_decl_names;
|
||||
|
||||
struct tree_cache *options [256];
|
||||
};
|
||||
|
@ -89,6 +89,7 @@
|
||||
#define GROUP 293
|
||||
#define ONE_LEASE_PER_CLIENT 294
|
||||
#define GET_LEASE_HOSTNAMES 295
|
||||
#define USE_HOST_DECL_NAMES 296
|
||||
|
||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||
(x) != STRING && \
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: confpars.c,v 1.32 1996/09/02 21:16:25 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: confpars.c,v 1.33 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@ -143,6 +143,7 @@ void read_leases ()
|
||||
| BOOT_UNKNOWN_CLIENTS boolean
|
||||
| ONE_LEASE_PER_CLIENT boolean
|
||||
| GET_LEASE_HOSTNAMES boolean
|
||||
| USE_HOST_DECL_NAME boolean
|
||||
| NEXT_SERVER ip-addr-or-hostname SEMI
|
||||
| option_parameter
|
||||
| SERVER-IDENTIFIER ip-addr-or-hostname SEMI
|
||||
@ -290,6 +291,12 @@ int parse_statement (cfile, group, type, host_decl, declaration)
|
||||
group -> get_lease_hostnames = parse_boolean (cfile);
|
||||
break;
|
||||
|
||||
case USE_HOST_DECL_NAMES:
|
||||
if (type == HOST_DECL)
|
||||
parse_warn ("use-host-decl-names not allowed here.");
|
||||
group -> use_host_decl_names = parse_boolean (cfile);
|
||||
break;
|
||||
|
||||
case NEXT_SERVER:
|
||||
tree = parse_ip_addr_or_hostname (cfile, 0);
|
||||
if (!tree)
|
||||
@ -518,7 +525,8 @@ void parse_host_declaration (cfile, group)
|
||||
declaration);
|
||||
} while (1);
|
||||
|
||||
if (!host -> group -> options [DHO_HOST_NAME]) {
|
||||
if (!host -> group -> options [DHO_HOST_NAME] &&
|
||||
host -> group -> use_host_decl_names) {
|
||||
host -> group -> options [DHO_HOST_NAME] =
|
||||
new_tree_cache ("parse_host_declaration");
|
||||
if (!host -> group -> options [DHO_HOST_NAME])
|
||||
@ -1321,15 +1329,22 @@ struct lease *parse_lease_declaration (cfile)
|
||||
lease.uid_len = strlen (val) + 1;
|
||||
lease.uid = (unsigned char *)
|
||||
malloc (lease.uid_len);
|
||||
if (!lease.uid) {
|
||||
warn ("no space for uid");
|
||||
return (struct lease *)0;
|
||||
}
|
||||
memcpy (lease.uid, val, lease.uid_len);
|
||||
} else {
|
||||
lease.uid_len = 0;
|
||||
lease.uid = parse_numeric_aggregate
|
||||
(cfile, (unsigned char *)0,
|
||||
&lease.uid_len, ':', 16, 8);
|
||||
if (!lease.uid)
|
||||
if (!lease.uid) {
|
||||
warn ("no space for uid");
|
||||
return (struct lease *)0;
|
||||
}
|
||||
if (lease.uid_len == 0) {
|
||||
lease.uid = (unsigned char *)0;
|
||||
parse_warn ("zero-length uid");
|
||||
seenbit = 0;
|
||||
break;
|
||||
|
@ -615,6 +615,39 @@ each address in the lease pool and use that address for the DHCP
|
||||
\fIhostname\fR option. If \fIflag\fR is true, then this lookup is
|
||||
done for all addresses in the current scope. By default, or if
|
||||
\fIflag\fR is false, no lookups are done.
|
||||
.PP
|
||||
.B The
|
||||
.I use-host-decl-names
|
||||
.B statement
|
||||
.PP
|
||||
\fBuse-host-decl-names\fR \fIflag\fR\fB;\fR
|
||||
.PP
|
||||
If the \fIuse-host-decl-names\fR parameter is true in a given scope,
|
||||
then for every host declaration within that scope, the name provided
|
||||
for the host declaration will be supplied to the client as its
|
||||
hostname. So, for example,
|
||||
.PP
|
||||
.nf
|
||||
group {
|
||||
use-host-decl-names on;
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
}
|
||||
}
|
||||
|
||||
is equivalent to
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
option host-name "joe";
|
||||
}
|
||||
.fi
|
||||
.PP
|
||||
An \fIoption host-name\fR statement within a host declaration will
|
||||
override the use of the name in the host declaration.
|
||||
.SH REFERENCE: OPTION STATEMENTS
|
||||
.PP
|
||||
DHCP \fIoption\fR statements always start with the \fIoption\fR
|
||||
|
@ -641,17 +641,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
current scope. By default, or if _f_l_a_g is false, no
|
||||
lookups are done.
|
||||
|
||||
RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key-
|
||||
word, followed by an option name, followed by option data.
|
||||
The option names and data formats are described below.
|
||||
It is not necessary to exhaustively specify all DHCP
|
||||
options - only those options which are needed by clients
|
||||
must be specified.
|
||||
TThhee _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s ssttaatteemmeenntt
|
||||
|
||||
Option data comes in a variety of formats, as defined
|
||||
below:
|
||||
uussee--hhoosstt--ddeeccll--nnaammeess _f_l_a_g;;
|
||||
|
||||
If the _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s parameter is true in a given
|
||||
scope, then for every host declaration within that scope,
|
||||
the name provided for the host declaration will be sup-
|
||||
plied to the client as its hostname. So, for example,
|
||||
|
||||
group {
|
||||
use-host-decl-names on;
|
||||
|
||||
|
||||
|
||||
@ -664,6 +664,34 @@ RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
}
|
||||
}
|
||||
|
||||
is equivalent to
|
||||
|
||||
host joe {
|
||||
hardware ethernet 08:00:2b:4c:29:32;
|
||||
fixed-address joe.fugue.com;
|
||||
option host-name "joe";
|
||||
}
|
||||
|
||||
An _o_p_t_i_o_n _h_o_s_t_-_n_a_m_e statement within a host declaration
|
||||
will override the use of the name in the host declaration.
|
||||
|
||||
RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
|
||||
DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key-
|
||||
word, followed by an option name, followed by option data.
|
||||
The option names and data formats are described below.
|
||||
It is not necessary to exhaustively specify all DHCP
|
||||
options - only those options which are needed by clients
|
||||
must be specified.
|
||||
|
||||
Option data comes in a variety of formats, as defined
|
||||
below:
|
||||
|
||||
The iipp--aaddddrreessss data type can be entered either as an
|
||||
explicit IP address (e.g., 239.254.197.10) or as a domain
|
||||
name (e.g., haagen.isc.org). When entering a domain name,
|
||||
@ -689,8 +717,20 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII
|
||||
string enclosed in double quotes, or a series of octets
|
||||
specified in hexadecimal, seperated by colons. For exam-
|
||||
ple:
|
||||
specified in hexadecimal, seperated by colons. For
|
||||
|
||||
|
||||
|
||||
11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
example:
|
||||
|
||||
option client-identifier "CLIENT-FOO";
|
||||
or
|
||||
@ -717,25 +757,13 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;;
|
||||
|
||||
The subnet mask option specifies the client's subnet mask
|
||||
as per RFC 950. If no subnet mask option is provided
|
||||
|
||||
|
||||
|
||||
11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
anywhere in scope, as a last resort dhcpd will use the
|
||||
subnet mask from the subnet declaration for the network on
|
||||
which an address is being assigned. However, _a_n_y subnet-
|
||||
mask option declaration that is in scope for the address
|
||||
being assigned will override the subnet mask specified in
|
||||
the subnet declaration.
|
||||
as per RFC 950. If no subnet mask option is provided any-
|
||||
where in scope, as a last resort dhcpd will use the subnet
|
||||
mask from the subnet declaration for the network on which
|
||||
an address is being assigned. However, _a_n_y subnet-mask
|
||||
option declaration that is in scope for the address being
|
||||
assigned will override the subnet mask specified in the
|
||||
subnet declaration.
|
||||
|
||||
ooppttiioonn ttiimmee--ooffffsseett _i_n_t_3_2;;
|
||||
|
||||
@ -757,6 +785,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];
|
||||
|
||||
|
||||
|
||||
12
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
The name-servers option specifies a list of IEN 116 name
|
||||
servers available to the client. Servers should be listed
|
||||
in order of preference.
|
||||
@ -784,18 +823,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn llpprr--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
The LPR server option specifies a list of RFC 1179 line
|
||||
|
||||
|
||||
|
||||
12
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
printer servers available to the client. Servers should
|
||||
be listed in order of preference.
|
||||
|
||||
@ -823,6 +850,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn bboooott--ssiizzee _u_i_n_t_1_6;;
|
||||
|
||||
This option specifies the length in 512-octet blocks of
|
||||
|
||||
|
||||
|
||||
13
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
the default boot image for the client.
|
||||
|
||||
ooppttiioonn mmeerriitt--dduummpp _s_t_r_i_n_g;;
|
||||
@ -851,17 +890,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn iipp--ffoorrwwaarrddiinngg _f_l_a_g;;
|
||||
|
||||
|
||||
|
||||
13
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies whether the client should configure
|
||||
its IP layer for packet forwarding. A value of 0 means
|
||||
disable IP forwarding, and a value of 1 means enable IP
|
||||
@ -888,6 +916,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
match one of the filters should be discarded by the
|
||||
client.
|
||||
|
||||
|
||||
|
||||
|
||||
14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
See STD 3 (RFC1122) for further information.
|
||||
|
||||
ooppttiioonn mmaaxx--ddggrraamm--rreeaasssseemmbbllyy _u_i_n_t_1_6;;
|
||||
@ -917,17 +957,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn iinntteerrffaaccee--mmttuu _u_i_n_t_1_6;;
|
||||
|
||||
|
||||
|
||||
14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies the MTU to use on this interface.
|
||||
The minimum legal value for the MTU is 68.
|
||||
|
||||
@ -953,6 +982,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
perform subnet mask discovery using ICMP. A value of 0
|
||||
indicates that the client should not perform mask discov-
|
||||
ery. A value of 1 means that the client should perform
|
||||
|
||||
|
||||
|
||||
15
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
mask discovery.
|
||||
|
||||
ooppttiioonn mmaasskk--ssuupppplliieerr _f_l_a_g;;
|
||||
@ -983,17 +1024,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
routes to the same destination are specified, they are
|
||||
listed in descending order of priority.
|
||||
|
||||
|
||||
|
||||
15
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
The routes consist of a list of IP address pairs. The
|
||||
first address is the destination address, and the second
|
||||
address is the router for the destination.
|
||||
@ -1018,6 +1048,18 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
ooppttiioonn iieeeeee880022--33--eennccaappssuullaattiioonn _f_l_a_g;;
|
||||
|
||||
This option specifies whether or not the client should use
|
||||
|
||||
|
||||
|
||||
16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042)
|
||||
encapsulation if the interface is an Ethernet. A value of
|
||||
0 indicates that the client should use RFC 894 encapsula-
|
||||
@ -1049,17 +1091,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn nniiss--ddoommaaiinn _s_t_r_i_n_g;;
|
||||
|
||||
|
||||
|
||||
16
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies the name of the client's NIS (Sun
|
||||
Network Information Services) domain. The domain is for-
|
||||
matted as a character string consisting of characters from
|
||||
@ -1084,6 +1115,17 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
RFC 1001/1002 NBNS name servers listed in order of prefer-
|
||||
ence.
|
||||
|
||||
|
||||
|
||||
17
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
ooppttiioonn nneettbbiiooss--dddd--sseerrvveerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
The NetBIOS datagram distribution server (NBDD) option
|
||||
@ -1115,17 +1157,6 @@ dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
ooppttiioonn xx--ddiissppllaayy--mmaannaaggeerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];;
|
||||
|
||||
|
||||
|
||||
17
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dhcpd.conf(5) dhcpd.conf(5)
|
||||
|
||||
|
||||
This option specifies a list of systems that are running
|
||||
the X Window System Display Manager and are available to
|
||||
the client. Addresses should be listed in order of pref-
|
||||
@ -1152,37 +1183,6 @@ AAUUTTHHOORR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
18
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user