summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2018-01-26 13:09:57 -0500
committerThomas Markwalder <tmark@isc.org>2018-01-26 13:09:57 -0500
commitefd3b1e2918e50b61a81ded0ab0657d28f76e16e (patch)
tree34eae54294d49744ff113a46ae59a96af207bf9c
parentb94669fa89ba991b51c3a8f37cad3033d5d9fb36 (diff)
downloadisc-dhcp-efd3b1e2918e50b61a81ded0ab0657d28f76e16e.tar.gz
[master] Includes DHCP4 option definitions for RFCs 4578,5071, and 5859
Merges in 47062
-rw-r--r--RELNOTES8
-rw-r--r--common/dhcp-options.585
-rw-r--r--common/tables.c19
-rw-r--r--includes/site.h5
4 files changed, 97 insertions, 20 deletions
diff --git a/RELNOTES b/RELNOTES
index 1487ff55..69e441b4 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -97,6 +97,14 @@ by Eric Young (eay@cryptsoft.com).
dad-wait-time is zero (the default), DAD error checking is not peformed.
[ISC-Bugs 46805]
+- Support for sending and receiving additional DHCP4 options has been added
+ to both the dhcpd and dhclient. Specifically: option codes 93,94, and 97
+ (RFC 4578); code 150 (RFC 5859); and codes 209,219, and 211 (RFC 5071).
+ Beyond configuring, sending, requesting, and receiving these options neither
+ server nor client apply any additional logic based on their values.
+ Thanks to Peter Lewis for requesting this change.
+ [ISC-Bugs 47062]
+
Changes since 4.4.0b1 (Bug Fixes)
- Added clarifying text to dhcpd.conf.5 explaining the class match expressions
diff --git a/common/dhcp-options.5 b/common/dhcp-options.5
index 70043e09..33d48043 100644
--- a/common/dhcp-options.5
+++ b/common/dhcp-options.5
@@ -1,7 +1,6 @@
.\" $Id: dhcp-options.5,v 1.50 2011/05/20 13:48:32 tomasz Exp $
.\"
-.\" Copyright (c) 2012-2016 by Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 2004-2018 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -114,7 +113,7 @@ or
.SH SETTING OPTION VALUES USING EXPRESSIONS
Sometimes it's helpful to be able to set the value of a DHCP option
based on some value that the client has sent. To do this, you can
-use expression evaluation. The
+use expression evaluation. The
.B dhcp-eval(5)
manual page describes how to write expressions. To assign the result
of an evaluation to an option, define the option as follows:
@@ -135,7 +134,7 @@ will be included in the code based on the definition of an argument for
the RFC that defines the option in includes/site.h. This provides you
with a method for over-riding the ISC definitions if necessary - for
example if you have previously defined the option with a different
-format using the mechanism from DEFINING NEW OPTIONS below.
+format using the mechanism from DEFINING NEW OPTIONS below.
.PP
By default all of the options are enabled. In order to disable an option
you would edit the includes/site.h file and comment out the definition for
@@ -581,6 +580,35 @@ forwarding, and a value of true means enable IP forwarding.
The IRC server option specifies a list of IRC servers available
to the client. Servers should be listed in order of preference.
.RE
+
+.PP
+.B option \fBloader-configfile\fR \fItext\fR
+.RS 0.25i
+.PP
+This option is used to specify a boot loading configuration file
+a PXE client should use.
+.PP
+This option is included based on RFC 5071.
+.RE
+.PP
+.B option \fBloader-pathprefix\fR \fItext\fR
+.RS 0.25i
+.PP
+This option is used to specify a path prefix a PXE client should
+use in conjunction with the boot load configuration file.
+.PP
+This option is included based on RFC 5071.
+.RE
+.PP
+.B option \fBloader-reboottime\fR \fIuint32\fR
+.RS 0.25i
+.PP
+This option is used to dictate the maximum amount of time a
+PXE client should allow itself to achieve configured network
+resources before rebooting.
+.PP
+This option is included based on RFC 5071.
+.RE
.PP
.B option \fBlog-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
]\fB;\fR
@@ -810,6 +838,33 @@ NetWare/IP suboptions - see the NETWARE/IP SUBOPTIONS section for more
information.
.RE
.PP
+.B option \fBpxe-system-type\fR \fIuint16\fR [\fB, \fIuint16\fR ... ]\fB;\fR
+.RS 0.25i
+.PP
+A list of one ore more 16-bit integers which allows a client to specify its
+pre-boot architecture type(s).
+.PP
+This option is included based on RFC 4578.
+.RE
+.PP
+.B option \fBpxe-interface-id\fR \fIuint8\fR \fIuint8\fR \fIuint8\fR
+.RS 0.25i
+.PP
+A three octet value which allows a client to specify its network interface
+type.
+.PP
+This option is included based on RFC 4578.
+.RE
+.PP
+.B option \fBpxe-client-id\fR \fIuint8\fR \fIstring\fR
+.RS 0.25i
+.PP
+A single octet indicating type, followed by a string that allows a
+client to specify its PXE client identity.
+.PP
+This option is included based on RFC 4578.
+.RE
+.PP
.B option \fBoption-6rd\fR \fIuint8 uint8 ip6-address ip-address\fR [\fB,\fR
.I ip-address \fR...]\fB;\fR
.RS 0.25i
@@ -966,7 +1021,7 @@ If you have an NDS directory agent whose address you need to
configure, the slp-directory-agent option should work.
.RE
.PP
-.B option slp-service-scope \fIboolean text\fR\fB;\fR
+.B option \fBslp-service-scope\fR \fIboolean text\fR\fB;\fR
.RS 0.25i
.PP
The Service Location Protocol Service Scope Option specifies two
@@ -1067,6 +1122,16 @@ This option is not user configurable in the server.
This specifies the IP address of the client's swap server.
.RE
.PP
+.B option \fBtftp-server-address\fR \fIip-address\fR [\fB,\fR
+\fIip-address\fR... ]\fB;\fR
+.RS 0.25i
+.PP
+This option configures a list of one or more IPv4 addresses of
+tftp servers a client may use.
+.PP
+This option is included based on RFC 5859
+.RE
+.PP
.B option \fBtcp-keepalive-garbage\fR \fIflag\fR\fB;\fR
.RS 0.25i
.PP
@@ -1648,7 +1713,7 @@ rather than IPv6 addresses, please see the \fBsip-servers-names\fR option
above.
.RE
.PP
-.B option
+.B option
.B dhcp6.name-servers
.I ip6-address \fR[\fB,\fR
.I ip6-address \fR... ]
@@ -1682,7 +1747,7 @@ manufactured and consumed by the software.
.PP
The \fBia-prefix\fR option is placed inside \fBia-pd\fR options in order
to identify the prefix(es) allocated to the client. It is not directly
-edited in dhcpd.conf(5) or dhclient.conf(5), but rather is
+edited in dhcpd.conf(5) or dhclient.conf(5), but rather is
manufactured and consumed by the software.
.RE
.PP
@@ -2177,7 +2242,7 @@ option sql-server-address sql.example.com;
.B ;
.PP
An option whose structure is an IPv6 address must be expressed as
-a valid IPv6 address. The following is an example use of the
+a valid IPv6 address. The following is an example use of the
ip6-address type:
.nf
@@ -2315,7 +2380,7 @@ option static-routes
10.0.1.0 255.255.255.0 net-1-rtr.example.com 1,
10.2.0.0 255.255.224.0 net-2-0-rtr.example.com 3;
-.fi
+.fi
.SH VENDOR ENCAPSULATED OPTIONS
The DHCP protocol defines the \fBvendor-encapsulated-options\fR
option, which allows vendors to define their own options that will be
@@ -2359,7 +2424,7 @@ option dhcp6.vendor-opts
The second way of setting the value of these options is to have the DHCP
server generate a vendor-specific option buffer. To do this, you
must do four things: define an option space, define some options in
-that option space, provide values for them, and specify that that
+that option space, provide values for them, and specify that that
option space should be used to generate the relevant option.
.PP
To define a new option space in which vendor options can be stored,
diff --git a/common/tables.c b/common/tables.c
index b3d5ae66..c1aa2145 100644
--- a/common/tables.c
+++ b/common/tables.c
@@ -3,7 +3,7 @@
Tables of information... */
/*
- * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2018 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -191,9 +191,9 @@ static struct option dhcp_options[] = {
{ "client-last-transaction-time", "L", &dhcp_universe, 91, 1 },
{ "associated-ip", "Ia", &dhcp_universe, 92, 1 },
-#if 0
+#if defined(RFC4578_OPTIONS)
/* Defined by RFC 4578 */
- { "pxe-system-type", "S", &dhcp_universe, 93, 1 },
+ { "pxe-system-type", "Sa", &dhcp_universe, 93, 1 },
{ "pxe-interface-id", "BBB", &dhcp_universe, 94, 1 },
{ "pxe-client-id", "BX", &dhcp_universe, 97, 1 },
#endif
@@ -250,8 +250,7 @@ static struct option dhcp_options[] = {
#if defined(RFC6731_OPTIONS)
{ "rdnss-selection", "BIID", &dhcp_universe, 146, 1 },
#endif
-#if 0
- /* Not defined by RFC yet */
+#if defined(RFC5859_OPTIONS)
{ "tftp-server-address", "Ia", &dhcp_universe, 150, 1 },
#endif
#if defined(RFC7618_OPTIONS)
@@ -260,9 +259,11 @@ static struct option dhcp_options[] = {
#if defined(RFC7710_OPTIONS)
{ "v4-captive-portal", "t", &dhcp_universe, 160, 1 },
#endif
-#if 0
- /* PXELINUX options: defined by RFC 5071 */
+#if defined(RFC5071_OPTIONS)
+#if 0
+ /* Option 208 has been officially deprecated. Do NOT define it */
{ "pxelinux-magic", "BBBB", &dhcp_universe, 208, 1 },
+#endif
{ "loader-configfile", "t", &dhcp_universe, 209, 1 },
{ "loader-pathprefix", "t", &dhcp_universe, 210, 1 },
{ "loader-reboottime", "L", &dhcp_universe, 211, 1 },
@@ -365,10 +366,10 @@ static struct option dhcpv6_options[] = {
{ "relay-msg", "X", &dhcpv6_universe, 9, 1 },
/* Option code 10 is curiously unassigned. */
- /*
+ /*
* In draft-ietf-dhc-dhcpv6-25 there were two OPTION_CLIENT_MSG and
* OPTION_SERVER_MSG options. They were eventually unified as
- * OPTION_RELAY_MSG, hence no option with value of 10.
+ * OPTION_RELAY_MSG, hence no option with value of 10.
*/
#if 0
/* XXX: missing suitable atoms for the auth option. We may want
diff --git a/includes/site.h b/includes/site.h
index d9c1494b..2ef69e41 100644
--- a/includes/site.h
+++ b/includes/site.h
@@ -345,17 +345,20 @@
/* Include definitions for various options. In general these
should be left as is, but if you have already defined one
- of these and prefer your definition you can comment the
+ of these and prefer your definition you can comment the
RFC define out to avoid conflicts */
#define RFC2563_OPTIONS
#define RFC2937_OPTIONS
#define RFC4776_OPTIONS
+#define RFC4578_OPTIONS
#define RFC4833_OPTIONS
#define RFC4994_OPTIONS
+#define RFC5071_OPTIONS
#define RFC5192_OPTIONS
#define RFC5223_OPTIONS
#define RFC5417_OPTIONS
#define RFC5460_OPTIONS
+#define RFC5859_OPTIONS
#define RFC5969_OPTIONS
#define RFC5970_OPTIONS
#define RFC5986_OPTIONS