- 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)
This commit is contained in:
Jiří Popelka 2010-04-21 14:56:20 +00:00
parent 33f7324460
commit 2d5915903a
2 changed files with 31 additions and 9 deletions

View File

@ -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,14 +410,11 @@ dhconfig() {
fi
}
dh6config() {
case "${reason}" in
BOUND6)
if [ -z "${new_ip6_address}" ] &&
[ -z "${new_ip6_prefixlen}" ]; then
exit_with_hooks 2
fi
# 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
@ -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

View File

@ -13,7 +13,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: %{basever}
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.
@ -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 <jpopelka@redhat.com> - 12:4.1.1-18
- 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 <jpopelka@redhat.com> - 12:4.1.1-17
- Fill in Elapsed Time Option in Release/Decline messages (#582939)