From 3e44d201b9d0c7431276f795978ee35e2999253e Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 21 Mar 2012 19:42:20 +0100 Subject: [PATCH] RFC5970 - DHCPv6 Options for Network Boot (#798735) --- ...5970-dhcpv6-options-for-network-boot.patch | 89 +++++++++++++++++++ dhcp.spec | 9 +- 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch diff --git a/dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch b/dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch new file mode 100644 index 0000000..3bcb5da --- /dev/null +++ b/dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch @@ -0,0 +1,89 @@ +diff -up dhcp-4.2.3-P2/common/dhcp-options.5.rfc5970 dhcp-4.2.3-P2/common/dhcp-options.5 +--- dhcp-4.2.3-P2/common/dhcp-options.5.rfc5970 2012-03-21 19:39:47.572002389 +0100 ++++ dhcp-4.2.3-P2/common/dhcp-options.5 2012-03-21 19:39:47.670001164 +0100 +@@ -1770,7 +1770,48 @@ The \fBlq-relay-data\fR option is used i + The \fBlq-client-link\fR option is used internally by for lease query. + .RE + .PP ++ ++.B option ++.B dhcp6.bootfile-url ++.I string ++.B ; ++.RS 0.25i ++.PP ++The server sends this option to inform the client about a URL to a ++boot file. Used primarily for UEFI network booting, it contains an RFC3986 ++compliant URI which the client may use to boot an operating system. This option ++is defined in RFC5970 ++.RE ++.PP ++ ++.B option ++.B dhcp6.arch-type ++.I arch-id \fR[\fB,\fR arch-id\fR...] ++.B ; ++.RS 0.25i ++.PP ++A client will send this option to a server so that the server may make decisions ++on what options and addresses to offer the requesting client. The option ++consists of a list of 16 bit unsigned values that represent the architecture of ++the requesting client. These values corespond to the values available to the ++dhcpv4 option architecture-type, as defined in RFC4578, section 2.1. ++This option is defined in RFC5970 + .RE ++.PP ++ ++.B option ++.B dhcp6.net-id ++.I uint8 uint8 uint8 ++.B ; ++.RS 0.25i ++.PP ++A client will send this option to a server to inform it about the clients level ++of UNDI support. The option consists of 3 octets (a type, major and minor ++value). Specific meanings of these values are doumented in section 2.2 of ++RFC4578. ++This option is defined in RFC5970 ++.RE ++.PP + .SH DEFINING NEW OPTIONS + The Internet Systems Consortium DHCP client and server provide the + capability to define new options. Each DHCP option has a name, a +diff -up dhcp-4.2.3-P2/common/tables.c.rfc5970 dhcp-4.2.3-P2/common/tables.c +--- dhcp-4.2.3-P2/common/tables.c.rfc5970 2012-03-21 19:39:47.577002328 +0100 ++++ dhcp-4.2.3-P2/common/tables.c 2012-03-21 19:39:47.670001164 +0100 +@@ -461,6 +461,18 @@ static struct option dhcpv6_options[] = + { "lq-relay-data", "6X", &dhcpv6_universe, 47, 1 }, + { "lq-client-link", "6A", &dhcpv6_universe, 48, 1 }, + ++ /* RFC5970 OPTIONS */ ++ ++ { "bootfile-url", "t", &dhcpv6_universe, 59, 1}, ++#if 0 ++ /* Can't implement this until arrays of strings with length "StA" ++ * are implemented ++ */ ++ { "bootfile-param", "StA", &dhcpv6_universe, 60, 1}, ++#endif ++ { "arch-type", "Sa", &dhcpv6_universe, 61, 1}, ++ { "net-id", "BBB", &dhcpv6_universe, 62, 1}, ++ + { NULL, NULL, NULL, 0, 0 } + }; + +diff -up dhcp-4.2.3-P2/includes/dhcp6.h.rfc5970 dhcp-4.2.3-P2/includes/dhcp6.h +--- dhcp-4.2.3-P2/includes/dhcp6.h.rfc5970 2010-02-17 21:33:55.000000000 +0100 ++++ dhcp-4.2.3-P2/includes/dhcp6.h 2012-03-21 19:39:47.671001151 +0100 +@@ -75,6 +75,11 @@ + #define D6O_CLT_TIME 46 /* RFC5007 */ + #define D6O_LQ_RELAY_DATA 47 /* RFC5007 */ + #define D6O_LQ_CLIENT_LINK 48 /* RFC5007 */ ++/* 49-58 Not yet assigned */ ++#define D60_BOOT_URL 59 /* RFC5970 */ ++#define D60_BOOT_PARAMS 60 /* RFC5970 */ ++#define D60_CLIENT_ARCH 61 /* RFC5970 */ ++#define D60_CLIENT_NII 62 /* RFC5970 */ + + /* + * Status Codes, from RFC 3315 section 24.4, and RFC 3633, 5007. diff --git a/dhcp.spec b/dhcp.spec index 3b0d15a..ea1f708 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -22,7 +22,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.2.3 -Release: 21.%{patchver}%{?dist} +Release: 22.%{patchver}%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -76,6 +76,7 @@ Patch37: dhcp-4.2.3-dhclient-decline-onetry.patch Patch38: dhcp-4.2.3-P2-log_perror.patch Patch39: dhcp-4.2.3-P2-getifaddrs.patch Patch40: dhcp-4.2.3-P2-send_release.patch +Patch41: dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch BuildRequires: autoconf BuildRequires: automake @@ -313,6 +314,9 @@ rm bind/bind.tar.gz # Don't use fallback_interface when releasing lease (#800561) %patch40 -p1 -b .send_release +# RFC5970 - DHCPv6 Options for Network Boot (#798735) +%patch41 -p1 -b .rfc5970 + # Copy in the Fedora/RHEL dhclient script %{__install} -p -m 0755 %{SOURCE1} client/scripts/linux %{__install} -p -m 0644 %{SOURCE2} . @@ -620,6 +624,9 @@ fi %changelog +* Wed Mar 21 2012 Jiri Popelka - 12:4.2.3-22.P2 +- RFC5970 - DHCPv6 Options for Network Boot (#798735) + * Wed Mar 21 2012 Jiri Popelka - 12:4.2.3-21.P2 - don't use fallback_interface when releasing lease (#800561)