From 61e783d566d40d89bc1ff12b567206b5d01fb1d8 Mon Sep 17 00:00:00 2001 From: Jiří Popelka Date: Apr 21 2010 14:55:52 +0000 Subject: - If the Reply was received in response to Renew or Rebind message, client adds any new addresses in the IA option to the IA (#578097) --- diff --git a/dhclient-script b/dhclient-script index 53ce6e9..bd1e635 100755 --- a/dhclient-script +++ b/dhclient-script @@ -3,7 +3,7 @@ # dhclient-script: Network interface configuration script run by # dhclient based on DHCP client communication # -# Copyright (C) 2008, 2009 Red Hat, Inc. +# Copyright (C) 2008, 2009, 2010 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -89,6 +89,9 @@ make_resolv_conf() { if [ -n "${new_domain_search}" ]; then echo "search ${new_domain_search//\\032/ }" >> ${rscf} elif [ -n "${new_domain_name}" ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. echo "search ${new_domain_name//\\032/ }" >> ${rscf} fi fi @@ -407,15 +410,12 @@ dhconfig() { fi } -dh6config() { - case "${reason}" in - BOUND6) - if [ -z "${new_ip6_address}" ] && - [ -z "${new_ip6_prefixlen}" ]; then - exit_with_hooks 2 - fi - - ip -f inet6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ +# Section 18.1.8. (Receipt of Reply Messages) of RFC 3315 says: +# The client SHOULD perform duplicate address detection on each of +# the addresses in any IAs it receives in the Reply message before +# using that address for traffic. +add_ipv6_addr_with_DAD() { + ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ dev ${interface} scope global # repeatedly test whether newly added address passed @@ -439,11 +439,28 @@ dh6config() { ip -6 addr del ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} exit_with_hooks 3 fi +} + +dh6config() { + case "${reason}" in + BOUND6) + if [ -z "${new_ip6_address}" ] && + [ -z "${new_ip6_prefixlen}" ]; then + exit_with_hooks 2 + fi + + add_ipv6_addr_with_DAD make_resolv_conf ;; RENEW6|REBIND6) + if [ -n "${new_ip6_prefixlen}" ] && + [ -n "${new_ip6_address}" ] && + [ ! "${new_ip6_address}" = "${old_ip6_address}" ]; then + add_ipv6_addr_with_DAD + fi + if [ ! "${new_dhcp6_name_servers}" = "${old_dhcp6_name_servers}" ] || [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then make_resolv_conf diff --git a/dhcp.spec b/dhcp.spec index a3770fc..698b13e 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -13,7 +13,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: %{basever} -Release: 14%{?dist} +Release: 15%{?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. @@ -226,6 +226,7 @@ libdhcpctl and libomapi static libraries are also included in this package. %patch24 -p1 -b .retransmission # Fill in Elapsed Time Option in Release message (#582939) +# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #21171]) %patch25 -p1 -b .release6-elapsed # Copy in documentation and example scripts for LDAP patch to dhcpd @@ -510,6 +511,10 @@ fi %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz %changelog +* Wed Apr 21 2010 Jiri Popelka - 12:4.1.1-15 +- If the Reply was received in response to Renew or Rebind message, + client adds any new addresses in the IA option to the IA (#578097) + * Mon Apr 19 2010 Jiri Popelka - 12:4.1.1-14 - Fill in Elapsed Time Option in Release/Decline messages (#582939)