dhclient-script: fix stateless DHCPv6 mode (#1101149)

This commit is contained in:
Jiri Popelka 2014-05-28 17:47:08 +02:00
parent 6756a54bda
commit 4533a8a170
2 changed files with 14 additions and 13 deletions

View File

@ -598,18 +598,16 @@ dh6config() {
;;
RENEW6|REBIND6)
if [ -z "${new_ip6_address}" ] ||
[ -z "${new_ip6_prefixlen}" ]; then
exit_with_hooks 2
fi
if [ ! "${new_ip6_address}" = "${old_ip6_address}" ]; then
[[ -n "${old_ip6_address}" ]] && ip -6 addr del ${old_ip6_address} dev ${interface}
add_ipv6_addr_with_DAD
else # only update address lifetimes
ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} \
dev ${interface} scope global valid_lft ${new_max_life} \
preferred_lft ${new_preferred_life}
if [[ -n "${new_ip6_address}" ]] &&
[[ -n "${new_ip6_prefixlen}" ]]; then
if [[ ! "${new_ip6_address}" = "${old_ip6_address}" ]]; then
[[ -n "${old_ip6_address}" ]] && ip -6 addr del ${old_ip6_address} dev ${interface}
add_ipv6_addr_with_DAD
else # only update address lifetimes
ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} \
dev ${interface} scope global valid_lft ${new_max_life} \
preferred_lft ${new_preferred_life}
fi
fi
if [ ! "${new_dhcp6_name_servers}" = "${old_dhcp6_name_servers}" ] ||

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.3.0
Release: 10%{?dist}
Release: 11%{?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.
@ -622,6 +622,9 @@ done
%doc doc/html/
%changelog
* Wed May 28 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-11
- dhclient-script: fix stateless DHCPv6 mode (#1101149)
* Wed May 07 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-10
- use StandardError=null instead of log_perror.patch