diff --git a/dhcp-stateless-DUID-LLT.patch b/dhcp-stateless-DUID-LLT.patch new file mode 100644 index 0000000..a7f22b5 --- /dev/null +++ b/dhcp-stateless-DUID-LLT.patch @@ -0,0 +1,48 @@ +From 61fa3dd9e789997f66e848c7e3fb2f554ee374e2 Mon Sep 17 00:00:00 2001 +From: Jiri Popelka +Date: Thu, 18 Dec 2014 11:53:26 +0100 +Subject: [PATCH] Write DUID_LLT even in stateless mode. + +By default, DHCPv6 dhclient creates DUID-LL +if it is running in stateless mode (-6 -S) and +doesn't write it into leases file, most likely +because the DUID-LL is always generated the same. + +It's however possible to specify DUID to be of type LLT instead of LL +with '-D LLT'. Rfc 3315 says that: +'Clients and servers using this type of DUID MUST +store the DUID-LLT in stable storage.' +That's not fulfiled in this case (-6 -S -D LLT), +because it's generated each time again. + +It's not a big deal because the server doesn't store any +info about 'stateless' clients, so it doesn't matter +that the DUID-LLT is different each time. +But there's a TAHI test which tests this, i.e. that +DUID-LLT is still the same even in stateless mode. +It's a test DHCP_CONF.7.1.9, part B. +https://www.ipv6ready.org/docs/Phase2_DHCPv6_Conformance_Latest.pdf + +Signed-off-by: Jiri Popelka +--- + client/dhclient.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/client/dhclient.c b/client/dhclient.c +index 5ef59cd..026e3fe 100644 +--- a/client/dhclient.c ++++ b/client/dhclient.c +@@ -788,7 +788,9 @@ void run_stateless(int exit_mode) + if (default_duid.buffer != NULL) + data_string_forget(&default_duid, MDL); + +- form_duid(&default_duid, MDL); ++ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS && ++ duid_type == DUID_LLT) ++ write_duid(&default_duid); + } + + /* Start a configuration state machine. */ +-- +2.1.0 + diff --git a/dhcp.spec b/dhcp.spec index a5bb68c..b010c98 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 17%{?dist} +Release: 18%{?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. @@ -78,6 +78,7 @@ Patch38: dhcp-skip-vlan.patch Patch39: dhcp-relay-hop-limit.patch Patch40: dhcp-ldapgssapi.patch Patch41: dhcp-option97-pxe-client-id.patch +Patch42: dhcp-stateless-DUID-LLT.patch Patch100: dhcp-bind996.patch BuildRequires: autoconf @@ -377,6 +378,10 @@ rm -rf includes/isc-dhcp # (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38110]) %patch41 -p1 -b .option97 +# dhclient: write DUID_LLT even in stateless mode (#1156356) +# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38144]) +%patch42 -p1 -b .stateless-DUID-LLT + # to build against bind-9.9.6 %patch100 -p1 -b .bind996 @@ -680,6 +685,9 @@ done %doc doc/html/ %changelog +* Thu Dec 18 2014 Jiri Popelka - 12:4.3.1-18 +- dhclient: write DUID_LLT even in stateless mode (#1156356) + * Wed Dec 17 2014 Jiri Popelka - 12:4.3.1-17 - option 97 - pxe-client-id (#1058674)