update address lifetimes on RENEW/RENEW6 (#1032809)

This commit is contained in:
Jiri Popelka 2014-01-13 13:28:07 +01:00
parent 9ca3958959
commit 543c1a5814
2 changed files with 12 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# dhclient-script: Network interface configuration script run by
# dhclient based on DHCP client communication
#
# Copyright (C) 2008-2013 Red Hat, Inc.
# Copyright (C) 2008-2014 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
@ -483,6 +483,9 @@ dhconfig() {
fi
fi
else # RENEW||REBIND - only update address lifetimes
ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \
valid_lft ${new_dhcp_lease_time} preferred_lft ${new_dhcp_lease_time} >/dev/null 2>&1
fi
if [ ! "${new_ip_address}" = "${alias_ip_address}" ] &&
@ -601,6 +604,10 @@ dh6config() {
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
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: 0.2.%{prever}%{?dist}
Release: 0.3.%{prever}%{?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.
@ -630,6 +630,9 @@ done
%changelog
* Mon Jan 13 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-0.3.a1
- update address lifetimes on RENEW/RENEW6 (#1032809)
* Tue Jan 07 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.0-0.2.a1
- make it actually build